Has anyone successfully used transparent images on a MIDP1.0 setup? I've tried it using the J2ME Wireless Toolkit 1.0.4_01, but to no avail. I don't know whether it's not supported (doc's say it may or may not be, depending on the device) or if I've messed up creating the PNG file. My main interest is getting something going on the Palm emulator.

What can I say. After adding the line here, my game had transparent sprites with WTK 1.0.4. I know for sure , since I especially had to add the line to make our current game work (we need transparency in our sprites). We don't use any vendor specific APIs yet.

Transparent PNG support is optional in MIDP 1.0, and mandatory in MIDP 2.0. Most MIDP 1.0 phones support it (e.g. all of Nokia's), and WTK 1.0.4 (for MIDP 1.0) supports it if you set that enablePNGtransparency setting daybyter mentions.

Transparent PNG support is optional in MIDP 1.0, and mandatory in MIDP 2.0. Most MIDP 1.0 phones support it (e.g. all of Nokia's), and WTK 1.0.4 (for MIDP 1.0) supports it if you set that enablePNGtransparency setting daybyter mentions.

that only takes care of the emualtor..you have to use a closed source api from a device vendor to enable on the actual device!

It depends on the device, but in most cases (e.g. all Nokia MIDP 1.0 phones) PNG transparency is supported through the standard MIDP API. You don't need any proprietary APIs to get transparent sprites.

The methods in question are in class: javax.microedition.lcdui.Imagethey are: static Image createImage(String) static Image createImage(byte[], int, int)The first takes the name of a file in the MIDlet's JAR file (e.g. "/rocket.png", don't forget that "/"); the second uses data from a byte array.

See the JavaDocs for class Image, and read the section titled PNG Image Format. The second bullet point ends with "Color types that include alpha channel data are supported; however, the implementation may ignore all alpha channel information and treat all pixels as opaque." (My italics).

So, manufacturers can ignore the transparency information and create opaque Images from transparent PNGs, but they can also choose to interpret the transparency information and create transparent Images from transparent PNGs.

I'm not just talking theory here - I have personally written many MIDP 1.0 MIDlets with transparent sprites and run them successfully on several different Nokia MIDP 1.0 phones.

Yes, I can confirm this to be accurate. If you use the proper constructor - the vast majority of devices that DO support transparency (and not all of them do) will handle the transparency correctly. I haven't run across any recent (last 12 month) devices that didn't support transparency correctly, but some of the early MIDP devices seemed to have some problems with it.

that only takes care of the emualtor..you have to use a closed source api from a device vendor to enable on the actual device!

I'll confirm with others... and what I tried to say above. It's working on many 1.0 phones without special APIs! All Nokias I've tried (3650, 7650, 7210) and the Motorola i95cl work well. The Samsung A500 does not, which is a shame given that it has such a nice screen.

in midp1.0, png32 or png24 transparent is supported. In photoshop ImageReady7.0, create a transparent image, and save the image as png24 or png32 format, and transparent is supported. I have finish a game like this.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org