You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by pieter van poyer <pi...@gmail.com> on 2021/07/01 15:31:53 UTC

[DISCUSS] Heic format on Android phones

Dear Cordova Devs

I'ld like to bring a little bit attention on next PR:
https://github.com/apache/cordova-plugin-camera/pull/731

The camera plugin can be configured to return a .png or a .jpeg image.
But when a wrong image type is selected then the image is returned in his
original type.

Samsung can work with .heic formats, when you take a picture the image is
returned in a .heic format. It is not possible to render the picture in an
img tag for example. I think we don't want to force backends to be able to
process this format.

So the PR transfers a .heic image to the encodingType (png or jpeg). This
seems to work great.
*What is your opinion on this? Is this okay? And can this be merged?*

*Should we try to do this same routine for other types too (like GIF, BMP,
... )?*
I'ld love to make a ticket for that.

As a side note, when you select a .gif file now, a .gif is returned, but
when you convert it to a .jpeg, then the animations are lost.
As a second side note, it seems like the ios implementation also returns a
..jpeg after selecting a .gif, and the animations are lost.

Kind regards
Pieter