Summary: Ctors | Methods | Inherited Methods | [Expand All]
public class

# Image2RGBA

extends Filter
implements __Delete AutoCloseable

java.lang.Object
↳ | com.pdftron.filters.Filter
| ↳ | com.pdftron.pdf.Image2RGBA

## Class Overview

Image2RGBA is a filter that can decompress and normalize any PDF image stream (e.g. monochrome, CMYK, etc) into a raw RGBA pixel stream.

## Summary

Public Constructors
| Image2RGBA(Element image_element) Instantiates a new Image2RGBA with specified element
| Image2RGBA(Obj image_xobject) Instantiates a new Image2RGBA with specifed image Obj
| Image2RGBA(Image image) Instantiates a new Image2RGBA with specified image
| Image2RGBA(Element image_element, boolean premultiply) Instantiates a new Image2RGBA.
| Image2RGBA(Obj image_xobject, boolean premultiply) Instantiates a new Image2RGBA.
| Image2RGBA(Image image, boolean premultiply) Instantiates a new Image2RGBA.

Public Methods
void | close() Frees the native memory of the object.
void | destroy() Frees the native memory of the object.

[Expand] Inherited Methods
From class com.pdftron.filters.Filter
static Filter | __Create(long impl, Filter attached)
long | __GetHandle()
void | __SetRefHandle(Object ref)
void | attachFilter(Filter attach_filter) Attaches a filter to the this filter.
boolean | canSeek() determine whether the stream supports seeking
void | close() Frees the native memory of the object.
Filter | createInputIterator() Create Filter iterator.
void | destroy() Frees the native memory of the object.
void | flush() Forces any data remaining in the buffer to be written to input or output filter.
void | flushAll() Forces any data remaining in the filter chain to the source or destination.
Filter | getAttachedFilter() Get the attached filter.
String | getDecodeName() Get the decode name.
String | getFilePath() Get the file path.
String | getName() Get the name.
Filter | getSourceFilter() Get the source filter.
boolean | isInputFilter() Checks if is input filter.
Filter | releaseAttachedFilter() Release the ownership of the attached filter.
void | seek(long offset, int origin) When overridden in a derived class, sets the position within the current stream.
void | setStreamLength(long bytes) The functions specifies the length of the data stream.
long | size() Returns the size of buffer returned by Begin().
long | tell() Reports the current read position in the stream relative to the stream origin.
void | writeToFile(String path, boolean append) Writes the entire filter, starting at current position, to specified filepath.
From class java.lang.Object
boolean | equals(Object arg0)
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()
From interface com.pdftron.pdf.__Delete
abstract void | destroy()
From interface java.lang.AutoCloseable
abstract void | close()

## Public Constructors

#### public Image2RGBA (Element image_element)

Instantiates a new Image2RGBA with specified element

##### Parameters

image_element | the input image element

##### Throws

PDFNetException |

#### public Image2RGBA (Obj image_xobject)

Instantiates a new Image2RGBA with specifed image Obj

##### Parameters

image_xobject | the input image Obj

##### Throws

PDFNetException |

#### public Image2RGBA (Image image)

Instantiates a new Image2RGBA with specified image

##### Parameters

image | the input image

##### Throws

PDFNetException |

#### public Image2RGBA (Element image_element, boolean premultiply)

Instantiates a new Image2RGBA.

##### Parameters

image_element | the input image element
premultiply | whether to premultiply

##### Throws

PDFNetException |

#### public Image2RGBA (Obj image_xobject, boolean premultiply)

Instantiates a new Image2RGBA.

##### Parameters

image_xobject | the input image xobject
premultiply | whether to premultiply

##### Throws

PDFNetException |

#### public Image2RGBA (Image image, boolean premultiply)

Instantiates a new Image2RGBA.

##### Parameters

image | the input image
premultiply | whether to premultiply

##### Throws

PDFNetException |

## Public Methods

#### public void close ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

##### Throws

PDFNetException |

#### public void destroy ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

##### Throws

PDFNetException |

##### See Also

- `destroy()`