.. index:: 
  !PortraitProcessor.cropIodRatio Property

.. _id3_face_portrait_processor_crop_iod_ratio_class_member:

===============================================================================
PortraitProcessor.cropIodRatio Property
===============================================================================

Module: :ref:`PortraitProcessor<id3_face_portrait_processor_class>`

Type: float

Definition
----------

Ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range ]0;1[.

.. hint:: Default value is 0.25.


.. tab-set::

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

    .. code:: Python

      crop_iod_ratio: float


    **Exceptions**

      .. line-block::

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

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

    .. code:: Dart

      double get cropIodRatio => getCropIodRatio();
      set cropIodRatio(double value) => setCropIodRatio(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 float cropIodRatio
      {
          get => GetcropIodRatio();
          set => SetcropIodRatio(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 float getCropIodRatio() throws FaceException
      public void setCropIodRatio(float cropIodRatio) 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 cropIodRatio: Float
          get {
              return try! getCropIodRatio()
          }
      }


    **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_GetCropIodRatio (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, float * cropIodRatio)
      int id3FacePortraitProcessor_SetCropIodRatio (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, float cropIodRatio)

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

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

