midp 2.0
Java SE 5.0
J2ME version 2.2
This code creates an image with white background with circle filled with a
light green color:
Image image = Image.createImage(60,60);
Graphics s = image.getGraphics();
s.setColor(0xCCFFCC);
s.fillArc(0, 0, 60, 60, 90, 360);
But I don't want the white background, I want the background to be
transparent... This image is put into a sprite and displayed on the screen.
And I very much would like to remove the white background of the image
object - it would greatly improve the layout...
This image is created during program execution... so I cannot fix this using
Photoshop or any other image edititing software
So please come with suggestions on how to make the white background
transparent
Jeff
Remon van Vliet - 30 Mar 2006 16:01 GMT
You can create images with alpha support using BufferedImage and such. I'm
not aware of MIDP supporting (partially) transparent images created in code
without a bit of a workaround. Said workaround involves creating a PNG
compatible byte[] from your original pixel data and pass it to
createImage(byte[] imageData);
Remon van Vliet
> midp 2.0
> Java SE 5.0
[quoted text clipped - 19 lines]
>
> Jeff