fop 0.93

org.apache.fop.image
Interface FopImage

All Known Implementing Classes:
AbstractFopImage

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.
 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

public static final int DIMENSIONS
Flag for loading dimensions.

See Also:
Constant Field Values

ORIGINAL_DATA

public static final int ORIGINAL_DATA
Flag for loading original data.

See Also:
Constant Field Values

BITMAP

public static final int BITMAP
Flag for loading bitmap data.

See Also:
Constant Field Values
Method Detail

getMimeType

public 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

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

load

public 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

public int getWidth()
Returns the image width.

Returns:
the width in pixels

getHeight

public int getHeight()
Returns the image height.

Returns:
the height in pixels

getIntrinsicWidth

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

getIntrinsicHeight

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

getHorizontalResolution

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

getVerticalResolution

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

getColorSpace

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

Returns:
the color space

getICCProfile

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

Returns:
the ICC profile, null if none is available

getBitsPerPixel

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

Returns:
the number of bits per pixel

isTransparent

public boolean isTransparent()
Indicates whether the image is transparent.

Returns:
True if it is transparent

getTransparentColor

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

Returns:
the transparent color

hasSoftMask

public 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

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

Returns:
the Soft Mask

isInverted

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

getBitmaps

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

Returns:
the bitmap

getBitmapsSize

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

Returns:
the size

getRessourceBytes

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

Returns:
the raw image

getRessourceBytesSize

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

Returns:
the size in bytes

fop 0.93

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