.. index:: 
  !ImageDict.add Method
  
.. _id3_face_image_dict_add_class_method:

===============================================================================
ImageDict.add Method
===============================================================================

Module: :ref:`ImageDict<id3_face_image_dict_class>`

Definition
----------

Adds an item to the ImageDict object.


.. tab-set::

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

      .. code:: Python

        add(self, key: str, image_item: Image) -> None

      **Parameters**

        .. line-block::

          ``key`` str
          :guilabel:`in` Unique key of the Image item to add.

          ``image_item`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Image item to add.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: Dart

        void add(String? key, Image imageItem)

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the Image item to add.

          ``imageItem`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Image item to add.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: C#

        public void Add(string key, Image imageItem)

      **Parameters**

        .. line-block::

          ``key`` string
          :guilabel:`in` Unique key of the Image item to add.

          ``imageItem`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Image item to add.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: Java

        public void add(String key, Image imageItem) throws FaceException

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the Image item to add.

          ``imageItem`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Image item to add.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: Swift

        public func add(key: String, imageItem: Image) throws

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the Image item to add.

          ``imageItem`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Image item to add.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: C

        int id3FaceImageDict_Add (
            ID3_FACE_IMAGE_DICT hImageDict, 
            const char * key, 
            ID3_FACE_IMAGE hImageItem)

      **Parameters**

        .. line-block::

          ``hImageDict`` :ref:`ID3_FACE_IMAGE_DICT<id3_face_image_dict_class>`
          :guilabel:`in` Handle to the ImageDict object.

          ``key`` const char *
          :guilabel:`in` Unique key of the Image item to add.

          ``hImageItem`` :ref:`ID3_FACE_IMAGE<id3_face_image_class>`
          :guilabel:`in` Image item to add.


      **Returns**

        .. line-block::

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


