MATLAB Function Reference Previous page   Next Page
im2java

Convert image to Java image

Syntax

Description

To work with a MATLAB image in the Java environment, you must convert the image from its MATLAB representation into an instance of the Java image class, java.awt.Image.

jimage = im2java(I) converts the intensity image I to an instance of the Java image class, java.awt.Image.

jimage = im2java(X,MAP) converts the indexed image X, with colormap MAP, to an instance of the Java image class, java.awt.Image.

jimage = im2java(RGB) converts the RGB image RGB to an instance of the Java image class, java.awt.Image.

Class Support

The input image can be of class uint8, uint16, or double.

Example

This example reads an image into the MATLAB workspace and then uses im2java to convert it into an instance of the Java image class.

See Also

Bit-Mapped Images for related functions


Previous page  im2frame imag Next page

© 1994-2005 The MathWorks, Inc.