Howto: change the bit depth of a png using imagemagick

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Howto: change the bit depth of a png using imagemagick

#1 Post by disciple »

I wanted to convert pngs to 4bit, and it was difficult to find a command that worked i.e. imagemagick with the -depth option. Imagemagick has other options that sound like they do it, but they don't!

Code: Select all

# PNG is smaller than jpg, but it seems html2ps only accepts 4bit png, otherwise it converts to a noisy jpeg!
for i in !(*_4bit).png
 do
  # we will write the png here instead
  #( mv "$i" "${i%%.*}.PNG" ) &
  ( convert "$i" -depth 4 "${i%%.*}_4bit.PNG" ) &
 done
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Post Reply