本文整理了Java中javax.media.jai.JAI.getRenderingHints()
方法的一些代码示例,展示了JAI.getRenderingHints()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JAI.getRenderingHints()
方法的具体详情如下:
包路径:javax.media.jai.JAI
类名称:JAI
方法名:getRenderingHints
暂无
代码示例来源:origin: geotools/geotools
RenderingHints hints = new Hints(JAI.getDefaultInstance().getRenderingHints());
hints.putAll(GeoTools.getDefaultHints());
return new OpImage(new Vector(sourceImages), il, hints, false) {
代码示例来源:origin: geotools/geotools
private RenderedImage mosaicHeterogeneousImages(List<ImageInTile> sources) {
// at the time of writing, only JAI-EXT mosaic can handle a mix of different
// color models, we need to use it explicitly
RenderedImage image;
final ParameterBlockJAI pb =
new ParameterBlockJAI(new it.geosolutions.jaiext.mosaic.MosaicDescriptor());
for (ImageInTile it : sources) {
if (it.posx != 0 || it.posy != 0) {
ImageWorker iw = new ImageWorker(it.image);
iw.translate(
it.posx, it.posy, Interpolation.getInstance(Interpolation.INTERP_NEAREST));
RenderedImage translated = iw.getRenderedImage();
pb.addSource(translated);
} else {
pb.addSource(it.image);
}
}
pb.setParameter("mosaicType", MosaicDescriptor.MOSAIC_TYPE_OVERLAY);
pb.setParameter("sourceAlpha", null);
pb.setParameter("sourceROI", null);
pb.setParameter("sourceThreshold", null);
pb.setParameter("backgroundValues", new double[] {0});
pb.setParameter("nodata", null);
RenderingHints hints = new Hints(JAI.getDefaultInstance().getRenderingHints());
hints.putAll(GeoTools.getDefaultHints());
image = new MosaicRIF().create(pb, hints);
return image;
}
代码示例来源:origin: GeoWebCache/geowebcache
false,
1,
JAI.getDefaultInstance().getRenderingHints());
double[][] extrema = (double[][]) extremaOp.getProperty("Extrema");
double[] mins = extrema[0];
代码示例来源:origin: it.geosolutions.jaiext.vectorbin/jt-vectorbin
if (hints == null) {
this.hints = JAI.getDefaultInstance().getRenderingHints();
} else {
this.hints = hints;
代码示例来源:origin: geosolutions-it/jai-ext
if (hints == null) {
this.hints = JAI.getDefaultInstance().getRenderingHints();
} else {
this.hints = hints;
代码示例来源:origin: GeoWebCache/geowebcache
/**
* Quantize if the source did not do so already
*
* @param canvas
* @return
*/
@Override
public RenderedImage preprocess(RenderedImage canvas) {
if (!(canvas.getColorModel() instanceof IndexColorModel)) {
if (canvas.getColorModel() instanceof ComponentColorModel
&& canvas.getSampleModel().getDataType() == DataBuffer.TYPE_BYTE) {
ColorIndexer indexer =
new Quantizer(256).subsample().buildColorIndexer(canvas);
if (indexer != null) {
ParameterBlock pb = new ParameterBlock();
pb.setSource(canvas, 0); // The source image.
pb.set(indexer, 0);
canvas =
JAI.create(
"ColorIndexer",
pb,
JAI.getDefaultInstance().getRenderingHints());
}
}
}
return canvas;
}
};
代码示例来源:origin: org.geotools/gt-geopkg
pb.setParameter("nodata", null);
RenderingHints hints = new Hints(JAI.getDefaultInstance().getRenderingHints());
hints.putAll(GeoTools.getDefaultHints());
image = new MosaicRIF().create(pb, hints);
内容来源于网络,如有侵权,请联系作者删除!