Examples of addSource()


Examples of java.awt.image.renderable.ParameterBlock.addSource()

            int sourceWidth = source.getWidth();
            int sourceHeight = source.getHeight();
            if(!MathJAI.isPositivePowerOf2(sourceWidth) ||
               !MathJAI.isPositivePowerOf2(sourceHeight)) {
                ParameterBlock pb = new ParameterBlock();
                pb.addSource(source);
                pb.add(0);
                pb.add(MathJAI.nextPositivePowerOf2(sourceWidth) -
                       sourceWidth);
                pb.add(0);
                pb.add(MathJAI.nextPositivePowerOf2(sourceHeight) -
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

            int sourceWidth = source.getWidth();
            int sourceHeight = source.getHeight();
            if(!MathJAI.isPositivePowerOf2(sourceWidth) ||
               !MathJAI.isPositivePowerOf2(sourceHeight)) {
                ParameterBlock pb = new ParameterBlock();
                pb.addSource(source);
                pb.add(0);
                pb.add(MathJAI.nextPositivePowerOf2(sourceWidth) -
                       sourceWidth);
                pb.add(0);
                pb.add(MathJAI.nextPositivePowerOf2(sourceHeight) -
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

            RenderingHints formatHints = new RenderingHints(JAI.KEY_BORDER_EXTENDER, BorderExtender.createInstance(BorderExtender.BORDER_COPY));

            Interpolation interp = Interpolation.getInstance(Interpolation.INTERP_BICUBIC_2);
            ParameterBlock params = new ParameterBlock();
            params.addSource(printImage);
            params.add(xform);
            params.add(interp);
            printImage = JAI.create("Affine", params, formatHints);
        }
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

        ScaledImage contourImage = new ScaledImage();

        if (contourWidth > 1) {
            KernelJAI kernel = Functions.getGaussKernel(contourWidth/4);
            ParameterBlock pb = new ParameterBlock();
            pb.addSource(supportImage);
            pb.add(kernel);
            RenderingHints hints = new RenderingHints(JAI.KEY_BORDER_EXTENDER, extender);

            contourImage.image = JAI.create("LCSeparableConvolve", pb, hints);
        } else
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

                            RenderingHints hints = new RenderingHints(JAI.KEY_BORDER_EXTENDER,
                                                                      BorderExtender.createInstance(BorderExtender.BORDER_COPY));
                            // hints.add(JAIContext.noCacheHint);
                            Interpolation interp = Interpolation.getInstance(Interpolation.INTERP_BILINEAR);
                            ParameterBlock params = new ParameterBlock();
                            params.addSource(maskImage);
                            params.add(transform);
                            params.add(interp);
                            maskImage = JAI.create("Affine", params, hints);
                            expandedMasks.put(key, maskImage);
                        } else {
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

                                                                             rgbImage.getHeight() / 2);

                SampleModel sm = colorModel.createCompatibleSampleModel(JAIContext.TILE_WIDTH, JAIContext.TILE_HEIGHT);

                final ParameterBlock pb2 = new ParameterBlock();
                pb2.addSource(rgbImage);
                pb2.add(rotation);
                pb2.add(interp);
                RenderedOp rotated = JAI.create("Affine", pb2, null);

                ImageLayout rotatedLayout = new ImageLayout(rotated.getBounds().x, rotated.getBounds().y,
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

                                                        sm, colorModel);

                hints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, newLayout));

                final ParameterBlock pb2 = new ParameterBlock();
                pb2.addSource(rgbImage);
                pb2.add(AffineTransform.getScaleInstance(3.0 / 4.0, 3.0 / 2.0));
                pb2.add(interp);
                rgbImage = JAI.create("Affine", pb2, hints);
            } else {
                rgbImage = Functions.crop(rgbImage,
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

public class Functions {
    public static boolean DEBUG = false;

    static public RenderedOp crop(RenderedImage image, float x, float y, float width, float height, RenderingHints hints) {
        ParameterBlock pb = new ParameterBlock();
        pb.addSource(image);
        pb.add(x);
        pb.add(y);
        pb.add(width);
        pb.add(height);
        return JAI.create("Crop", pb, hints);
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

        } else
            scaleDown = processor != null ? processor.process(image) : image;

        KernelJAI kernel = Functions.getGaussKernel(newRadius);
        ParameterBlock pb = new ParameterBlock();
        pb.addSource(scaleDown);
        pb.add(kernel);
        RenderedOp blur = JAI.create("LCSeparableConvolve", pb, extenderHints);

        if (rescale != 1) {
            pb = new ParameterBlock();
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

        pb.add(kernel);
        RenderedOp blur = JAI.create("LCSeparableConvolve", pb, extenderHints);

        if (rescale != 1) {
            pb = new ParameterBlock();
            pb.addSource(blur);
            pb.add(AffineTransform.getScaleInstance(image.getWidth() / (double) blur.getWidth(),
                                                    image.getHeight() / (double) blur.getHeight()));
            pb.add(interp);
            RenderingHints sourceLayoutHints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT,
                                                                  new ImageLayout(0, 0,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.