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