.. index:: 
  !PortraitProcessor.faceDetectionImageSize Property

.. _id3_face_portrait_processor_face_detection_image_size_class_member:

===============================================================================
PortraitProcessor.faceDetectionImageSize Property
===============================================================================

Module: :ref:`PortraitProcessor<id3_face_portrait_processor_class>`

Type: int

Definition
----------

The size, in pixels, of the downscaled image used for face detection.

.. hint:: Default value is 256. Low values tend to ignore small faces in the input image, while higher values tend to take longer to process.


.. tab-set::

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

    .. code:: Python

      face_detection_image_size: int


    **Exceptions**

      .. line-block::

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

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

    .. code:: Dart

      int get faceDetectionImageSize => getFaceDetectionImageSize();
      set faceDetectionImageSize(int value) => setFaceDetectionImageSize(value);


    **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 int faceDetectionImageSize
      {
          get => GetfaceDetectionImageSize();
          set => SetfaceDetectionImageSize(ref value);
      }


    **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 int getFaceDetectionImageSize() throws FaceException
      public void setFaceDetectionImageSize(int faceDetectionImageSize) throws FaceException


    **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 var faceDetectionImageSize: Int
          get {
              return Int(try! getFaceDetectionImageSize())
          }
      }


    **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 id3FacePortraitProcessor_GetFaceDetectionImageSize (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int * faceDetectionImageSize)
      int id3FacePortraitProcessor_SetFaceDetectionImageSize (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int faceDetectionImageSize)

    **Returns**
   
      .. line-block::

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

