Package org.eclipse.birt.report.engine.api

# Interface IImage

All Superinterfaces:
  `IReportPart`

public interface IImage extends IReportPart
Defines an interface to communicate info about an image to image handler

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CUSTOM_IMAGE`
`static final int`
`DESIGN_IMAGE`
`static final int`
`FILE_IMAGE`
`static final int`
`INVALID_IMAGE`
`static final int`
`REPORTDOC_IMAGE`
`static final int`
`URL_IMAGE`

## Method Summary

Modifier and Type
Method
Description
`String`
`getExtension()`
return the image postfix, such as jpg, png
`String`
`getID()`
returns an identifier for the image
`byte[]`
`getImageData()`
returns binary image data.
`String`
`getImageMap()`
The image map is used in HTML output.
`ImageSize`
`getImageRawSize()`
`ImageSize`
`getImageSize()`
`InputStream`
`getImageStream()`
returns an input stream where the mage can be read
`String`
`getMimeType()`
`int`
`getSource()`
returns the source type of the image.
`void`
`setImageRawSize(ImageSize rawSize)`
`void`
`writeImage(File dest)`
write the image to a destination file

### Methods inherited from interface org.eclipse.birt.report.engine.api.IReportPart

`getRenderOption, getReportRunnable`

## Field Details

### DESIGN_IMAGE

static final int DESIGN_IMAGE

See Also:
  - Constant Field Values

### REPORTDOC_IMAGE

static final int REPORTDOC_IMAGE

See Also:
  - Constant Field Values

### URL_IMAGE

static final int URL_IMAGE

See Also:
  - Constant Field Values

### FILE_IMAGE

static final int FILE_IMAGE

See Also:
  - Constant Field Values

### CUSTOM_IMAGE

static final int CUSTOM_IMAGE

See Also:
  - Constant Field Values

### INVALID_IMAGE

static final int INVALID_IMAGE

See Also:
  - Constant Field Values

## Method Details

### getID

String getID()
returns an identifier for the image

Returns:
  an identifier for the image.

### getSource

int getSource()
returns the source type of the image. Could be DESIGN_IMAGE, REPORTDOC_IMAGE, URL_IMAGE or CUSTOM_IMAGE

Returns:
  the type of the image

### getImageData

byte[] getImageData() throws OutOfMemoryError
returns binary image data. The function should be called with caution

Returns:
  the binary image data
Throws:
  `OutOfMemoryError`

### getImageStream

InputStream getImageStream()
returns an input stream where the mage can be read

Returns:
  an input stream where the image can be read

### writeImage

void writeImage(File dest) throws IOException
write the image to a destination file

Parameters:
  `dest` - destination file to write the image to
Throws:
  `IOException`

### getExtension

String getExtension()
return the image postfix, such as jpg, png

### getMimeType

String getMimeType()

Returns:
  the mime type of the image

### getImageMap

String getImageMap()
The image map is used in HTML output.

Returns:
  the image map associate with this image.

### getImageSize

ImageSize getImageSize()

Returns:
  the size of the image

### setImageRawSize

void setImageRawSize(ImageSize rawSize)

Parameters:
  `rawSize` - image raw size

### getImageRawSize

ImageSize getImageRawSize()

Returns:
  the size of the image