RawColor

Inheritance: java.lang.Object

public final class RawColor

Raw Color Class helps to store colors with any channels count, any color mode and any bit depth Please note, some internal classes can have issues with converting RawColor to its’ native format, so if API provides for you CMYK color, it’s more reliable to use the provided format. Also, there are can be some cases when Raw Color can be converted

Constructors

ConstructorDescription
RawColor(ColorComponent[] components)Initializes a new instance of the RawColor class.
RawColor(PixelDataFormat pixelDataFormat)
RawColor(PixelDataFormat pixelDataFormat, short colorMode)Initializes a new instance of the RawColor class from pixel data format using predefined color modes

Methods

MethodDescription
equals(Object arg0)
getAsInt()Gets the color as int in case it’s possible to get it.
getAsLong()Gets the color as long in case it’s possible to get it.
getBitDepth()Gets the bit depth of Raw Color.
getClass()
getColorMode()Mode for the color to follow.
getColorModeName()Gets the name of the color mode.
getComponents()Gets the components of color.
hashCode()
notify()
notifyAll()
setAsInt(int value)Sets data to all channels from int argument if it’s possible
setAsLong(long value)Sets data to all channels from int argument if it’s possible
setColorMode(short value)Mode for the color to follow.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

RawColor(ColorComponent[] components)

public RawColor(ColorComponent[] components)

Initializes a new instance of the RawColor class.

Parameters:

ParameterTypeDescription
componentsColorComponent[]The custom color components.

RawColor(PixelDataFormat pixelDataFormat)

public RawColor(PixelDataFormat pixelDataFormat)

Parameters:

ParameterTypeDescription
pixelDataFormatPixelDataFormat

RawColor(PixelDataFormat pixelDataFormat, short colorMode)

public RawColor(PixelDataFormat pixelDataFormat, short colorMode)

Initializes a new instance of the RawColor class from pixel data format using predefined color modes

Parameters:

ParameterTypeDescription
pixelDataFormatPixelDataFormatThe pixel data format.
colorModeshort

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAsInt()

public final int getAsInt()

Gets the color as int in case it’s possible to get it.

Returns: int - Channels data stored in Int

getAsLong()

public final long getAsLong()

Gets the color as long in case it’s possible to get it.

Returns: long - Channels data stored in Int

getBitDepth()

public final int getBitDepth()

Gets the bit depth of Raw Color. For example for ARGB color with 8 bits per channel/component is 32 Bit Depth of full ARGB color with 16 bits per channel/component is 64. Bit depth is accumulated from the sum of channels’ bit depths. It’s possible if different channels will have different bit depths.

Returns: int - The sum of all channels bit depths

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getColorMode()

public final short getColorMode()

Mode for the color to follow.

Returns: short

getColorModeName()

public final String getColorModeName()

Gets the name of the color mode. Color mode name accumulated from channels/components names

Returns: java.lang.String - String with the color mode name

getComponents()

public final ColorComponent[] getComponents()

Gets the components of color. Each component is separate channel, and if you use not popular color scheme, it’s better to work with each channel separately

Value: The components of color

Returns: com.aspose.psd.fileformats.psd.rawcolor.ColorComponent[]

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAsInt(int value)

public final void setAsInt(int value)

Sets data to all channels from int argument if it’s possible

Parameters:

ParameterTypeDescription
valueintThe int value that contains component data

setAsLong(long value)

public final void setAsLong(long value)

Sets data to all channels from int argument if it’s possible

Parameters:

ParameterTypeDescription
valuelongThe int value that contains component data

setColorMode(short value)

public final void setColorMode(short value)

Mode for the color to follow.

Parameters:

ParameterTypeDescription
valueshort

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int