[PATCH] Raw Rotated images are truncated
Submitted by Jean-Baptiste Mayer
Link to original bug (#770917)
Description
Created attachment 334859 patch
Hi,
While processing CR2 (Canon RAW) and NEF (Nikon Raw) images I found that my horizontal pictures would process fine but vertical would crop to square and rescale non proportionally.
For these vertical pictures get_bounding_box would return unrotated picture dimensions while process() would fill a buffer of rotated dimensions. This seems to be an old issue - see https://bugzilla.gnome.org/show_bug.cgi?id=755078#c1 . Funnily enough this was also the case with the old DCRaw-based loader.
This patch swaps the width and height of the picture obtained from libraw when libraw indicates the image is to be rotated +/-90 degrees.
This patch was tested against an admittedly unrepresentative sample of holiday photos - both vertical and horizontal.
Patch 334859, "patch":
0001-Raw-load-libraw-bounding-box-correction-for-rotated-.patch
Version: git master