.. index:: 
  !Image handling

.. _handling_images:

==============
Image handling
==============

|product-name| provides the necessary methods to work with static images coming from various sources. Please refer to the :ref:`id3_face_image_class` for full reference.

.. important:: When creating an :ref:`Image<id3_face_image_class>` object, the :ref:`PixelFormat<id3_face_pixel_format_enum>` must be set to ``bgr24Bits``.

Loading an image
================

To load an image into the memory you need to create an Image object that will contain the image's content.

The image can be loaded from a file or a buffer:

.. tab-set-code::

    .. literalinclude:: /../samples/sample.cs
       :language: c#
       :start-after: [load_image]
       :end-before: [load_image]
       :dedent: 12


See also
--------
- :ref:`id3_face_image_from_buffer_class_method`
- :ref:`id3_face_image_from_file_class_method`
- :ref:`id3_face_image_from_raw_buffer_class_method`
- :ref:`id3_face_image_from_yuv_planes_class_method`
