bit-depth

Reduce bit-depth of PNG files from the command line

What command or series of commands could I execute from the CLI to recursively traverse a directory tree and reduce the bit-depth of all PNG files within that tree from 24bpp to 16bpp? Commands should preserve the alpha layer and should not increase the file size of the PNGs - in fact a decrease would be preferable. I have an OSX based...

How can I check the color depth of a Bitmap?

I'm working on an application that prints a folder of image files, including JPEG and TIFF. The TIFF images are usually Black and White (1bpp). After loading the image, I want to determine if the image is Color or B&W or Grayscale so I can send the image to the right printer (color printer or black and white printer). I'm using the Bi...