Re: help creating transparent image
- From: "Remon van Vliet" <remon@xxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 17:01:17 +0200
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
"Jeff" <it_consultant1@xxxxxxxxxxxxxxxxxx> wrote in message
news:4ICdne7zCY1oSrbZRVnzvA@xxxxxxxxxxxxxx
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
.
- References:
- help creating transparent image
- From: Jeff
- help creating transparent image
- Prev by Date: Re: Concurrency newbie
- Next by Date: Re: resources for SCJP exam?
- Previous by thread: help creating transparent image
- Next by thread: Concurrency newbie
- Index(es):
Relevant Pages
|