
.. include:: ../substitutions

.. oe:namespace:: OEDepict

.. meta::
   :keywords: OEWriteImage

.. _OEDepict_OEWriteImage:


.. oe:function:: OEWriteImage


   .. list-table:: **The overloaded versions of the OEWriteImage function**
      :widths: 100 200
      :header-rows: 1

      * - Link
        - Description

      * - :ref:`OEWriteImage(filename, image)<api_OEWriteImage_fname_image>`
        - writes image into file

      * - :ref:`OEWriteImage(stream, ext, image)<api_OEWriteImage_stream_ext_image>`
        - writes image into output stream

.. _api_OEWriteImage_fname_image:

   .. oe:api::

      bool OEWriteImage(const std::string& filename, const OEImage& image)

   Writes the image into a file with the given name.

   *filename*
      The name of the file into which the image is written.
      The extension of the filename determine the type of the image.

   *image*
      The :ref:`OEImage <OEDepict_OEImage>` object which is being written
      into the given file.

   .. seealso::

      * :oe:func:`OEDepict::OEIsRegisteredImageFile` function


   .. ################################################################

.. _api_OEWriteImage_stream_ext_image:

   .. oe:api::

      bool OEWriteImage(OEPlatform::oeostream& os, const std::string& ext,
                        const OEImage& image)

   Writes the image into the given output stream.

   *os*
      The stream into which the image is written.

   *ext*
      The extension which determine the type of the image.

   *image*
      The :ref:`OEImage <OEDepict_OEImage>` object which is being written
      into the stream.

   .. seealso::

      * :oe:func:`OEDepict::OEIsRegisteredImageFile` function
