[magick-users] Identify: image from stdin

Artyom Gilmanov tyomabox at googlemail.com
Mon Oct 6 00:36:15 PDT 2008


I wander how can I get properties of an image, like height and wight, of
image from stdin. I try to do like this:

MagickImageClass img = new MagickImageClass();
FileStream stream = File.OpenRead(@"D:\TMP\3.gif");
Byte[] imageData = new Byte[(int)stream.Length];
stream.Read(imageData, 0, (int)stream.Length);
object[] param = new object[] { string.Format("-ping"), string.Format("-"),
imageData };
object obj = img.Identify(ref param);

But I got the exception:
System.Runtime.InteropServices.COMException was unhandled
  Message="identify: 410: Null blob argument: ????"
  Source="ImageMagickObject.MagickImage.1"
  ErrorCode=-2147215503

Can anybody help me?


More information about the Magick-users mailing list