The width and height parameters passed to onImageCrop are the inverse of the actual image dimensions for the image located at parameter uri.
This only happens for EXIF-rotated pictures, (e.g. Orientation: 6). The Canhub library properly resets the Orientation value to 0 and updates ImageWidth and ImageHeight in the EXIF headers, but by using the dimensions of cropRecthere, the returned width and height are wrong.
This breaks some stuff on my side, since I'm relying on those 2 parameters to do some extra processing.
PS: Any way to preserve EXIF aside from Orientation? All the other metadata in there are stripped as well, unfortunately.
The
width
andheight
parameters passed toonImageCrop
are the inverse of the actual image dimensions for the image located at parameteruri
.This only happens for EXIF-rotated pictures, (e.g.
Orientation: 6
). The Canhub library properly resets theOrientation
value to0
and updatesImageWidth
andImageHeight
in the EXIF headers, but by using the dimensions ofcropRect
here, the returned width and height are wrong.This breaks some stuff on my side, since I'm relying on those 2 parameters to do some extra processing.
PS: Any way to preserve EXIF aside from
Orientation
? All the other metadata in there are stripped as well, unfortunately.