identify, input string

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
spieler
Posts: 47
Joined: 2004-10-08T09:03:16-07:00
Location: Iowa

Post by spieler »

If you want to read the image from standard in, you need to use a hyphen. You should be able to do something along the lines of

identify -format "%x %y" gif:- $stringContentOfImage

You may be able to specify just the "-" without the whole "gif:-", but I don't know that for sure.

You can find more info about "standard in" at
http://www.imagemagick.org/script/comma ... .php#input
spieler
Posts: 47
Joined: 2004-10-08T09:03:16-07:00
Location: Iowa

Post by spieler »

On second thought, standard in works more like

Code: Select all

  $cmd = 'echo ' . $img . ' | /usr/local/bin/identify -format "%x,%y" -';
I just tried
cat a.gif | identify -format "%x,%y" -
and it worked great.
Post Reply