I am reading an 8.5 x 11" PDF and creating a jpg thumbnail.
I want to crop all but approx the bottom 10% of the image. (basically only want the footer in the final)
$pdf_file = $file;
$save_to = 'bottom.jpg';
$img = new imagick();
$img->setResolution(300,300);
$img->readImage("{$pdf_file}[0]");
$img->scaleImage(800,0);
$img->setImageFormat('jpg');
$img = $img->flattenImages();
$img->cropImage(0,0,0,350);
$img->writeImages($save_to, false);
echo '<img src="bottom.jpg">';
The output of the above code produces a jpg showing the footer, however the image is 800px W X 685px H with white space on top of the footer.
I just want the footer at 800px W X approx 200px H.