|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.graphiti.export.batik.ImageConverter
public class ImageConverter
This is a helper class used to convert an SWT Image into an AWT BufferedImage. This class is originally from GMF and was adapted for Graphiti needs.
Field Summary | |
---|---|
private static PaletteData |
PALETTE_DATA
|
Constructor Summary | |
---|---|
ImageConverter()
|
Method Summary | |
---|---|
static Image |
convert(BufferedImage srcImage)
Converts an AWT based buffered image into an SWT Image . |
static BufferedImage |
convert(Image srcImage)
Converts an swt based image into an AWT BufferedImage . |
static BufferedImage |
convertFromImageData(ImageData imageData)
Converts an swt based image data into an AWT BufferedImage . |
static ImageData |
convertToImageData(BufferedImage srcImage)
Converts an AWT based buffered image into an SWT ImageData . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final PaletteData PALETTE_DATA
Constructor Detail |
---|
public ImageConverter()
Method Detail |
---|
public static Image convert(BufferedImage srcImage)
Image
. This
will always return an Image
that has 24 bit depth regardless
of the type of AWT buffered image that is passed into the method.
srcImage
- the BufferedImage
to be converted to an
Image
Image
that represents the same image data as the
AWT BufferedImage
type.public static ImageData convertToImageData(BufferedImage srcImage)
ImageData
.
This will always return an ImageData
that has 24 bit depth
regardless of the type of AWT buffered image that is passed into the
method.
srcImage
- the BufferedImage
to be converted to an
Image
Image
that represents the same image data as the
AWT BufferedImage
type.public static BufferedImage convert(Image srcImage)
BufferedImage
. This
will always return a BufferedImage
that is of type
BufferedImage.TYPE_INT_ARGB
regardless of the type of swt
image that is passed into the method.
srcImage
- the org.eclipse.swt.graphics.Image
to be converted to
a BufferedImage
BufferedImage
that represents the same image data
as the swt Image
public static BufferedImage convertFromImageData(ImageData imageData)
BufferedImage
.
This will always return a BufferedImage
that is of type
BufferedImage.TYPE_INT_ARGB
regardless of the type of swt
image that is passed into the method.
imageData
- the org.eclipse.swt.graphics.Image
to be converted to
a BufferedImage
BufferedImage
that represents the same image data
as the swt Image
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |