Package java.awt.image

Examples of java.awt.image.RenderedImage


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

        for (int i = 0; i < 2; i++) {
      RenderedImage src = args.getRenderedSource(0);

            int dtype = src.getSampleModel().getDataType();

            if (dtype != DataBuffer.TYPE_BYTE &&
                dtype != DataBuffer.TYPE_USHORT &&
                dtype != DataBuffer.TYPE_SHORT &&
                dtype != DataBuffer.TYPE_INT) {
View Full Code Here


        }

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

        RenderedImage source = args.getRenderedSource(0);

  // map the input kernel + gain factor to an equivalent
  // convolution kernel and then do a normal convolve.
  KernelJAI unRotatedKernel =
    ImageUtil.getUnsharpMaskEquivalentKernel(
View Full Code Here

        }

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

  RenderedImage src = args.getRenderedSource(0);

        int dtype = src.getSampleModel().getDataType();

        if (dtype != DataBuffer.TYPE_BYTE &&
            dtype != DataBuffer.TYPE_USHORT &&
            dtype != DataBuffer.TYPE_SHORT &&
            dtype != DataBuffer.TYPE_INT) {
View Full Code Here

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

        for (int i = 0; i < 2; i++) {
            RenderedImage src = args.getRenderedSource(i);

            int dtype = src.getSampleModel().getDataType();

            if (dtype != DataBuffer.TYPE_BYTE &&
                dtype != DataBuffer.TYPE_USHORT &&
                dtype != DataBuffer.TYPE_SHORT &&
                dtype != DataBuffer.TYPE_INT) {
View Full Code Here

        if (!MediaLibAccessor.isMediaLibCompatible(paramBlock, layout) ||
            !MediaLibAccessor.hasSameNumBands(paramBlock, layout)) {
            return null;
        }

        RenderedImage source = paramBlock.getRenderedSource(0);
        SampleModel sm = source.getSampleModel();
        boolean isBilevel = (sm instanceof MultiPixelPackedSampleModel) &&
            (sm.getSampleSize(0) == 1) &&
            (sm.getDataType() == DataBuffer.TYPE_BYTE ||
             sm.getDataType() == DataBuffer.TYPE_USHORT ||
             sm.getDataType() == DataBuffer.TYPE_INT);
View Full Code Here

                       JaiI18N.getString("CropDescriptor5"));
            return false;
        }

        // Check for out-of-bounds
        RenderedImage src = (RenderedImage)args.getSource(0);
 
  Rectangle srcBounds =
    new Rectangle(src.getMinX(),
      src.getMinY(),
      src.getWidth(),
      src.getHeight());

        if (!srcBounds.contains(rect_req)) {
            msg.append(getName() + " " +
                       JaiI18N.getString("CropDescriptor6"));
            return false;
View Full Code Here

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

        for (int i = 0; i < 2; i++) {

      RenderedImage src = args.getRenderedSource(0);

            int dtype = src.getSampleModel().getDataType();

            if (dtype != DataBuffer.TYPE_BYTE &&
                dtype != DataBuffer.TYPE_USHORT &&
                dtype != DataBuffer.TYPE_SHORT &&
                dtype != DataBuffer.TYPE_INT) {
View Full Code Here

        // Check source band count: must be even for a complex source.
        EnumeratedParameter dataNature =
            (EnumeratedParameter)args.getObjectParameter(1);

        if (!dataNature.equals(REAL_TO_COMPLEX)) {
            RenderedImage src = args.getRenderedSource(0);

            if (src.getSampleModel().getNumBands() % 2 != 0) {
                msg.append(getName() + " " +
                           JaiI18N.getString("DFTDescriptor5"));
                return false;
            }
        }
View Full Code Here

            RenderedOp op = (RenderedOp)opNode;

            ParameterBlock pb = op.getParameterBlock();

            // Retrieve the rendered source image and its ROI.
            RenderedImage src = pb.getRenderedSource(0);
            Object property = src.getProperty("ROI");
            if (property == null ||
                property.equals(java.awt.Image.UndefinedProperty) ||
                !(property instanceof ROI)) {
                return java.awt.Image.UndefinedProperty;
            }
            ROI srcROI = (ROI)property;

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

            // 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));
View Full Code Here

      object = objectIn.readObject();
  } catch (Exception e) {
      throw new RuntimeException(e.getMessage());
  }   

  RenderedImage ri;
  if (object instanceof SerializableRenderedImage) {
      ri = (RenderedImage)object;
  } else {
      ri = null;
  }
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.