[RFR] JDK-8209457] [WebView : Canvas.toDataURL with image/jpeg MIME type fails

Arunprasad Rajkumar arunprasad.rajkumar at oracle.com
Thu Aug 16 18:46:37 UTC 2018

Hi Kevin, Murali,

Please review the fix for following bug,


Root cause:
BufferedImage is created with ARGB color model while converting from PrismImage to JPEG. JPEG doesn't supports alpha channel, which leads to error while encoding to JPEG image.

Proposed fix:
HTMl applications passes the destination image mime type, make use of it and hardwire the color model as RGB when the mime type is 'image/jpeg'.

webrev: http://cr.openjdk.java.net/~arajkumar/8209457/webrev/


More information about the openjfx-dev mailing list