Maven module :un.api : api-image :
Class : un.api.image.color.DirectColorModel
Extends/Implements : un.api.image.color.AbstractColorModel
Subclasses : -

Usual image storage formats are made to store colors, threfor once
the sample value is readed, minimum adjustment are necesseray to obtain a color.
Supported sample types are :
BYTE UBYTE -> expected to be range 0-255
FLOAT DOUBLE -> expected to be range 0-1
author  Johann Sorel


Variables : -
Functions : DirectColorModel, getMapping, isAlphaPreMultiplied, toColor, toColorARGB, toSample, toSample




param  rawModel
param  mapping sample indexes to RGBA mapping. use -1 for not provided.
must be of size 4, in order R G B A
param  alphaPremultiplied indicate the sample values are already alpha premultiplied.
value is interesting only if an alpha band exist.
public void DirectColorModel (RawModel rawModel, int[] mapping, boolean alphaPremultiplied)

public int[] getMapping ()

public boolean isAlphaPreMultiplied ()

public Color toColor (Object sample)

public int toColorARGB (Object sample)

public Object toSample (Color color)

public Object toSample (int color)