jwasnoggin opened a new issue #568: Auto-detect encodingType for loading from photo album URL: https://github.com/apache/cordova-plugin-camera/issues/568 # Feature Request ## Motivation Behind Feature <!-- Why should this feature be implemented? What problem does it solve? --> When adding a photo from the gallery/photo album, you have to specify the encoding type in advance (either JPEG or PNG). But ideally it would be good to just load the file from the device without modifying it. ## Feature Description <!-- Describe your feature request in detail Please provide any code examples or screenshots of what this feature would look like Are there any drawbacks? Will this break anything for existing users? --> Rather than converting the file to the specified type, it would be good to have an option to use the existing type. Eg: ``` var cam = navigator.camera; var options = { sourceType: cam.PictureSourceType.SAVEDPHOTOALBUM, destinationType: cam.DestinationType.FILE_URI, options.mediaType = cam.MediaType.PICTURE; options.encodingType = cam.MediaType.AUTO; // Use the filetype of the existing file } cam.getPicture(gotMediaFn, errorFn, options); ``` ## Alternatives or Workarounds <!-- Describe alternatives or workarounds you are currently using Are there ways to do this with existing functionality? --> The only option that I can see currently is to always convert the file to either JPEG or PNG.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
