Skip to content

ImageConvertOptions

Type

ImageConvertOptions

Contains various options for converting an image from one pixel format to another.

See:

Constants

Name Value
MASK_NONE 0
MASK_COLOUR 1
MASK_ALPHA 2
MASK_BRIGHTNESS 3

Properties

Property Type Description
paletteCurrent Palette The palette to use for the target image if it is 8-bit indexed but has no internal palette
paletteTarget Palette The palette to convert to
maskSource integer What to use to generate the alpha channel in the converted image. See MASK_ constants above
maskColour Colour The colour to use as transparent if maskSource is set to MASK_COLOUR
alphaThreshold integer The threshold 8-bit alpha value to use in cases where the target image format does not support a full alpha channel. Anything less than this will be fully transparent
transparency boolean If false, all pixels in the converted image will be set to fully opaque
pixelFormat integer The pixel format to use if the target image format supports multiple (see Image.PIXELFORMAT_ constants)

Constructors

ImageConvertOptions.new()

Creates a new ImageConvertOptions with the following default properties:

  • maskSource: MASK_ALPHA
  • alphaThreshold: 0
  • transparency: true