.. index:: 
  !ImageBuffer.getPixels Method
  
.. _id3_document_image_buffer_get_pixels_class_method:

===============================================================================
ImageBuffer.getPixels Method
===============================================================================

Module: :ref:`ImageBuffer<id3_document_image_buffer_class>`

Definition
----------

Gets a pointer to the pixels of the image. Unsafe! The user must handle the pixels pointer carefully.


.. tab-set::

    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public IntPtr GetPixels()

      **Returns**

        .. line-block::

          ``IntPtr``
          Pointer to the pixels of the image.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3DocumentImageBuffer_GetPixels (
            ID3_DOCUMENT_IMAGE_BUFFER hImageBuffer, 
            void ** pixels)

      **Parameters**

        .. line-block::

          ``hImageBuffer`` :ref:`ID3_DOCUMENT_IMAGE_BUFFER<id3_document_image_buffer_class>`
          :guilabel:`in` Handle to the ImageBuffer object.

          ``pixels`` void **
          :guilabel:`out` Pointer to the pixels of the image.


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3DocumentError<id3_document_document_error_enum>` file for the list of possible error codes.


