Package java.awt.image

Examples of java.awt.image.RenderedImage


  throws RemoteException {

  RenderableImage ri = (RenderableImage)nodes.get(id);
  RenderContext renderContext =
      (RenderContext)renderContextState.getObject();
  RenderedImage rendering = ri.createRendering(renderContext);
  if (rendering instanceof Serializable) {
      return rendering;
  } else {
      return new SerializableRenderedImage(rendering);
  }
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

        final ImageMetadata metadata = imageInfo.getMetadata();
        final ImageMetadataDirectory dir =
            metadata.getDirectoryFor( PentaxDirectory.class );
        if ( dir != null ) {
            // TODO: verify that this is actually an sRGB image, what about Adobe RGB shooting, etc.?
            final RenderedImage image = JPEGImageType.getImageFromBuffer(
                imageInfo.getByteBuffer(),
                dir.getValue( PENTAX_PREVIEW_IMAGE_START ), 0,
                dir.getValue( PENTAX_PREVIEW_IMAGE_LENGTH ),
                maxWidth, maxHeight
            );
View Full Code Here

        MacOSXPrinter.setPageFormat( format );

        // In Cocoa there is no way of really controlling the print resolution,
        // we always print at full size and then rely on the printer to do the appropriate scaling...

        RenderedImage rendering = engine.getRendering(engine.getNaturalSize(),
                                                      colorProfile,
                                                      engine.getLCMSIntent(settings.getRenderingIntent()),
                                                      true);

        try {
            File spoolFile = File.createTempFile("LZPrintSpool", "tif");
            LCTIFFWriter writer = new LCTIFFWriter(spoolFile.getAbsolutePath(),
                                                   rendering.getWidth(),
                                                   rendering.getHeight());
            // No profile for Application Managed Colors
            if (colorProfile == JAIContext.sRGBColorProfile)
                writer.setByteField( TIFFTags.TIFF_ICC_PROFILE, colorProfile.getData());
            writer.putImageStriped(rendering, thread);
View Full Code Here

     */
    public RenderedImage getPreviewImage( ImageInfo imageInfo, int maxWidth,
                                          int maxHeight )
        throws BadImageFileException, IOException, UnknownImageTypeException
    {
        final RenderedImage image = TIFFImageType.getJPEGInterchangeImage(
            imageInfo, maxWidth, maxHeight
        );
        return  image != null ?
                image : super.getPreviewImage( imageInfo, maxWidth, maxHeight );
    }
View Full Code Here

     */
    public RenderedImage getPreviewImage( ImageInfo imageInfo, int maxWidth,
                                          int maxHeight )
        throws BadImageFileException, IOException, UnknownImageTypeException
    {
        RenderedImage image = null;

        final ImageMetadataDirectory dir =
            imageInfo.getMetadata().getDirectoryFor( OlympusDirectory.class );

        if ( dir != null ) {
View Full Code Here

                switch ( colorSpace.getIntValue() ) {
                    case CIFF_COLOR_SPACE_ADOBE_RGB:
                        cs = JAIContext.adobeRGBColorSpace;
                        break;
                }
            final RenderedImage image = JPEGImageType.getImageFromBuffer(
                imageInfo.getByteBuffer(),
                dir.getValue( CIFF_PREVIEW_IMAGE_OFFSET ), 0,
                dir.getValue( CIFF_PREVIEW_IMAGE_LENGTH ),
                cs, maxWidth, maxHeight
            );
View Full Code Here

        throws BadImageFileException, IOException, UnknownImageTypeException
    {
        if (!USE_EMBEDDED_PREVIEW)
            return super.getPreviewImage(imageInfo, maxWidth, maxHeight);

        final RenderedImage image = TIFFImageType.getJPEGInterchangeImage(
            imageInfo, maxWidth, maxHeight
        );
        return  image != null ?
                image : super.getPreviewImage( imageInfo, maxWidth, maxHeight );
    }
View Full Code Here

            //
            // This should never be null, but just in case ...
            //
            return null;
        }
        final RenderedImage image = JPEGImageType.getImageFromBuffer(
            imageInfo.getByteBuffer(),
            dir.getValue( TIFF_JPEG_INTERCHANGE_FORMAT ), 0,
            dir.getValue( TIFF_JPEG_INTERCHANGE_FORMAT_LENGTH ),
            maxWidth, maxHeight
        );
View Full Code Here

        }

        // Force previous data to be read.
        if(page > 0) {
            for(int idx = prevSyncedPage + 1; idx < page; idx++) {
                RenderedImage im =
                    (RenderedImage)images.get(new Integer(idx));
                im.getTile(0, 0);
                prevSyncedPage = idx;
            }
        }

        // Read as many images as possible.
        RenderedImage image = null;
        while(prevPage < page) {
            int index = prevPage + 1;
            RenderedImage ri = null;
            try {
                ri = new GIFImage(input, globalColorTable);
                images.put(new Integer(index), ri);
                if(index < page) {
                    ri.getTile(0, 0);
                    prevSyncedPage = index;
                }
                prevPage = index;
                if(index == page) {
                    image = ri;
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.