JPG -> Crop -> PDF is all white, and uncropped size.
Posted: 2010-04-02T23:02:50-07:00
When opening a large image, cropping the left half of it, and saving as a 300 dpi PDF, things have gone wonky since 6.4.0
The following code is rock solid on 6.4.0, however, I rebuilt 6.5.3 and 6.6.0, and the output image is all white and the width is the full size of the image as though it was never cropped, even though MagickGetImageWidth/Height give what appear to be correct values after MagickCropImage call. Doing nothing but reverting IM 6.4.0 the output is perfect.
Ideas?
The following code is rock solid on 6.4.0, however, I rebuilt 6.5.3 and 6.6.0, and the output image is all white and the width is the full size of the image as though it was never cropped, even though MagickGetImageWidth/Height give what appear to be correct values after MagickCropImage call. Doing nothing but reverting IM 6.4.0 the output is perfect.
Ideas?
Code: Select all
$imageWand = NewMagickWand();
MagickCropImage( $imageWand, round( ($point_width) * COVER_REZ ), round( MagickGetImageHeight( $imageWand ) ), round( MagickGetImageWidth( $imageWand ) - ($point_width * COVER_REZ) ), 0 );
MagickResizeImage( $imageWand, (1026*COVER_REZ), (846*COVER_REZ), MW_GaussianFilter, .5 );
MagickSetResolution( $imageWand, 300, 300 );
MagickWriteImage( $imageWand, $tempFile );
DestroyMagickWand( $imageWand );