Package java.awt.image

Examples of java.awt.image.RenderedImage


            return RecentCursor;
        }
        try {
            String path = "resources/resize.png";
            URL url = CropOverlay.class.getResource(path);
            RenderedImage resourceImage = ImageIO.read(url);
            int cx = resourceImage.getWidth() / 2;
            int cy = resourceImage.getHeight() / 2;
            RenderedOp rotatedImage = RotateDescriptor.create(
                resourceImage,
                (float) cx, (float) cy, (float) angle,
                Interpolation.getInstance(Interpolation.INTERP_BICUBIC),
                null, null
View Full Code Here


        private double last_radius = 0;
        private double last_fuzz = 0;

        public PlanarImage setFront() {
            if (lastBack.get() != back || mask.get() == null || depth != last_radius || fuzz != last_fuzz) {
                RenderedImage singleChannel;
                if (back.getColorModel().getNumComponents() == 3) {
                    double[][] yChannel = new double[][]{{ColorScience.Wr, ColorScience.Wg, ColorScience.Wb, 0}};

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

                String text = getDisabledEditorText();
                editor.setDisabledText(text);
            }
            for (PreviewUpdater preview : previews) {
                // Install each preview in the DisabledEditor display:
                RenderedImage image = preview.getImage(
                    new PreviewUpdater.Observer() {
                        public void imageChanged(
                            PreviewUpdater updater, RenderedImage image
                        ) {
                            // This callback could come at any time,
View Full Code Here

        }
    }

    class DesaturateInvertProcessor implements ImageProcessor {
        public RenderedOp process(RenderedImage source) {
            RenderedImage singleChannel;
            if (source.getColorModel().getNumComponents() == 3) {
                double[][] yChannel = new double[][]{{ColorScience.Wr, ColorScience.Wg, ColorScience.Wb, 0}};

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

        public PlanarImage setFront() {
            // Calculate a blurred desautuated inverted version of the source as a mask
            PlanarImage front = Functions.gaussianBlur(back, rendering, op, desaturateInvert, radius * scale);

            if (detail > 0) {
                RenderedImage singleChannel;
                if (back.getColorModel().getNumComponents() == 3) {
                    double[][] yChannel = new double[][]{{ColorScience.Wr, ColorScience.Wg, ColorScience.Wb, 0}};

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

                return null;
            }
            Document doc = Application.createDocumentHeadless(file);
            Engine engine = doc.getEngine();
            Dimension dim = new Dimension(size, size);
            RenderedImage preview = engine.getRendering(dim);
            // divorce the preview from the document
            preview = new CachedImage(
                (PlanarImage) preview, JAIContext.fileCache
            );
            doc.dispose();
View Full Code Here

        }

  if (!modeName.equalsIgnoreCase("rendered"))
      return true;

  RenderedImage src = args.getRenderedSource(0);

        int bands = src.getSampleModel().getNumBands();

        if (bands % 2 != 0) {
            msg.append(getName() + " " +
                       JaiI18N.getString("MagnitudeDescriptor1"));
            return false;
View Full Code Here

  if (!modeName.equalsIgnoreCase("rendered"))
      return true;

  // Get the source and the CDF array.
        RenderedImage src = args.getRenderedSource(0);

        float[][] CDF = (float[][])args.getObjectParameter(0);

        // Ensure that the Histogram is available and that the CDF array
  // is appropriate for it.
  Object prop = src.getProperty("histogram");
  if(prop == null || prop.equals(Image.UndefinedProperty)) {
            // Property is null or undefined.
            msg.append(getName() + " " +
                       JaiI18N.getString("MatchCDFDescriptor1"));
            return false;
View Full Code Here

            // Duplicate the upSampler op chain.
            RenderedOp upOp = duplicate(upSampler, vectorize(currentImage));

            // Retrieve diff image for this level.
            RenderedImage diffImage =
                (RenderedImage)diffImages.elementAt(currentLevel);
            diffImages.removeElementAt(currentLevel);

            RenderedOp combOp = duplicate(combiner,
                                          vectorize(upOp.getRendering(), diffImage));
View Full Code Here

    public synchronized RenderedImage getImage(Observer observer) {
        if ( !done && !isAlive() ) {
            // Try for the cached result synchronously, and maybe avoid
            // spawning the thread:

            RenderedImage cachedImage = null;
            final ImageType t = meta.getImageType();

            if ( t != null && t.hasFastPreview() ) {
                cachedImage =
                    Thumbnailer.getImage( meta.getFile(), PreviewSize, false );
View Full Code Here

TOP

Related Classes of java.awt.image.RenderedImage

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.