org.apache.fop.image

Interface FopImage

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.
ColorSpace
getColorSpace()
Returns the color space of the image.
int
getHeight()
Returns the image height.
double
getHorizontalResolution()
ICC_Profile
getICCProfile()
Returns the ICC profile.
Length
getIntrinsicAlignmentAdjust()
int
getIntrinsicHeight()
int
getIntrinsicWidth()
String
getMimeType()
Get the mime type of this image.
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.
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 Details

BITMAP

public static final int BITMAP
Flag for loading bitmap data.
Field Value:
4

DIMENSIONS

public static final int DIMENSIONS
Flag for loading dimensions.
Field Value:
1

ORIGINAL_DATA

public static final int ORIGINAL_DATA
Flag for loading original data.
Field Value:
2

Method Details

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

getBitsPerPixel

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

getColorSpace

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

getHeight

public int getHeight()
Returns the image height.
Returns:
the height in pixels

getHorizontalResolution

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

getICCProfile

public ICC_Profile getICCProfile()
Returns the ICC profile.
Returns:
the ICC profile, null if none is available

getIntrinsicAlignmentAdjust

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

getIntrinsicHeight

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

getIntrinsicWidth

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

getMimeType

public 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 String getOriginalURI()
Returns:
the original URI used to access this image.

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

getSoftMask

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

getTransparentColor

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

getVerticalResolution

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

getWidth

public int getWidth()
Returns the image width.
Returns:
the width in pixels

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

isInverted

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

isTransparent

public boolean isTransparent()
Indicates whether the image is transparent.
Returns:
True if it is transparent

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

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