Package java.awt.image.renderable

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


        int padBottom = (tileLength - (length % tileLength)) % tileLength;
        if (!isTiled)
            padBottom = 0;
        if (padRight > 0 || padBottom > 0) {
            ParameterBlock pb = new ParameterBlock();
            pb.addSource(image);
            pb.add(null)
                    .add(padRight)
                    .add(null)
                    .add(padBottom)
                    .add(null)
View Full Code Here


    if (DebugFile.trace) DebugFile.writeln("scale height " + String.valueOf(scaleH));

    oBlk = new ParameterBlock();

    oBlk.addSource(oPlI);

    oBlk.add(scaleW);
    oBlk.add(scaleH);
    oBlk.add(0.0f);
    oBlk.add(0.0f);
View Full Code Here

          // create the mosaic image
          ParameterBlock pbMosaic = new ParameterBlock();
          pbMosaic.add(MosaicDescriptor.MOSAIC_TYPE_OVERLAY);
          for (RenderedImage renderedImage : images) {
            pbMosaic.addSource(renderedImage);
          }
          RenderedOp mosaic = JAI.create("mosaic", pbMosaic, new RenderingHints(JAI.KEY_IMAGE_LAYOUT,
              imageLayout));
          try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

            // create the mosaic image
            ParameterBlock pbMosaic = new ParameterBlock();
            pbMosaic.add(MosaicDescriptor.MOSAIC_TYPE_OVERLAY);
            for (RenderedImage renderedImage : images) {
              pbMosaic.addSource(renderedImage);
            }
            RenderedOp mosaic = JAI.create("mosaic", pbMosaic, new RenderingHints(JAI.KEY_IMAGE_LAYOUT,
                imageLayout));
            try {
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

   */
  public static BufferedImage rotateImage(Image inputImage, int degrees) {
    BufferedImage retVal = null;
    RenderedImage ri = JAI.create("awtImage", inputImage);
    ParameterBlock pb = new ParameterBlock();
    pb.addSource(ri);
    TransposeType rotOp = null;
    RenderedOp op = null;
    if (degrees == 90) {
      rotOp = TransposeDescriptor.ROTATE_90;
    } else if (degrees == 180) {
View Full Code Here

            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

            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

            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

        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

                            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

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.