Class PixelPacket
java.lang.Object
magick.Magick
magick.PixelPacket
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetBlue()Get the blue channel value.static PixelPacketConverts a web (i.e.intgetGreen()Get the green channel value.intGet the opacity/alpha channel value.intgetRed()Get the red channel value.static PixelPacketqueryColorDatabase(String target) looks up a RGB values for a color given in the target string.voidsetBlue(int blue) Set the blue channel value.voidsetGreen(int green) Set the green channel value.voidsetOpacity(int opacity) Set the opacity/alpha channel value.voidsetRed(int red) Set the red channel value.toString()Display the object as a StringMethods inherited from class Magick
parseImageGeometry, queryFonts
-
Constructor Details
-
PixelPacket
public PixelPacket(int red, int green, int blue, int opacity) Constructor- Parameters:
red- the red channel valuegreen- the green channel valueblue- the blue channel valueopacity- the opacity/alpha channel value
-
-
Method Details
-
setRed
public void setRed(int red) Set the red channel value.- Parameters:
red- the new red channel value
-
setGreen
public void setGreen(int green) Set the green channel value.- Parameters:
green- the new green channel value
-
setBlue
public void setBlue(int blue) Set the blue channel value.- Parameters:
blue- the new blue channel value
-
setOpacity
public void setOpacity(int opacity) Set the opacity/alpha channel value.- Parameters:
opacity- the new opacity/alpha channel value
-
getRed
public int getRed()Get the red channel value.- Returns:
- the red channel value
-
getGreen
public int getGreen()Get the green channel value.- Returns:
- the green channel value
-
getBlue
public int getBlue()Get the blue channel value.- Returns:
- the blue channel value
-
getOpacity
public int getOpacity()Get the opacity/alpha channel value.- Returns:
- the opacity/alpha channel value
-
queryColorDatabase
looks up a RGB values for a color given in the target string.- Parameters:
target- Specifies the color to lookup in the X color database- Returns:
- a PixelPacket that represents the target
- Throws:
MagickException- on error
-
getColor
Converts a web (i.e. css-compliant) color string to a pixel packet.- Parameters:
target- Specifies the color string to convert- Returns:
- a PixelPacket that represents the target
- Throws:
MagickException- on error
-
toString
-