Printing image attributes using special format characters
Printing image attributes using special format characters
I'm trying to Print an images "Palette size" by embedding special format characters. The IM special characters page (http://www.imagemagick.org/script/escape.php) doesn't list a special character for palette size. I tried several similar special characters, like %q and %z, and could not find the right one for palette size. Is there a special format character that can print the palette size? Thanks
Re: Printing image attributes using special format character
Take a look here:
http://www.imagemagick.org/Usage/basics/#ping
trying using -identify -ping on the image to find the pallate size.
http://www.imagemagick.org/Usage/basics/#ping
trying using -identify -ping on the image to find the pallate size.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Printing image attributes using special format character
this works:
convert rose: -type palette rose_palette.gif
colormap=`identify -verbose rose_palette.gif | sed -n 's/^.*Colormap:[ ]*\(.*\)$/\1/p'`
echo $colormap
256
convert rose: -type palette rose_palette.gif
colormap=`identify -verbose rose_palette.gif | sed -n 's/^.*Colormap:[ ]*\(.*\)$/\1/p'`
echo $colormap
256