Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

[Android] width and height returned by onImageCrop are swapped for EXIF-rotated pictures. #4

Description

@Mouwrice

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 cropRect 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.

Originally posted in hhunaid#66

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions