Uploaded image for project: 'Bloomreach Forge'
  1. Bloomreach Forge
  2. HIPFORGE-291

[Gallery Magick] Add -size option and +profile option for better performance

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: gallery-magick-3.0.1
    • Fix Version/s: gallery-magick-3.0.2
    • Component/s: None
    • Labels:
      None
    • Similar issues:

      Description

      According to GraphicsMagick documentation [1],

       To make a thumbnail of a JPEG image, use:
      
          gm convert -size 120x120 cockatoo.jpg -resize 120x120 +profile "*" thumbnail.jpg
      
      
      	In this example, '-size 120x120' gives a hint to the JPEG decoder that the image is going to be
              downscaled to 120x120, allowing it to run faster by avoiding returning full-resolution images to
              GraphicsMagick for the subsequent resizing operation. The '-resize 120x120' specifies the desired
              dimensions of the output image. It will be scaled so its largest dimension is 120 pixels. The
              '+profile "*"' removes any ICM, EXIF, IPTC, or other profiles that might be present in the input and
              aren't needed in the thumbnail.
      

      So, if "-size WxH" is provided, the decoder may run faster. When experimenting it with an example image file, it makes a big difference as well. e.g, 0.2s vs 1.2s.

      Also, when resizing an image to create a variant, it makes sense to remove the ICM, EXIF, IPTC metadata from the image as those metadata still exists in the original image file anyway. We don't need to provide all the metadata such as digital camera info or geo coordinates, etc. on the thumbnail images, for instance.

      [1] http://www.graphicsmagick.org/convert.html

        Attachments

          Activity

            People

            • Assignee:
              wko Woonsan Ko
              Reporter:
              wko Woonsan Ko
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: