PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Problem displaying an image

dr_death_tm · 28 Jan 2007, 12:08 UTC
I have a noob question.
I'm working now on a game that uses GledPlay library.
There is a problem diplaying a background image (it's in PNG format).

Here is some screenshots:
What I have in my image editor:
http://ddtm.liceum.ru/annoidce/image.png
And what I get while testing my game in emulator/device/xp version:
http://ddtm.liceum.ru/annoidce/game.png
As you can see there a great difference in quality of images.

I use such code to copy image to back buffer:
Code:

pBackBuffer->bltFast(0, 0, &(application->surface));
where surface is Surface with my background picture and pBackBuffer is a back buffer

Any clues to fix this problem?
I forget the bitdepth off hand (might be device dependent) but you get the banding because you have lower bits to play with compared to your PC, which can have 8 bits per color component, yeilding in 256 shades per color component, assuming gled uses 555 that means you have 32 shades per color component. so you lose color precision.
dr_death_tm · 28 Jan 2007, 13:45 UTC
Thank you for reply. Bad news for me. So there is the only solution, I guess: not to use gradients to make loss of color precision not so noticeable.
Well, you could always use dithering, so quantize offline, this should show less banding.