Micket
Member
Well. I for one was slightly bothered by the sometimes lacking colors in 16-bit. Well, at least when it came to different gradients (most likely seen in menus and such) so i tried to apply some dithering to them, and i must say i'm quite pleased with the results
First off, a familiar example from squidgesnes;
Original
As you see it a.t.m on the gp2x;
As you COULD see if when applying a rather precise floyd-steinberg dithering
I even tried running a version which gave these results in realtime (at each time the menu was drawn, without any noticeable lag);
I also optimized the algorithm for the last version quite a bit, so it has potential at running in realtime in more then just a slow menu i think. (It could probably be improved quite a bit, depending on how you draw your graphics)
Also, since examples are always fun, here is another one;
Original
As it's seen on the gp2x
16bit decimal presision floyd-steinberg dithering
Simplified floyd-steinberg dithering
And for the source of my test program
note! i only bothered with the dithering algorithm, the actual png handling is pretty much hack and slash until it worked, especially writing, The images get really big, so i just resaved them in gimp to get a decent filesize, if anyone wants to improve this to make a decent program for actual use for people doing graphics for the gp2x, feel free to change)
Oh.. i also hope there is no problem using these images as examples? If there are any problems with it pm me and i'll take them down.
edit: DOH forgot to post the source
http://www.micket.com/Code/dither/gp2x_png.c
edit 2: To clear up a few things;
My example program can be used now to process images before put n the gp2x to see the improvements in many programs, it's not meant to be run on the gp2x in any way but improve the graphics for it. It can output any of the versions shown above.
I never planned the high precision dithering to be run in realtime on the gp2x, however the simplier version does have some potential to do that (perhaps in the photo viewer).
First off, a familiar example from squidgesnes;
Original
As you see it a.t.m on the gp2x;
As you COULD see if when applying a rather precise floyd-steinberg dithering
I even tried running a version which gave these results in realtime (at each time the menu was drawn, without any noticeable lag);
I also optimized the algorithm for the last version quite a bit, so it has potential at running in realtime in more then just a slow menu i think. (It could probably be improved quite a bit, depending on how you draw your graphics)
Also, since examples are always fun, here is another one;
Original
As it's seen on the gp2x
16bit decimal presision floyd-steinberg dithering
Simplified floyd-steinberg dithering
And for the source of my test program
note! i only bothered with the dithering algorithm, the actual png handling is pretty much hack and slash until it worked, especially writing, The images get really big, so i just resaved them in gimp to get a decent filesize, if anyone wants to improve this to make a decent program for actual use for people doing graphics for the gp2x, feel free to change)
Oh.. i also hope there is no problem using these images as examples? If there are any problems with it pm me and i'll take them down.
edit: DOH forgot to post the source
http://www.micket.com/Code/dither/gp2x_png.c
edit 2: To clear up a few things;
My example program can be used now to process images before put n the gp2x to see the improvements in many programs, it's not meant to be run on the gp2x in any way but improve the graphics for it. It can output any of the versions shown above.
I never planned the high precision dithering to be run in realtime on the gp2x, however the simplier version does have some potential to do that (perhaps in the photo viewer).