Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

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

From 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
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: ed_welch (03 Sep 2007)
Last edited: hamishwillee (30 Jul 2013)

Description

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.

Solution

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.
37 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.

×