Package magick
Class PixelPacket
- java.lang.Object
-
- magick.Magick
-
- magick.PixelPacket
-
public class PixelPacket extends Magick
-
-
Constructor Summary
Constructors Constructor Description PixelPacket(int red, int green, int blue, int opacity)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBlue()
Get the blue channel value.static PixelPacket
getColor(java.lang.String target)
Converts a web (i.e.int
getGreen()
Get the green channel value.int
getOpacity()
Get the opacity/alpha channel value.int
getRed()
Get the red channel value.static PixelPacket
queryColorDatabase(java.lang.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.java.lang.String
toString()
Display the object as a String-
Methods inherited from class magick.Magick
parseImageGeometry, queryFonts
-
-
-
-
Method Detail
-
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
public static PixelPacket queryColorDatabase(java.lang.String target) throws MagickException
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
public static PixelPacket getColor(java.lang.String target) throws MagickException
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
public java.lang.String toString()
Display the object as a String- Overrides:
toString
in classjava.lang.Object
-
-