Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix issue 711 heic format #731

Merged

Conversation

PieterVanPoyer
Copy link
Contributor

@PieterVanPoyer PieterVanPoyer commented May 23, 2021

Platforms affected

Android

Motivation and Context

Fixes #711

Description

When a .heic image is selected from a gallery it is converted to a .jpeg or .png image.

A .heic image is a format supported by Samsung phone's to take quality pictures.
But the .heic format cannot be handled by the webview part. (F.e. an image tag does not support it).
So the .heic image is converted by the Android build in HeicConverter.

In the webview part the returned image can be shown in an image tag or it can be send to the server.

Some extra code cleanup is done too.

Testing

Testing in the emulator with next repo: https://github.com/PieterVanPoyer/cordova-camera-plugin-testing-app/tree/features/issue-711-heif-format

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@PieterVanPoyer
Copy link
Contributor Author

There is a small discussion in the issue log. (see #711 (comment) )
Maybe more formats should be converted to the encodingType of the options.

But I do not like to make such a change right away. Such a change needs a little bit more discussion I think.

Copy link
Contributor

@breautek breautek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok to me

@PieterVanPoyer PieterVanPoyer changed the title Bugfix issue 711 heif format Bugfix issue 711 heic format May 27, 2021
@PieterVanPoyer PieterVanPoyer merged commit 75bf807 into apache:master Aug 9, 2021
DavidWiesner pushed a commit to DavidWiesner/cordova-plugin-camera that referenced this pull request Dec 7, 2021
* Android - issue/711 - support .heic format

(cherry picked from commit 75bf807)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getPicture heic to jpeg support on Samsung Android phones
2 participants