Example usage for java.awt.image IndexColorModel getBlue

List of usage examples for java.awt.image IndexColorModel getBlue

Introduction

In this page you can find the example usage for java.awt.image IndexColorModel getBlue.

Prototype

public final int getBlue(int pixel) 

Source Link

Document

Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.

Usage

From source file:org.apache.fop.render.pdf.ImageRenderedAdapter.java

/** {@inheritDoc} */
@Override//from   w  ww.  ja v a 2s. c o  m
public PDFColor getTransparentColor() {
    ColorModel cm = getEffectiveColorModel();
    if (cm instanceof IndexColorModel) {
        IndexColorModel icm = (IndexColorModel) cm;
        if (cm.getTransparency() == IndexColorModel.TRANSLUCENT) {
            int transPixel = icm.getTransparentPixel();
            return new PDFColor(icm.getRed(transPixel), icm.getGreen(transPixel), icm.getBlue(transPixel));
        }
    }
    return new PDFColor(getImage().getTransparentColor());
}