.. # split from OESpicoliFunctions.rst:532


.. oe:namespace:: OESpicoli

.. meta::
   :keywords: OEReadSurface

.. oe:function:: OEReadSurface

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OEReadSurface(const std::string& fname, OESurface& surf)
         bool OEReadSurface(OEPlatform::oeistream& ifs, OESurface& surf,
                            unsigned int type)

   .. oe:language:: python

      .. oe:api:: python

         OEReadSurface(fname: str, surf: OESurface) -> bool
         OEReadSurface(ifs: oeistream, surf: OESurface, type: int) -> bool

   Read the contents of the file named ``fname`` into the surface
   ``surf``. Returns ``false`` if ``fname`` is not a valid surface
   file name.

   An overload is provided to take any arbitrary
   :ref:`oeistream <OEPlatform_oeistream>`.

