Fork me on GitHub

FAQ

What are the pros and cons comparing with the default GalleryProcessor?

Good question. The default GalleryProcessor of the CMS uses imgscalr library to scale images.

The default GalleryProcessor of the CMS has the following advantages:

  • imgscalr is known as one of the best and most efficient libraries available in pure Java image processing solutions.
  • It also implementing the optimized incremental scaling algorithms.
  • It requires a Java standard buffered image object (such as javax.imageio.ImageIO) to resize images. Many Java programmers are familiar with the APIs in pure Java-based image processing.

However, there are some disadvantages, too:

  • It is well known that most pure Java-based image processing libraries are not as good as GraphicsMagick or ImageMagick in image processing qualities and supporting various image file formats in general.
  • It loads image data into javax.imageio.ImageIO to resize images, so it may consume much heap size in the same JVM, which might affect the Java application server if the upload image size and concurrent image uploading are not controlled carefully.

Meanwhile, Gallery Magick Image Processing Library and CMS Plugins has the following advantages:

  • GraphicsMagick or ImageMagick has a lot better support in image processing qualities and supporting various image file formats.
  • If GraphicsMagick or ImageMagick is used as out-of-process from the JVM instead of using JNI (e.g, im4java), then the image processing wouldn't affect the JVM heap of the Java application server.

However, there are some disadvantages when using this project modules, too:

  • It is not a pure Java-based solution, but it executes executable commands of GraphicsMagick or ImageMagick instead. Therefore, the system should have one of those installed on the server environment.
  • Because it depends on GraphicsMagick or ImageMagick, code maintainers should have knowledge on the detail of the command executions instead of Java standard APIs.
  • Because it's not a pure Java-based solution, most Application Performance Monitoring solutions might not be able to monitor the real image processing tasks properly.
Bottom line: In many cases, the default GalleryProcessor of the CMS is good enough especially when you don't need to convert big image files or various images in different formats. However, if your site should handle big image files or support many different image formats, then you may try using this plugin instead.

Here are some more you might want to read:

How about software license issues?

This project is licensed under the Apache Software License, Version 2.0. (See Project License).

GraphicsMagick is distributed under the "MIT" style license. See GraphicsMagick Copyrights and Licenses for detail.

ImageMagick is distributed under the Apache Software License, Version 2.0. See Terms and Conditions for Use, Reproduction, and Distribution * How to Apply the License to your Work for detail.