Gallery Magick Image Processing provides an image file processing library and CMS plugins to manipulate image files, using any of these:
org.onehippo.forge.gallerymagick.core.command.ScalrProcessorUtils utility class provides a pure Java based image identifying/resizing solution.
Gallery Magick Image Processing basically aims to provide the following:
You can check out, build and run demo application, which configures Magick Command Gallery Processor Plugin.
Here are example commands to check out, build and run demo application:
$ svn checkout https://forge.onehippo.org/svn/gallery-magick/gallery-magick-demo/trunk gallery-magick-demo-TRUNK $ cd gallery-magick-demo-TRUNK $ mvn clean verify $ mvn -P cargo.run
Visit http://localhost:8080/cms/, move to the "Content" perspective and select "Images".
And select a folder and try to upload an image.
If you click on the "Upload" button, you will see the image being uploaded.
You don't see anything new yet. :-) It's basically working like how the default Gallery Processor works, so the functionally is almost the same.
However, if you take a look at the logs (the demo project is configured to leave logs in DEBUG level for the plugin related code by default), you will see the following which shows clues about how the plugin works under the hood!
DEBUG Storing original image source file ('hippo.jpg') to '/home/test/gallery-magick-demo-TRUNK/target/tomcat8x/temp/_magickproc4906313564750098789.jpg'. DEBUG Resizing the original image file ('/home/test/gallery-magick-demo-TRUNK/target/tomcat8x/temp/_magickproc4906313564750098789.jpg') to '/home/test/gallery-magick-demo-TRUNK/target/tomcat8x/temp/_magickproc_hippogallery_thumbnail3045475676360292044.jpg' with dimension, 60x60. DEBUG Storing an image binary at '/content/gallery/gallerymagickdemo/samples/hippo.jpg/hippo.jpg/hippogallery:thumbnail' from file at '/home/test/gallery-magick-demo-TRUNK/target/tomcat8x/temp/_magickproc_hippogallery_thumbnail3045475676360292044.jpg'. DEBUG Removing the resized target image file at '/home/test/gallery-magick-demo-TRUNK/target/tomcat8x/temp/_magickproc_hippogallery_thumbnail3045475676360292044.jpg'. DEBUG No scaling parameters specified for hippogallery:original or width or height is zero or negative. So use original image DEBUG Storing an image binary at '/content/gallery/gallerymagickdemo/samples/hippo.jpg/hippo.jpg/hippogallery:original' from file at '/home/test/gallery-magick-demo-TRUNK/target/tomcat8x/temp/_magickproc4906313564750098789.jpg'. DEBUG Removing the original image file at '/home/test/gallery-magick-demo-TRUNK/target/tomcat8x/temp/_magickproc4906313564750098789.jpg'.
Note: the log data shown above were minified for readability.
Basically, when either of the non-Java based solution, the plugin copies the original image data to a temporary file and resizes the temporary file of the original image for a thumbnail image by executing commands of either GraphicsMagick or ImageMagick. After executing the commands, it deletes all the temporary files.
Also, try to crop and restore thumbnails in the CMS UI to get more clues.