You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to read an open filehandle results in imagemagick detect the fiel as a TIFF and then only reads the low-res preview.
`
$filename='_X000001.NEF';
$preview='_X000001.jpg'
$fh = fopen("/src-dir/$filename", "r");
$im->readImageFile($fh);
$imageinfo = $im->identifyImage();
$im->resizeImage(1024, 768, Imagick::FILTER_LANCZOS, 1);
$im->setImageFormat('jpg');
$im->writeImage("/dst-dir/$preview");
$im->clear();
$im->destroy();
// do other stuff with source file
fclose($fh);
`
results in $imageinfo showing format = "TIFF (Tagged Image File Format)"
and the output jpg is super blurry as it end being scaled up from the NEF preview a tiny 160x120px, instead of the full size NEF 3280x4928
The text was updated successfully, but these errors were encountered:
I'm encountering the same issue with NEF pictures within the Memories app of Nextcloud.
They are using readImageBlob which picks the TIFF thumbnail instead of the source file (for ref: pulsejet/memories#1054)
Try to replicate the issue using the command line ImageMagick tools. If you can do that, the maintainers of ImageMagick are far more likely to look at the issue quickly.
Try to read an open filehandle results in imagemagick detect the fiel as a TIFF and then only reads the low-res preview.
`
$filename='_X000001.NEF';
$preview='_X000001.jpg'
$fh = fopen("/src-dir/$filename", "r");
$im->readImageFile($fh);
$imageinfo = $im->identifyImage();
$im->resizeImage(1024, 768, Imagick::FILTER_LANCZOS, 1);
$im->setImageFormat('jpg');
$im->writeImage("/dst-dir/$preview");
$im->clear();
$im->destroy();
// do other stuff with source file
fclose($fh);
`
results in $imageinfo showing format = "TIFF (Tagged Image File Format)"
and the output jpg is super blurry as it end being scaled up from the NEF preview a tiny 160x120px, instead of the full size NEF 3280x4928
The text was updated successfully, but these errors were encountered: