gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Good palette optimizers

#145298 - NeX - Tue Nov 13, 2007 11:15 pm

I have made some sprites in an old Paint Shop Pro (smooth gradients would be nice) and when I try to convert the lot into 8-bit, Gale and PSP make a right mess of it, using only 25 colours and using a load of dithering. There are only 20 colours too many in the image - why are these programs having such a problem converting to 256 without making a total hash of it? What can I use instead?
_________________
Strummer or Drummer?.
Or maybe you would rather play with sand? Sandscape is for you in that case.

#145300 - keldon - Tue Nov 13, 2007 11:22 pm

Tried Gimp or Usenti?

#145304 - NeX - Tue Nov 13, 2007 11:32 pm

Wow, I can't believe I didn't think of the Gimp. With the dithering off, it's amazing!
_________________
Strummer or Drummer?.
Or maybe you would rather play with sand? Sandscape is for you in that case.

#145340 - kusma - Wed Nov 14, 2007 9:44 am

I find FreeImage's palette-optimizer to work very well. And it's available as a library, so I can write tools using it. Yay.

#145363 - keldon - Wed Nov 14, 2007 1:38 pm

Dithering is one of those things, great for large graduated / solid areas, terrible everywhere else. Is there anything that dithers sparingly?

#145642 - ScottLininger - Mon Nov 19, 2007 8:38 pm

A lot of times I'll convert images twice... once with dithering on and once with it off, then copy and paste bits of the two images together to get the optimal mix.

-Scott
_________________
Some of my GBA projects

#145644 - tepples - Mon Nov 19, 2007 8:43 pm

Would a filter like this work?
  1. Convert the image twice, once with diffusion dithering and once without.
  2. Perform "find edges" on the original image.
  3. Keep the undithered pixels near edges and the dithered pixels elsewhere.

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#145645 - Lick - Mon Nov 19, 2007 8:50 pm

Riemersma dither looks interesting.
_________________
http://licklick.wordpress.com

#145648 - keldon - Mon Nov 19, 2007 10:31 pm

tepples wrote:
Would a filter like this work?
  1. Convert the image twice, once with diffusion dithering and once without.
  2. Perform "find edges" on the original image.
  3. Keep the undithered pixels near edges and the dithered pixels elsewhere.


Hmm, I would suggest you analyse the image and let a simple algorithm decide where dithering is best. A high pass (or any other edge detection routine) will [probably] tell you where not to dither.

You may be able to determine how much to dither by low pass, followed by a lower resolution high pass filter. Or by performing a high, and then low pass over the image - and then overlaying that data over a high pass so that there is less dithering on and around edges.

I might test it out with my converter sometime.