capawesome-team / capacitor-plugins

⚡️ Community plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/
241 stars 41 forks source link

feat(file-compressor): keepExif parameter to control over the exif data #117

Open stephan-fischer opened 10 months ago

stephan-fischer commented 10 months ago

Plugin(s)

Current problem

Currently its not possible to compress the image and keep control over the exif data.

Preferred solution

A parameter to keep or remove the exif from the new compressed image like:

  const { path } = await FileCompressor.compressImage({
    mimeType: 'image/jpeg',
    keepExif: false,
    path: 'content://com.android.providers.downloads.documents/document/msf%3A1000000485',
    quality: 0.7,
  });

Alternative options

No response

Additional context

No response

Before submitting

robingenz commented 10 months ago

Hey Stephan, thank you for your request! I will take a look at it at the weekend.

robingenz commented 10 months ago

Currently its not possible to compress the image and keep control over the exif data.

Does this problem exist on Android and iOS?

stephan-fischer commented 10 months ago

I mean, on both platform it would be nice to decide to strip or not to strip the metadata 😊 Currently i dont know the default behavior. Maybe this should be documented.

robingenz commented 10 months ago

I've just had a look and it should be possible. However, I'm leaving this feature request open for now as I need to work on some other projects first.