.. index:: 
  !PortraitProcessor.maximumHeadWidthRatio Property

.. _id3_face_portrait_processor_maximum_head_width_ratio_class_member:

===============================================================================
PortraitProcessor.maximumHeadWidthRatio Property
===============================================================================

Module: :ref:`PortraitProcessor<id3_face_portrait_processor_class>`

Type: int

Definition
----------

Value indicating if the image width is conform to the (image width / head width) ratio of 7:5.

The head width is defined as the distance between the left and right ears.

For ICAO compliance, the value must be in the range 50 to 75.

.. hint:: Default value is 75.


.. tab-set::

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

    .. code:: Python

      maximum_head_width_ratio: 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 maximumHeadWidthRatio => getMaximumHeadWidthRatio();
      set maximumHeadWidthRatio(int value) => setMaximumHeadWidthRatio(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 maximumHeadWidthRatio
      {
          get => GetmaximumHeadWidthRatio();
          set => SetmaximumHeadWidthRatio(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 getMaximumHeadWidthRatio() throws FaceException
      public void setMaximumHeadWidthRatio(int maximumHeadWidthRatio) 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 maximumHeadWidthRatio: Int
          get {
              return Int(try! getMaximumHeadWidthRatio())
          }
      }


    **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_GetMaximumHeadWidthRatio (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int * maximumHeadWidthRatio)
      int id3FacePortraitProcessor_SetMaximumHeadWidthRatio (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int maximumHeadWidthRatio)

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

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

