public class IndexedImage extends Image
Modifier and Type | Field and Description |
---|---|
protected Image |
mutableCopy_
Deprecated.
|
shownWarningForTooSmallBackgroundImage
Modifier | Constructor and Description |
---|---|
protected |
IndexedImage(IndexedImage img,
Void v)
Deprecated.
|
|
IndexedImage(int width,
int height,
int[] palette,
byte[] data)
Deprecated.
use Image.createIndexed instead
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawImage(Graphics g,
Object nativeGraphics,
int x,
int y)
Deprecated.
Callback invoked internally by LWUIT to draw the image/frame onto the display.
|
Graphics |
getGraphics()
Deprecated.
This method is unsupported in this image type
|
int |
getHeight()
Deprecated.
Returns the height of the image
|
byte[] |
getImageDataByte()
Deprecated.
Retrieves the image data as offsets into the palette array
|
protected Object |
getInternalImage(int x,
int y)
Deprecated.
Return the internal image representation.
|
int[] |
getPalette()
Deprecated.
Retrieves the palette for the indexed image drawing
|
protected void |
getRGB(int[] rgbData,
int offset,
int scanWidth,
int x,
int y,
int width,
int height)
Deprecated.
Obtains ARGB pixel data from the specified region of this image and
stores it in the provided array of integers.
|
int |
getWidth()
Deprecated.
Returns the width of the image
|
static IndexedImage |
load(byte[] data)
Deprecated.
Loads a packaged image that was stored in a stream using the toByteArray method
|
Image |
modifyAlpha(byte alpha)
Deprecated.
Creates a new image instance with the alpha channel of opaque/translucent
pixels within the image using the new alpha value.
|
static Image |
pack(Image sourceImage)
Deprecated.
Tries to pack the given image and would return the packed image or source
image if packing failed
|
static IndexedImage |
pack(int[] rgb,
int width,
int height)
Deprecated.
Packs the source rgba image and returns null if it fails
|
static Image |
pack(String imageName)
Deprecated.
Packs the image loaded by MIDP
|
Image |
rotate(int degrees)
Deprecated.
Unsupported in the current version, this method will be implemented in a future release
|
void |
scale(int width,
int height)
Deprecated.
Scale the image to the given width and height, this is a fast algorithm
that preserves translucent information
|
Image |
subImage(int x,
int y,
int width,
int height,
boolean processAlpha)
Deprecated.
Extracts a subimage from the given image allowing us to breakdown a single large image
into multiple smaller images in RAM, this actually creates a standalone version
of the image for use.
|
protected void |
tileRect(Graphics g,
Object nativeGraphics,
int x,
int y,
int rect_width,
int rect_height)
Deprecated.
Callback invoked internally by LWUIT to draw tiles over the image/frame
onto the display.
|
byte[] |
toByteArray()
Deprecated.
This method allows us to store a package image into a persistent stream easily
thus allowing us to store the image in RMS.
|
animate, applyMask, applyMask, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createIndexed, createMask, createSVG, getImage, getRGB, getRGBCached, getSVGDocument, isAlphaMutableImageSupported, isAnimation, isOpaque, isSVG, isSVGSupported, modifyAlpha, modifyAlphaWithTranslucency, scaled, scaledHeight, scaledSmallerRatio, scaledWidth, toRGB
protected Image mutableCopy_
public IndexedImage(int width, int height, int[] palette, byte[] data)
width
- image widthheight
- image heightpalette
- the color palette to use with the byte datadata
- byte data containing palette offsets to map to ARGB colorsprotected IndexedImage(IndexedImage img, Void v)
public static Image pack(String imageName) throws IOException
imageName
- a name to load using Image.createImage()IOException
- when create failspublic Image subImage(int x, int y, int width, int height, boolean processAlpha)
Image
subImage
in class Image
x
- the x offset from the imagey
- the y offset from the imagewidth
- the width of internal imagesheight
- the height of internal imagesprocessAlpha
- whether alpha should be processed as well as part of the cuttingpublic Image rotate(int degrees)
public Image modifyAlpha(byte alpha)
Image
modifyAlpha
in class Image
alpha
- New value for the entire alpha channelpublic Graphics getGraphics()
getGraphics
in class Image
protected void getRGB(int[] rgbData, int offset, int scanWidth, int x, int y, int width, int height)
Image
getRGB
in class Image
rgbData
- an array of integers in which the ARGB pixel data is
storedoffset
- the index into the array where the first ARGB value is
storedx
- the x-coordinate of the upper left corner of the regiony
- the y-coordinate of the upper left corner of the regionwidth
- the width of the regionheight
- the height of the regionpublic static IndexedImage pack(int[] rgb, int width, int height)
rgb
- array containing ARGB datawidth
- width of the image in the rgb arrayheight
- height of the imagepublic static Image pack(Image sourceImage)
sourceImage
- the image which would be converted to a packed image if possibleprotected void drawImage(Graphics g, Object nativeGraphics, int x, int y)
Image
protected void tileRect(Graphics g, Object nativeGraphics, int x, int y, int rect_width, int rect_height)
Image
public int getWidth()
Image
public int getHeight()
Image
public void scale(int width, int height)
Image
public final int[] getPalette()
public final byte[] getImageDataByte()
public byte[] toByteArray()
public static IndexedImage load(byte[] data)
data
- previously stored image data