Package java.awt.image.renderable

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


                pb.add(color_noise * scale);
                pb.add(0.02f + 0.001f * color_noise);
                ystImage = JAI.create("BilateralFilter", pb, mfHints);

                pb = new ParameterBlock();
                pb.addSource( ystImage );
                pb.add( llab2rgb );
                front = JAI.create("BandCombine", pb, null);
                front.setProperty(JAIContext.PERSISTENT_CACHE_TAG, Boolean.TRUE);
            }

View Full Code Here


        }

        private RenderedOp createBlender(PlanarImage front) {
            // Overlay result on the original image
            ParameterBlock pb = new ParameterBlock();
            pb.addSource(front);
            pb.addSource(back);
            pb.add(blendingMode);
            pb.add(new Double(invertedRegion ? -opacity : opacity));
            pb.add(mask);
            pb.add(colorSelectionMask);
View Full Code Here

        private RenderedOp createBlender(PlanarImage front) {
            // Overlay result on the original image
            ParameterBlock pb = new ParameterBlock();
            pb.addSource(front);
            pb.addSource(back);
            pb.add(blendingMode);
            pb.add(new Double(invertedRegion ? -opacity : opacity));
            pb.add(mask);
            pb.add(colorSelectionMask);
View Full Code Here

                                || (blender != null && blender.getParameters().get(3) != colorSelectionMask))) {

                            PlanarImage labImage = Functions.toColorSpace(back, new LCMS_ColorSpace(new LCMS.LABProfile()),
                                                              LCMSColorConvertDescriptor.RELATIVE_COLORIMETRIC, null);
                            ParameterBlock pb = new ParameterBlock();
                            pb.addSource(labImage);
                            pb.add(new int[]{1, 2});
                            RenderedOp abImage = JAI.create("bandselect", pb, null);

                            pb = new ParameterBlock();
                            pb.addSource(back);
View Full Code Here

                            pb.addSource(labImage);
                            pb.add(new int[]{1, 2});
                            RenderedOp abImage = JAI.create("bandselect", pb, null);

                            pb = new ParameterBlock();
                            pb.addSource(back);
                            pb.add(new double[][]{{ColorScience.Wr, ColorScience.Wg, ColorScience.Wb, 0}});
                            PlanarImage monochrome = JAI.create("BandCombine", pb, null);

                            RenderingHints layoutHints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, Functions.getImageLayout(labImage));
                            // layoutHints.add(JAIContext.noCacheHint);
View Full Code Here

                            PlanarImage monochrome = JAI.create("BandCombine", pb, null);

                            RenderingHints layoutHints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, Functions.getImageLayout(labImage));
                            // layoutHints.add(JAIContext.noCacheHint);
                            pb = new ParameterBlock();
                            pb.addSource(monochrome);
                            pb.addSource(abImage);
                            PlanarImage maskImage = JAI.create("BandMerge", pb, layoutHints);

                            colorSelectionMask = new RGBColorSelectionMaskOpImage(maskImage, getColorSelection(), null);
View Full Code Here

                            RenderingHints layoutHints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, Functions.getImageLayout(labImage));
                            // layoutHints.add(JAIContext.noCacheHint);
                            pb = new ParameterBlock();
                            pb.addSource(monochrome);
                            pb.addSource(abImage);
                            PlanarImage maskImage = JAI.create("BandMerge", pb, layoutHints);

                            colorSelectionMask = new RGBColorSelectionMaskOpImage(maskImage, getColorSelection(), null);

                            ParameterBlock maskPB;
View Full Code Here

                            RenderingHints extenderHints = new RenderingHints(JAI.KEY_BORDER_EXTENDER,
                                                                              BorderExtender.createInstance(BorderExtender.BORDER_COPY));
                            KernelJAI kernel = Functions.getGaussKernel(0.5 * scale);
                            maskPB = new ParameterBlock();
                            maskPB.addSource(colorSelectionMask);
                            maskPB.add(kernel);
                            colorSelectionMask = JAI.create("Convolve", maskPB, extenderHints);

                            lastColorSelection = colorSelection;
                        } else if (colorSelection == null || colorSelection.isAllSelected())
View Full Code Here

                            tiffImage.getSampleModel(),
                            tiffImage.getColorModel()
                        )
                    );
                    final ParameterBlock pb = new ParameterBlock();
                    pb.addSource(tiffImage);
                    pb.add(tiffImage.getSampleModel().getDataType());
                    image = JAI.create("Format", pb, formatHints);
                    image.setProperty(JAIContext.PERSISTENT_CACHE_TAG, Boolean.TRUE);
                } else
                    image = tiffImage;
View Full Code Here

        visibleRect = bounds.intersection(visibleRect);

        if (bounds.contains(visibleRect)) {
            ParameterBlock pb = new ParameterBlock();
            pb.addSource(image);
            pb.add((float) visibleRect.x);
            pb.add((float) visibleRect.y);
            pb.add((float) visibleRect.width);
            pb.add((float) visibleRect.height);
            image = JAI.create("Crop", pb, JAIContext.noCacheHint);
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.