Hi,
I'm new with ImageMagick, so stuck with one problem.
I need IM Identify function to get image size, and it works sweet.
But it need attribute to be filename. And for particular reason i have picture in variable as binary data (I can't avoid it).
With GD there was not problems because ImageCreateFromString make image resource. But now I need IM because new versions of GD don't support GIF.
So, this code works nice:
<?php
$commandIM = "identify image.jpg";
exec ($commandIM, $output, $result);
print_r ($output);
?>
But how to make it work from binary dana, not filename ? This is not working because IM Identify works with file directly:
<?php
$filename = "image.jpg";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
exec ($contents, $output, $result);
print_r ($output);
?>
Ofcourse I can save temporary filename and then get with IM and delete, but want avoid that slow-down if there is other ways.
:glare:
Thanks,
Boris