/**
* Construct an alpah channel from the given src, according to
* the SVG masking rules.
*
* @param src The image to convert to an alpha channel (mask image)
*/
public FilterAsAlphaRed(CachableRed src) {
super(new Any2LumRed(src),src.getBounds(),
new ComponentColorModel
(ColorSpace.getInstance(ColorSpace.CS_GRAY),
new int [] {8}, false, false,
Transparency.OPAQUE,
DataBuffer.TYPE_BYTE),
new PixelInterleavedSampleModel
(DataBuffer.TYPE_BYTE,
src.getSampleModel().getWidth(),
src.getSampleModel().getHeight(),
1, src.getSampleModel().getWidth(),
new int [] { 0 }),
src.getTileGridXOffset(),
src.getTileGridYOffset(),
null);
props.put(ColorSpaceHintKey.PROPERTY_COLORSPACE,
ColorSpaceHintKey.VALUE_COLORSPACE_ALPHA);
}
FilterAsAlphaRed.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:Push2Display
作者:
评论列表
文章目录