Package com.ribs.pdf
Class PDFImageColorModel
java.lang.Object
java.awt.image.ColorModel
com.ribs.pdf.PDFImageColorModel
- All Implemented Interfaces:
- Transparency
- 
Field SummaryFields inherited from class java.awt.image.ColorModelpixel_bits, transferTypeFields inherited from interface java.awt.TransparencyBITMASK, OPAQUE, TRANSLUCENT
- 
Constructor SummaryConstructorsConstructorDescriptionPDFImageColorModel(ColorSpace space, int bits, int[] significantBits, boolean hasalpha, int transferType) 
- 
Method SummaryModifier and TypeMethodDescriptioncoerceData(WritableRaster r, boolean premultipliedAlpha) static PDFImageColorModelcreatePDFModel(ColorSpace space, int bps, float[] decodemins, float[] decodemaxs, boolean hasalpha) static WritableRastercreatePDFRaster(byte[] packedbytes, com.ribs.pdf.SoftMask mask, ColorSpace space, int bps, int w, int h) static WritableRastercreatePDFRaster(byte[] packedbytes, ColorSpace space, int bps, int w, int h) intgetAlpha(int pixel) intgetBlue(int pixel) intgetGreen(int pixel) intReturns the number of color components present in the input pixelsintgetRed(int pixel) intgetRGB(int pixel) intconvert an array of elements, whose size is defined by the transfertype, into sRGB+alpha.voidinit(int bps, float[] decodemins, float[] decodemaxs) booleanvoidsetSoftMask(com.ribs.pdf.SoftMask m) Specify softmask (alpha) information for this imageMethods inherited from class java.awt.image.ColorModelcreateCompatibleSampleModel, createCompatibleWritableRaster, equals, finalize, getAlpha, getAlphaRaster, getBlue, getColorSpace, getComponents, getComponents, getComponentSize, getComponentSize, getDataElement, getDataElement, getDataElements, getDataElements, getDataElements, getGreen, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRed, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied, isCompatibleSampleModel, toString
- 
Constructor Details- 
PDFImageColorModelpublic PDFImageColorModel(ColorSpace space, int bits, int[] significantBits, boolean hasalpha, int transferType) 
 
- 
- 
Method Details- 
createPDFModelpublic static PDFImageColorModel createPDFModel(ColorSpace space, int bps, float[] decodemins, float[] decodemaxs, boolean hasalpha) 
- 
createPDFRasterpublic static WritableRaster createPDFRaster(byte[] packedbytes, ColorSpace space, int bps, int w, int h) 
- 
createPDFRasterpublic static WritableRaster createPDFRaster(byte[] packedbytes, com.ribs.pdf.SoftMask mask, ColorSpace space, int bps, int w, int h) 
- 
initpublic void init(int bps, float[] decodemins, float[] decodemaxs) 
- 
setSoftMaskpublic void setSoftMask(com.ribs.pdf.SoftMask m) Specify softmask (alpha) information for this image
- 
getNumSourceComponentspublic int getNumSourceComponents()Returns the number of color components present in the input pixels
- 
coerceData- Overrides:
- coerceDatain class- ColorModel
 
- 
isCompatibleRaster- Overrides:
- isCompatibleRasterin class- ColorModel
 
- 
getRGBpublic int getRGB(int pixel) - Overrides:
- getRGBin class- ColorModel
 
- 
getRedpublic int getRed(int pixel) - Specified by:
- getRedin class- ColorModel
 
- 
getGreenpublic int getGreen(int pixel) - Specified by:
- getGreenin class- ColorModel
 
- 
getBluepublic int getBlue(int pixel) - Specified by:
- getBluein class- ColorModel
 
- 
getAlphapublic int getAlpha(int pixel) - Specified by:
- getAlphain class- ColorModel
 
- 
getRGBconvert an array of elements, whose size is defined by the transfertype, into sRGB+alpha. First we normalize the components and then let the saved pdf colorspace convert into sRGB. We then merge in the alpha to get a pixel.- Overrides:
- getRGBin class- ColorModel
 
 
-