fop 0.94

org.apache.fop.image
Interface FopImage

All Known Implementing Classes:
AbstractFopImage, BmpImage, EmfImage, EPSImage, GifImage, ImageIOImage, JAIImage, JimiImage, JpegImage, JpegImageIOImage, PNGImage, TIFFImage, XmlGraphicsCommonsImage, XMLImage

public interface FopImage

Fop image interface for loading images.

Author:
Eric SCHAEFFER

Nested Class Summary
static class FopImage.ImageInfo
          Image info class.
 
Field Summary
static int BITMAP
          Flag for loading bitmap data.
static int DIMENSIONS
          Flag for loading dimensions.
static int ORIGINAL_DATA
          Flag for loading original data.
 
Method Summary
 byte[] getBitmaps()
          Returns the decoded and uncompressed image as a array of width * height * [colorspace-multiplicator] pixels.
 int getBitmapsSize()
          Returns the size of the image.
 int getBitsPerPixel()
          Returns the number of bits per pixel for the image.
 java.awt.color.ColorSpace getColorSpace()
          Returns the color space of the image.
 int getHeight()
          Returns the image height.
 double getHorizontalResolution()
           
 java.awt.color.ICC_Profile getICCProfile()
          Returns the ICC profile.
 Length getIntrinsicAlignmentAdjust()
           
 int getIntrinsicHeight()
           
 int getIntrinsicWidth()
           
 java.lang.String getMimeType()
          Get the mime type of this image.
 java.lang.String getOriginalURI()
           
 byte[] getRessourceBytes()
          Returns the encoded/compressed image as an array of bytes.
 int getRessourceBytesSize()
          Returns the number of bytes of the raw image.
 byte[] getSoftMask()
          For images with a Soft Mask.
 java.awt.Color getTransparentColor()
          For transparent images.
 double getVerticalResolution()
           
 int getWidth()
          Returns the image width.
 boolean hasSoftMask()
          Indicates whether the image has a Soft Mask (See section 7.5.4 in the PDF specs)
 boolean isInverted()
           
 boolean isTransparent()
          Indicates whether the image is transparent.
 boolean load(int type)
          Load particular inforamtion for this image This must be called before attempting to get the information.
 

Field Detail

DIMENSIONS

static final int DIMENSIONS
Flag for loading dimensions.

See Also:
Constant Field Values

ORIGINAL_DATA

static final int ORIGINAL_DATA
Flag for loading original data.

See Also:
Constant Field Values

BITMAP

static final int BITMAP
Flag for loading bitmap data.

See Also:
Constant Field Values
Method Detail

getMimeType

java.lang.String getMimeType()
Get the mime type of this image. This is used so that when reading from the image it knows what type of image it is.

Returns:
the mime type string

getOriginalURI

java.lang.String getOriginalURI()
Returns:
the original URI used to access this image.

load

boolean load(int type)
Load particular inforamtion for this image This must be called before attempting to get the information.

Parameters:
type - the type of loading required
Returns:
boolean true if the information could be loaded

getWidth

int getWidth()
Returns the image width.

Returns:
the width in pixels

getHeight

int getHeight()
Returns the image height.

Returns:
the height in pixels

getIntrinsicWidth

int getIntrinsicWidth()
Returns:
the intrinsic image width (in millipoints)

getIntrinsicHeight

int getIntrinsicHeight()
Returns:
the intrinsic image width (in millipoints)

getIntrinsicAlignmentAdjust

Length getIntrinsicAlignmentAdjust()
Returns:
the intrinsic alignment-adjust value or NULL if the image does not have one.

getHorizontalResolution

double getHorizontalResolution()
Returns:
the horizontal bitmap resolution (in dpi)

getVerticalResolution

double getVerticalResolution()
Returns:
the vertical bitmap resolution (in dpi)

getColorSpace

java.awt.color.ColorSpace getColorSpace()
Returns the color space of the image.

Returns:
the color space

getICCProfile

java.awt.color.ICC_Profile getICCProfile()
Returns the ICC profile.

Returns:
the ICC profile, null if none is available

getBitsPerPixel

int getBitsPerPixel()
Returns the number of bits per pixel for the image.

Returns:
the number of bits per pixel

isTransparent

boolean isTransparent()
Indicates whether the image is transparent.

Returns:
True if it is transparent

getTransparentColor

java.awt.Color getTransparentColor()
For transparent images. Returns the transparent color.

Returns:
the transparent color

hasSoftMask

boolean hasSoftMask()
Indicates whether the image has a Soft Mask (See section 7.5.4 in the PDF specs)

Returns:
True if a Soft Mask exists

getSoftMask

byte[] getSoftMask()
For images with a Soft Mask. Returns the Soft Mask as an array.

Returns:
the Soft Mask

isInverted

boolean isInverted()
Returns:
true for CMYK images generated by Adobe Photoshop

getBitmaps

byte[] getBitmaps()
Returns the decoded and uncompressed image as a array of width * height * [colorspace-multiplicator] pixels.

Returns:
the bitmap

getBitmapsSize

int getBitmapsSize()
Returns the size of the image. width * (bitsPerPixel / 8) * height, no ?

Returns:
the size

getRessourceBytes

byte[] getRessourceBytes()
Returns the encoded/compressed image as an array of bytes.

Returns:
the raw image

getRessourceBytesSize

int getRessourceBytesSize()
Returns the number of bytes of the raw image.

Returns:
the size in bytes

fop 0.94

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.