Hi all,
I'm trying to do a simple thumbnail generation from an image that isn't located on my server using the iMagick wrapper for ImageMagick. For some reason, the following code will not display anything when called:
<?php
$image = new Imagick("http://kunaki.com/ProductImage.ASP?T=I&ST=FO&PID=PX003Y9EDJ");
$image->thumbnailImage(100, 0);
header( "Content-Type: image/jpg" );
echo $image;
?>
I've also tried using http://kunaki.com/ProductImage.ASP?T=I&ST=FO&PID=PX003Y9EDJ.jpg
to no avail.
Based on comments below, I've attempted this as well with no results, but am not sure if the syntax is correct.
<?php
$kunaki_image = file_get_contents("http://kunaki.com/ProductImage.ASP?T=I&ST=FO&PID=PX003Y9EDJ");
$name = tempnam("/tmp", "kunaki");
$final = file_put_contents($name, $kunaki_image);
$image = new Imagick($final);
$image->thumbnailImage(100, 0);
header( "Content-Type: image/jpg" );
echo $image;
?>
Does anyone have any suggestions?
Thanks!