Skip to content
  • Jehan's avatar
    app, libgimp: core loads thumbnail from metadata if no GimpThumbnailProcedure… · 77a30bfd
    Jehan authored
    … is set.
    
    The order for thumbnail creation in gimp_imagefile_create_thumbnail() is now:
    
    1. If there is a GimpThumbnailProcedure, it is run first.
    2. Otherwise we check if a thumbnail is in the metadata.
    3. As last resort, we just load the full image.
    
    Part of the fix was to copy gimp_image_metadata_load_thumbnail() into the core
    code. I have been wondering if we could not drop the same function from libgimp
    and remove the GimpThumbnailProcedure frome file-jpeg, since it just uses the
    metadata thumbnail and it is the only plug-in using this code.
    Also it is much faster to run this in core and it's generic function which makes
    thumbnail loading from Exif data working for every format supported by Exiv2.
    
    On the other hand, the file-jpeg thumbnail procedure also gathers a few more
    useful information, such as the color model (in a reliably manner, since based
    on JPEG header, unlike from metadata which may be wrong).
    77a30bfd