Changes between Initial Version and Version 1 of Ticket #15574


Ignore:
Timestamp:
2017-11-20T05:33:04+01:00 (8 years ago)
Author:
cmuelle8
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15574 – Description

    initial v1  
    99This may cause issues when trying to load images with large dimensions, if the heap space cannot hold the buffer of a full decode of the image.  JPEG loading however may be done in a way that the native decoding library decodes and scales the image on the fly (before the pixels are being sent to a BufferedImage).
    1010
    11 JDK8 and JDK9 already ''use'' jpeg or turbojpeg system libraries in the background to do the heavy lifting, but there does not seem to be a proper way in those JDKs to delegate the scaling wish down to the JNI level.  The imageio framework has {{{canSetSourceRenderSize()}}} to check if a plugin can handel a custom source render size, but this is currently (JDK7, JDK8, JDK9) not implemented for the JPEG decoder, see
     11JDK8 and JDK9 already ''use'' jpeg or turbojpeg system libraries in the background to do the heavy lifting, but there does not seem to be a proper way in those JDKs to delegate the scaling wish down to the JNI level.  The imageio framework has {{{canSetSourceRenderSize()}}} to check if a plugin can handle a custom source render size, but this is currently (JDK7, JDK8, JDK9) not implemented for the JPEG decoder, see
    1212* https://docs.oracle.com/javase/9/docs/api/javax/imageio/ImageReadParam.html#canSetSourceRenderSize--
    1313* https://docs.oracle.com/javase/9/docs/api/index.html?javax/imageio/plugins/jpeg/JPEGImageReadParam.html