JDK-8100251 : Add Image.thumbnail property to control use of embedded thumbnails
  • Type: Sub-task
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx1.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2008-11-22
  • Updated: 2015-06-16
  • Resolved: 2011-04-15
Description
Most JPEG images (esp. those from digital cameras) contain an embedded thumbnail representation, which can be loaded quickly and easily using ImageReader.readThumbnail().  The thumbnail isn't usually of high quality, but it often is good enough for many applications (e.g. image viewers) that just want to load and display lots of thumbnails as fast as possible.  We should add a boolean property to the javafx.scene.image.Image class that controls whether the embedded thumbnail should be used, if available:

    /**
     * Indicates whether the embedded thumbnail representation (if available) of the source image file
     * should be used for constructing a scaled-down representation of this image.  The default value
     * is false.  Setting this to true may result in significantly faster creation of thumbnail-sized images,
     * especially when the source image is very large, but may result in a lower-quality image.
     */
    public-init var thumbnail:Boolean = false;

Another thought is to somehow tie this in with the placeholderImage and backgroundLoading properties, so that if backgroundLoading is true but placeholderImage is null, we could consider using the embedded thumbnail as a placeholder image.


Comments
No plan to address this.
15-04-2011