views:

133

answers:

2

I have a script that runs recursively over many directories, and I'd like to convert all the 8bpp images to 4bpp ones. Is there something already written that can perform this sort of thing? I'd like to avoid to write the conversion in Ruby. Maybe something written in C could offer some performance boost?

Any ideas?

+2  A: 

Take a look at RMagick. With that you can quantize the image to 16 colors.

Jonas Elfström
I tried quantizing it to 16 colors, but rmagick says it still has 8bpp.
Geo
What's the image format and why 4bpp?
Jonas Elfström
+1  A: 

I am very fond of the CImg Library (current version 1.3.1). It's open source, and I found it on SourceForge.com.

It handles about all image formats actualle known and used.

Good luck trying it.

Filip P.