.. index:: 
  !ImageBuffer Class

.. _id3_document_image_buffer_class:

===============================================================================
ImageBuffer Class
===============================================================================

Namespace: :ref:`id3.Document<reference_document>`

.. toctree::
  :hidden:

  clone<clone>
  getData<get_data>
  getPixels<get_pixels>


Definition
----------
.. line-block::
    Represents an image buffer.

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        class ImageBuffer

    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        class ImageBuffer implements Finalizable

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

      .. code:: C#

        public partial class ImageBuffer

    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public class ImageBuffer implements AutoCloseable, Serializable

    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public class ImageBuffer

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

      .. code:: C

        typedef struct id3DocumentImageBuffer *ID3_DOCUMENT_IMAGE_BUFFER;



Usage
-----

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        imageBufferInstance = ImageBuffer()
        # ...

      **Explicit destruction**

      .. code:: Python

        # ...
        del imageBufferInstance

    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        final imageBufferInstance = sdk.ImageBuffer();
        // ...

      **Explicit destruction**

      .. code:: Dart

        // ...
        imageBufferInstance.dispose()

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

      .. code:: C#

        using (var imageBufferInstance = new ImageBuffer())
        {
           // ...
        }

      **Explicit destruction**

      .. code:: C#

        var imageBufferInstance = new ImageBuffer()
        // ...
        imageBufferInstance.Dispose()

    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        try (ImageBuffer imageBufferInstance = new ImageBuffer()) {
        // ...
        }

      **Explicit destruction**

      .. code:: Java

        ImageBuffer imageBufferInstance = new ImageBuffer();
        // ...
        imageBufferInstance.close();

    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        private var imageBufferInstance: ImageBuffer? = nil
        imageBufferInstance = try ImageBuffer()

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

      .. code:: C

        ID3_DOCUMENT_IMAGE_BUFFER hImageBuffer{};
        int err = id3DocumentImageBuffer_Initialize(&hImageBuffer);
        if (err == ID3_SUCCESS) {
            // ...
            id3DocumentImageBuffer_Dispose(&hImageBuffer);
        }


Methods
-------

.. list-table:: 
  :width: 100%
  :widths: 30 70
  :header-rows: 1

  * - Name
    - Description
  * - :ref:`clone<id3_document_image_buffer_clone_class_method>`
    - Clones the ImageBuffer object.
  * - :ref:`getData<id3_document_image_buffer_get_data_class_method>`
    - Gets the image buffer data.
  * - :ref:`getPixels<id3_document_image_buffer_get_pixels_class_method>`
    - Gets a pointer to the pixels of the image. Unsafe! The user must handle the pixels pointer carefully.
