JavaScript
x
<?php
header('Content-type: image/jpeg');
$image = new Imagick('image.jpg');
// If 0 is provided as a width or height parameter,
// aspect ratio is maintained
$image->thumbnailImage(100, 0);
echo $image;
?>
is giving error The image “http://localhost/test/into.php” cannot be displayed because it contains errors.Solve this please?
Advertisement
Answer
Your image is created at 0 px height and probably invalid format. Try and see docs.
JavaScript
$image->thumbnailImage(100, 100);