breautek commented on issue #974: URL: https://github.com/apache/cordova-plugin-camera/issues/974#issuecomment-5343642391
I didn't review the codebase but I believe orientation corrections works off of EXIF data which is a jpeg construct -- not something that exists in PNG formats. Additionally PNG formats is intended to be a progressive format, so that renders can progressively render the image on the fly without loading in the entire binary. So the pixel data is **suppose** to assume the order of top-left to bottom right. So that's my educated guess on why correctOrientation does nothing for PNGs -- and if I'm correct then it also poses the problem on how we can orientate the picture if we don't have a reference point. <details> <summary>On my android device, with the native camera app (so zero cordova influence):</summary> |Orientation Lock|Orientation|Picture| |---|---|---| |Locked|Portrait|<img width="480" height="853" alt="Image" src="https://github.com/user-attachments/assets/015a3cf9-6570-4576-993a-2e5314000136" />| |Locked|Landscape|<img width="480" height="270" alt="Image" src="https://github.com/user-attachments/assets/3311ffbf-c40a-4528-99f1-a3d10a09fb3e" />| |Unlocked|Portrait|Effectively the same as locked| |Unlocked|Landscape|Effectively the same as locked| </details> <details> <summary>Cordova camera plugin:</summary> |Orientation Lock|Orientation|Picture| |---|---|---| |Locked|Portrait|<img width="480" height="987" alt="Image" src="https://github.com/user-attachments/assets/cc0b01d2-6fdb-4c82-b36b-a81615ed72f6" />| |Locked|Landscape|<img width="480" height="987" alt="Image" src="https://github.com/user-attachments/assets/6f9520a9-ab97-4955-90d1-b97cd4b9f6d1" />| |Unlocked|Portrait|Effectively the same as locked| |Unlocked|Landscape|Effectively the same as locked| </details> Side note: the code snippet doesn't reflect the actual cordova API signature, which expects success callback, fail callback, then options. Issue does seem to reproduce on my API 29 device as well. So the bug appears reproducible. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
