class_docstr: Converter for images
class_docstr_tok: ["Converter","for","images"]
docstr: Initialize converter.
  
  Args:
    image: input image.
    image_convert_settings: ImageConvertSettings object.
docstr_tok: ["Initialize","converter",".","Args",":","image",":","input","image",".","image_convert_settings",":","ImageConvertSettings","object","."]
code: def __init__(self, image, image_convert_settings):
      """Initialize converter.
  
      Args:
        image: input image.
        image_convert_settings: ImageConvertSettings object.
      """
      self._orig_img = image
      self._settings = image_convert_settings
  
      self._desired_size = (
          image_convert_settings.width,
          image_convert_settings.height,
      )
      self._desired_format = str(image_convert_settings.format).lower()
      self._preserve_aspect_ratio = (
          image_convert_settings.preserve_aspect_ratio
      )
      self._resize_if_larger = image_convert_settings.resize_if_larger
      self._position = (
          image_convert_settings.position
      )  # Tuple (x, y) as decimal.
  
      # Background settings
      self._bg_mode = image_convert_settings.bg_mode
      self._bg_color = image_convert_settings.bg_color
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl import logging
  from PIL import Image
  from PIL import ImageOps
label_desc: Use image node_id 1 to create a new ImageConverter object from inherited base classes: object with example: obj = ImageConverter(image, image_convert_settings)