capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

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

Open stephan-fischer opened this issue 1 year ago • 4 comments

Plugin(s)

  • [ ] Android Foreground Service
  • [ ] Android Battery Optimization
  • [ ] App Update
  • [ ] Background Task
  • [ ] Badge
  • [ ] Cloudinary
  • [ ] Datetime Picker
  • [X] File Compressor
  • [ ] File Opener
  • [ ] File Picker
  • [ ] Managed Configurations
  • [ ] NFC
  • [ ] Photo Editor
  • [ ] Screen Orientation

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

  • [X] I have read and followed the feature request guidelines.
  • [X] I have attached links to possibly related issues and discussions.

stephan-fischer avatar Jan 10 '24 10:01 stephan-fischer

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

robingenz avatar Jan 10 '24 10:01 robingenz

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

Does this problem exist on Android and iOS?

robingenz avatar Jan 12 '24 22:01 robingenz

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.

stephan-fischer avatar Jan 13 '24 11:01 stephan-fischer

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.

robingenz avatar Jan 14 '24 09:01 robingenz