Package javax.media.jai

Examples of javax.media.jai.Interpolation


/*     */   public RenderedImage create(ParameterBlock args, RenderingHints hints)
/*     */   {
/*  63 */     RenderedImage source = args.getRenderedSource(0);
/*  64 */     float xTrans = args.getFloatParameter(0);
/*  65 */     float yTrans = args.getFloatParameter(1);
/*  66 */     Interpolation interp = (Interpolation)args.getObjectParameter(2);
/*     */
/*  69 */     ImageLayout layout = RIFUtil.getImageLayoutHint(hints);
/*     */
/*  71 */     if ((Math.abs(xTrans - (int)xTrans) < 0.01F) && (Math.abs(yTrans - (int)yTrans) < 0.01F) && (layout == null))
/*     */     {
View Full Code Here


/*  75 */     RenderedImage source = paramBlock.getRenderedSource(0);
/*  76 */     float xScale = paramBlock.getFloatParameter(0);
/*  77 */     float yScale = paramBlock.getFloatParameter(1);
/*  78 */     float xTrans = paramBlock.getFloatParameter(2);
/*  79 */     float yTrans = paramBlock.getFloatParameter(3);
/*  80 */     Interpolation interp = (Interpolation)paramBlock.getObjectParameter(4);
/*     */
/*  85 */     if ((xScale == 1.0F) && (yScale == 1.0F) && (xTrans == 0.0F) && (yTrans == 0.0F))
/*     */     {
/*  87 */       return new CopyOpImage(source, renderHints, layout);
/*     */     }
View Full Code Here

/*     */
/* 239 */     float scale_x = paramBlock.getFloatParameter(0);
/* 240 */     float scale_y = paramBlock.getFloatParameter(1);
/* 241 */     float trans_x = paramBlock.getFloatParameter(2);
/* 242 */     float trans_y = paramBlock.getFloatParameter(3);
/* 243 */     Interpolation interp = (Interpolation)paramBlock.getObjectParameter(4);
/*     */
/* 246 */     float x0 = source.getMinX();
/* 247 */     float y0 = source.getMinY();
/* 248 */     float w = source.getWidth();
/* 249 */     float h = source.getHeight();
View Full Code Here

/*     */
/*  77 */     Object arg0 = paramBlock.getObjectParameter(0);
/*  78 */     AffineTransform transform = (AffineTransform)arg0;
/*     */
/*  80 */     Object arg1 = paramBlock.getObjectParameter(1);
/*  81 */     Interpolation interp = (Interpolation)arg1;
/*     */
/*  83 */     double[] backgroundValues = (double[])paramBlock.getObjectParameter(2);
/*     */
/*  85 */     SampleModel sm = source.getSampleModel();
/*  86 */     boolean isBinary = ((sm instanceof MultiPixelPackedSampleModel)) && (sm.getSampleSize(0) == 1) && ((sm.getDataType() == 0) || (sm.getDataType() == 1) || (sm.getDataType() == 3));
View Full Code Here

/* 308 */     RenderableImage source = paramBlock.getRenderableSource(0);
/* 309 */     Object arg0 = paramBlock.getObjectParameter(0);
/* 310 */     AffineTransform forward_tr = (AffineTransform)arg0;
/*     */
/* 312 */     Object arg1 = paramBlock.getObjectParameter(1);
/* 313 */     Interpolation interp = (Interpolation)arg1;
/*     */
/* 317 */     double[] tr = new double[6];
/* 318 */     forward_tr.getMatrix(tr);
/*     */
/* 323 */     if ((tr[0] == 1.0D) && (tr[3] == 1.0D) && (tr[2] == 0.0D) && (tr[1] == 0.0D) && (tr[4] == 0.0D) && (tr[5] == 0.0D))
View Full Code Here

/*    */
/* 64 */     BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);
/*    */
/* 66 */     RenderedImage source = paramBlock.getRenderedSource(0);
/* 67 */     Warp warp = (Warp)paramBlock.getObjectParameter(0);
/* 68 */     Interpolation interp = (Interpolation)paramBlock.getObjectParameter(1);
/*    */
/* 70 */     double[] backgroundValues = (double[])paramBlock.getObjectParameter(2);
/*    */
/* 72 */     if ((interp instanceof InterpolationNearest)) {
/* 73 */       return new WarpNearestOpImage(source, renderHints, layout, warp, interp, backgroundValues);
View Full Code Here

/*     */ {
/*     */   public RenderedImage create(ParameterBlock args, RenderingHints hints)
/*     */   {
/*  64 */     ImageLayout layout = RIFUtil.getImageLayoutHint(hints);
/*     */
/*  66 */     Interpolation interp = (Interpolation)args.getObjectParameter(4);
/*     */
/*  68 */     RenderedImage source = args.getRenderedSource(0);
/*     */
/*  70 */     if ((!MediaLibAccessor.isMediaLibCompatible(args, layout)) || (!MediaLibAccessor.hasSameNumBands(args, layout)) || (source.getTileWidth() >= 32768) || (source.getTileHeight() >= 32768))
/*     */     {
View Full Code Here

/*     */ {
/*     */   public RenderedImage create(ParameterBlock args, RenderingHints hints)
/*     */   {
/*  61 */     ImageLayout layout = RIFUtil.getImageLayoutHint(hints);
/*     */
/*  63 */     Interpolation interp = (Interpolation)args.getObjectParameter(3);
/*  64 */     double[] backgroundValues = (double[])args.getObjectParameter(4);
/*     */
/*  66 */     RenderedImage source = args.getRenderedSource(0);
/*     */
/*  68 */     if ((!MediaLibAccessor.isMediaLibCompatible(args, layout)) || (!MediaLibAccessor.hasSameNumBands(args, layout)) || (source.getTileWidth() >= 32768) || (source.getTileHeight() >= 32768))
View Full Code Here

/*    */     }
/*    */
/* 89 */     int scaleX = paramBlock.getIntParameter(0);
/* 90 */     int scaleY = paramBlock.getIntParameter(1);
/* 91 */     float[] qsFilter = (float[])paramBlock.getObjectParameter(2);
/* 92 */     Interpolation interp = (Interpolation)paramBlock.getObjectParameter(3);
/*    */
/* 94 */     return new MlibFilteredSubsampleOpImage(source, extender, renderHints, layout, scaleX, scaleY, qsFilter, interp);
/*    */   }
View Full Code Here

/* 71 */     ImageLayout layout = renderHints == null ? null : (ImageLayout)renderHints.get(JAI.KEY_IMAGE_LAYOUT);
/*    */
/* 74 */     int scaleX = paramBlock.getIntParameter(0);
/* 75 */     int scaleY = paramBlock.getIntParameter(1);
/* 76 */     float[] qsFilter = (float[])paramBlock.getObjectParameter(2);
/* 77 */     Interpolation interp = (Interpolation)paramBlock.getObjectParameter(3);
/*    */
/* 80 */     SampleModel sm = source.getSampleModel();
/* 81 */     int dataType = sm.getDataType();
/*    */
/* 84 */     boolean validInterp = ((interp instanceof InterpolationNearest)) || ((interp instanceof InterpolationBilinear)) || ((interp instanceof InterpolationBicubic)) || ((interp instanceof InterpolationBicubic2));
View Full Code Here

TOP

Related Classes of javax.media.jai.Interpolation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.