Fixes processing/processing#1810 where a png data would be written instead of jpeg data.