cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard B Knoll (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7276) correctOrientation is applied only for JPEG images
Date Tue, 03 Nov 2015 20:22:27 GMT

    [ https://issues.apache.org/jira/browse/CB-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988038#comment-14988038
] 

Richard B Knoll commented on CB-7276:
-------------------------------------

PNG files don't have EXIF, which is why that check is being made. PNG files do have metadata
support but I don't think Android has a built in way to read it and I'm not sure if orientation
data is generally included. We could potentially always take images as JPEG and then convert
them, but that sounds like a pretty inefficient hack. 

> correctOrientation is applied only for JPEG images
> --------------------------------------------------
>
>                 Key: CB-7276
>                 URL: https://issues.apache.org/jira/browse/CB-7276
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 3.5.0
>         Environment: Android
>            Reporter: Petrus Repo
>
> Some Android devices (eg. Samsung S3 running Android 4.1 and Android 4.3) will set wrong
orientation for pictures. Using correctOrientation==true will fix the resulting image to have
the correct orientation.
> However, orientation is only corrected for JPEG images. If you set Camera.EncodingType.PNG
then the resulting image will have wrong orientation on those devices carrying this bug. (eg.
Nexus5 on 4.4 does not have the bug so it's not affected, but Samsung S3s are)
> Line CameraLauncher#processResultFromCamera:344 (*) has "if (this.encodingType == JPEG)"
and inside the orientation is inspected. There should be no reason limit the orientation fix
only for JPEG images.
> rotate = N is needed in order to apply the orientation fix (**).
> (*) https://github.com/apache/cordova-plugin-camera/blob/e4ab155fd097381151357b64e69a1e6f40b076a5/src/android/CameraLauncher.java#L344
> (**) https://github.com/apache/cordova-plugin-camera/blob/e4ab155fd097381151357b64e69a1e6f40b076a5/src/android/CameraLauncher.java#L371



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message