Archived:Using createImage to mirror certain PNGs causes phone crash on S60 3rd Edition (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

This known issue was originally created by Ed welch and has been verified by Nokia Developer.

Article Metadata
Tested with
Devices(s): All
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Created: ed_welch (03 Sep 2007)
Last edited: hamishwillee (30 Jul 2013)


This problem only occurs with 8-bit PNG images with dimensions 31 x [an odd number of pixels] and have transparent pixels. It happens when you use Image.createImage to transform an image as follows:

  Image mirror = Image.createImage(image, 0, 0, 
image.getWidth(), image.getHeight(), Sprite.TRANS_MIRROR);
g.drawImage(mirror, 80, 80, Graphics.HCENTER|Graphics.TOP);

When you draw the image, it will be shown with the transparent pixels of the right-hand side replaced with white pixels. If you try drawing the image several times, the phone will eventually crash.


Do not use bitmaps with dimensions of 31 x [an odd number of pixels].

This page was last modified on 30 July 2013, at 08:12.
36 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.