Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Just_Bart
Posts: 23
Registered: ‎02-06-2011
My Device: BlackBerry Z10
My Carrier: Virgin Mobile

Slow Transparent png images

So I've made an app where I have a tiled background of pngs with transparent areas and these images change every so often based on either user or timer events. Now my issue lies here:
- If I use images with no transparent areas then the app works fine
- If I use the images that I need to (with transparances) then the app suffers from considerable slowdown (when a few of the images have to change at once then the app lags for about 2 seconds before finally showing the updated images)

Is there any way to fix this issue? I've thought about not using images with transparancies, but that defeats the whole purpose because I need the background to show through some parts.

 

Much thanks! 

Please use plain text.
Developer
zezke
Posts: 1,004
Registered: ‎12-12-2010
My Device: Z10 (red Limited Edition)
My Carrier: Mobile Vikings

Re: Slow Transparent png images

I use a lot of PNG's in my applications with transparancy for icons and buttons without any problems. Can you post the code how you add the images?

 

Merry Christmas btw! 

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Please use plain text.
Contributor
Just_Bart
Posts: 23
Registered: ‎02-06-2011
My Device: BlackBerry Z10
My Carrier: Virgin Mobile

Re: Slow Transparent png images

If I posted the code I'd have to post 1000+ lines cause a they're altered in a bunch of places :smileytongue: but esentially I tiled the whole screen with 50x50px simplebuttons, where each simple button has a transparency image for the up and down state. and when you press them all really quickly then the app just freezes and the down state only shows after a couple of seconds. BUT if I use regular images (no transparency) then it works fine.

 

MERRY CHRISTMAS!!!

Please use plain text.
BlackBerry Development Advisor
jdolce
Posts: 172
Registered: ‎10-25-2010
My Device: Not Specified

Re: Slow Transparent png images

There could be a number of things that you could look at.

 

  1. Are you running in GPU mode?
  2. Are you setting cacheAsBitmap and cacheAsBitmapMatrix?
  3. Are you reusing the same BitmapData for duplicates of the same image?
Please use plain text.