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 > How much need is there for a multiple image file quantizer?

#162606 - keldon - Fri Sep 05, 2008 9:16 pm

How much need is there for a multiple image file quantizer? And does one exist already? I know this is a difficult programming problem, but my proposed solution relates to some studies I did on clustering and genetic algorithms (well when done efficiently anyway).

At the start I was just going to attempt a different approach to tile quantizing, but quither is proving to be a mighty program that fulfilled my conversion needs, and at a fast speed too (which is why I began to think of multiple files).

Multiple image file quanitizer description

Input:
- directory
- number of palettes to use
- bits per pixel
- number of colours to use in each palette

Output (per file in directory):
- image.img.bin
- image.map.bin
- image.pal.bin

#162608 - kusma - Fri Sep 05, 2008 9:21 pm

I've written one myself, but it's quite hacky and I'd love to see a proper tool for this. However, I'd prefer seeing it as a process-only tool (not conversion). That is, take in a series of PNG images and output a series of PNG files, all using the same palette.

#162609 - sgeos - Fri Sep 05, 2008 9:23 pm

It could be useful. Keep in mind that it will be more useful if it does not have GBA specific restriction. Ie, I might have a valid reason to want 64 palettes.

#162614 - keldon - Fri Sep 05, 2008 11:25 pm

Good point; bearing in mind it is quite a general problem any solution would probably be most effective as a process to be accessed by another program for its own uses and also be able to produce results for varying setups.

Well I'll get cracking on some algorithms and see what I can come up with.

Edit: Woah, check out what some microsoft developer did with just four colours ... http://moonflare.com/code/scolorq/rainbow.4.png

#162619 - Dwedit - Sat Sep 06, 2008 1:57 am

I just put all the images into one big file, then used Photoimpact to convert it to the number of colors I wanted.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#162627 - keldon - Sat Sep 06, 2008 10:10 am

Dwedit wrote:
I just put all the images into one big file, then used Photoimpact to convert it to the number of colors I wanted.


Exactly what I want to avoid! Another practice I sometimes employ is to seperate tiles into their own images so that I can use specific palettes for certain areas of the image and then merge the quantized images together - I find that I am [still] able to get much better results like this. Of course, not all images are well suited for this.

#162630 - silent_code - Sat Sep 06, 2008 10:52 am

Something that would top it off, where a (separate - like grit / wingrit) GUI front end with realtime preview. :^)
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.


Last edited by silent_code on Sun Oct 26, 2008 10:21 am; edited 1 time in total

#164269 - keldon - Sat Oct 25, 2008 1:11 am

For those curious what's happened; it's still on my forefront of programming tasks at home, but I play keyboard at church every sunday, am engineering at a studio every saturday and doing dance on saturday evening and sunday morning ... but it will happen <_<

Trying to make my working hours earlier to give myself more time in the evenings but it never works out that way!