Package magick
Class PixelPacket
java.lang.Object
magick.Magick
magick.PixelPacket
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getBlue()
Get the blue channel value.static PixelPacket
Converts a web (i.e.int
getGreen()
Get the green channel value.int
Get the opacity/alpha channel value.int
getRed()
Get the red channel value.static PixelPacket
queryColorDatabase
(String target) looks up a RGB values for a color given in the target string.void
setBlue
(int blue) Set the blue channel value.void
setGreen
(int green) Set the green channel value.void
setOpacity
(int opacity) Set the opacity/alpha channel value.void
setRed
(int red) Set the red channel value.toString()
Display the object as a StringMethods inherited from class magick.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
Display the object as a String
-