erisu commented on code in PR #910:
URL: 
https://github.com/apache/cordova-plugin-camera/pull/910#discussion_r1817523693


##########
src/android/CameraLauncher.java:
##########
@@ -1291,11 +1291,12 @@ public void processPicture(Bitmap bitmap, int 
encodingType) {
 
         try {
             if (bitmap.compress(compressFormat, mQuality, jpeg_data)) {
+                StringBuilder sb = new StringBuilder();
+                sb.append("data:image/jpeg;base64,");

Review Comment:
   I believe the `encodingType` that is passed into `processPicture` could be 
either `JPG` or `PNG`.
   
   Maybe use `getMimetypeForEncodingType` to get the correct mime type?  It 
should return `PNG_MIME_TYPE` (`image/png`) for `PNG` or `JPEG_MIME_TYPE` 
(`image/jpeg`) for `JPEG`.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to