Package com.lightcrafts.mediax.jai

Examples of com.lightcrafts.mediax.jai.Interpolation


        float scale_x = paramBlock.getFloatParameter(0);
        float scale_y = paramBlock.getFloatParameter(1);
        float trans_x = paramBlock.getFloatParameter(2);
        float trans_y = paramBlock.getFloatParameter(3);
        Interpolation interp = (Interpolation)paramBlock.getObjectParameter(4);

  // Get the source dimensions
  float x0 = (float)source.getMinX();
  float y0 = (float)source.getMinY() ;
  float w = (float)source.getWidth();
View Full Code Here


        float x_center = paramBlock.getFloatParameter(0);
        float y_center = paramBlock.getFloatParameter(1);
        float angle = paramBlock.getFloatParameter(2);

        Object arg1 = paramBlock.getObjectParameter(3);
        Interpolation interp = (Interpolation)arg1;

        double[] backgroundValues = (double[]) paramBlock.getObjectParameter(4);

        SampleModel sm = source.getSampleModel();
        boolean isBinary = (sm instanceof MultiPixelPackedSampleModel) &&
View Full Code Here

        RenderableImage source = paramBlock.getRenderableSource(0);

        float x_center = paramBlock.getFloatParameter(0);
        float y_center = paramBlock.getFloatParameter(1);
        float angle = paramBlock.getFloatParameter(2);
        Interpolation interp = (Interpolation)paramBlock.getObjectParameter(3);

        //
        // Convert angle to degrees (within some precision) given PI's
        // transcendantal nature. All this, to check if we can call
        // simpler methods like Copy or Transpose for certain angles
View Full Code Here

        // Get BorderExtender from renderHints if any.
        BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);

        RenderedImage source = paramBlock.getRenderedSource(0);
        Warp warp = (Warp)paramBlock.getObjectParameter(0);
        Interpolation interp = (Interpolation)paramBlock.getObjectParameter(1);

        double[] backgroundValues = (double[])paramBlock.getObjectParameter(2);

        if (interp instanceof InterpolationNearest) {
            return new WarpNearestOpImage(source,
View Full Code Here

      }

      args.set(filter, 2);
  }

        Interpolation interp = (Interpolation)args.getObjectParameter(3);

        // Determine the interpolation type, if not supported throw exception
        if (!((interp instanceof InterpolationNearest||
            (interp instanceof InterpolationBilinear) ||
            (interp instanceof InterpolationBicubic||
View Full Code Here

            if (srcROI.getBounds().isEmpty()) {
                return java.awt.Image.UndefinedProperty;
            }

            // Retrieve the Interpolation object.
            Interpolation interp = (Interpolation)pb.getObjectParameter(1);

            // Determine the effective source bounds.
            Rectangle srcBounds = null;
            PlanarImage dst = op.getRendering();
            if (dst instanceof GeometricOpImage &&
                ((GeometricOpImage)dst).getBorderExtender() == null) {
                srcBounds =
                    new Rectangle(src.getMinX() + interp.getLeftPadding(),
                                  src.getMinY() + interp.getTopPadding(),
                                  src.getWidth() - interp.getWidth() + 1,
                                  src.getHeight() - interp.getHeight() + 1);
            } else {
                srcBounds = new Rectangle(src.getMinX(),
            src.getMinY(),
            src.getWidth(),
            src.getHeight());
            }

            // If necessary, clip the ROI to the effective source bounds.
            if(!srcBounds.contains(srcROI.getBounds())) {
                srcROI = srcROI.intersect(new ROIShape(srcBounds));
            }

            // Set the nearest neighbor interpolation object.
            Interpolation interpNN = interp instanceof InterpolationNearest ?
                interp :
                Interpolation.getInstance(Interpolation.INTERP_NEAREST);

            // Retrieve the Warp object.
            Warp warp = (Warp)pb.getObjectParameter(0);
View Full Code Here

        Object arg0 = paramBlock.getObjectParameter(0);
        AffineTransform transform = (AffineTransform)arg0;

        Object arg1 = paramBlock.getObjectParameter(1);
        Interpolation interp = (Interpolation)arg1;

  double[] backgroundValues = (double[]) paramBlock.getObjectParameter(2);

        SampleModel sm = source.getSampleModel();
        boolean isBinary = (sm instanceof MultiPixelPackedSampleModel) &&
View Full Code Here

        RenderableImage source = paramBlock.getRenderableSource(0);
        Object arg0 = paramBlock.getObjectParameter(0);
        AffineTransform forward_tr = (AffineTransform)arg0;

        Object arg1 = paramBlock.getObjectParameter(1);
        Interpolation interp = (Interpolation)arg1;

        // Get the affine transform
        double tr[];
        tr = new double[6];
        forward_tr.getMatrix(tr);
View Full Code Here

                                dstROI.getHeight()/rendering.getHeight());
        }

        // Translate (and scale) the result if necessary.
        if(!postTransform.isIdentity()) {
            Interpolation interp =
                Interpolation.getInstance(Interpolation.INTERP_NEAREST);
            RenderingHints hints = renderContext.getRenderingHints();
            if(hints != null && hints.containsKey(JAI.KEY_INTERPOLATION)) {
                interp = (Interpolation)hints.get(JAI.KEY_INTERPOLATION);
            }
View Full Code Here

    public RenderedImage create(ParameterBlock paramBlock,
                                RenderingHints renderHints) {
        RenderedImage source = paramBlock.getRenderedSource(0);
        float xTrans = paramBlock.getFloatParameter(0);
        float yTrans = paramBlock.getFloatParameter(1);
        Interpolation interp = (Interpolation)
            paramBlock.getObjectParameter(2);

  // Get ImageLayout from renderHints if any.
  ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.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.