Package java.awt.image

Examples of java.awt.image.RenderedImage


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

  RenderedImage ri = (RenderedImage)object;

  // Close the various streams and the socket.
  try {
      out.close();
      objectOut.close();
View Full Code Here


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

  RenderedImage ri = (RenderedImage)object;

  // Close the various streams and the socket.
  try {
      out.close();
      objectOut.close();
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;

  RenderedImage src = args.getRenderedSource(0);

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

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

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

    RenderedImage ri = null;
    SerializableRenderedImage sri;
                // Switch according to object class; ignore unsupported types.
                if (obj instanceof String) {
        String str = (String)obj;
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

        // Retrieve the ImageEncodeParam object.
        ImageEncodeParam param =
            (ImageEncodeParam)args.getObjectParameter(2);

  RenderedImage src = args.getRenderedSource(0);

        // Verify that the image can be encoded with null parameters.
        if (!codec.canEncodeImage(src, param)) {
            msg.append(getName() + " " +
                       JaiI18N.getString("FileStoreDescriptor5"));
View Full Code Here

        AffineTransform transform =
            (AffineTransform)args.getObjectParameter(0);
        Interpolation interp = (Interpolation)args.getObjectParameter(1);
        double[] backgroundValues = (double[])args.getObjectParameter(2);

        RenderedImage source = args.getRenderedSource(0);
 
        if (!MediaLibAccessor.isMediaLibCompatible(args, layout) ||
            !MediaLibAccessor.hasSameNumBands(args, layout) ||
      // Medialib cannot deal with source image having tiles with any
      // dimension greater than or equal to 32768
      source.getTileWidth() >= 32768 ||
      source.getTileHeight() >= 32768) {
            return null;
        }

        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

        Vector sources = pb.getSources();
        sources.insertElementAt(this.getAsImage(), sourceIndex);

        // Create a new RenderedImage based on the RIF
        // and ParameterBlock.
        RenderedImage im = RIF.create(pb, renderHints);
        return new ROI(im, threshold);
    }
View Full Code Here

        Vector sources = pb.getSources();
        sources.insertElementAt(this.getAsImage(), sourceIndex);

        // Create a new RenderedImage based on the operation name
        // and ParameterBlock using the default registry.
        RenderedImage im = JAI.create(name, pb, renderHints);
        return new ROI(im, threshold);
    }
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.