Adobe-Consulting-Services/acs-aem-commons — pull request #106 by davidjgonzalez (2014-01-25 20:14:54+00:00)
Title: Feature/named transform image servlet

Feature discussed in issue #72

Items of note in pull request
* Now supports serving image encoded based on the last suffix segments "extension" unless unsupported.
* Ex. HTTP GET /content/dam/foo.jpeg.transform/super/1234567890/image.png will re-encode and serve the image as a PNG (not the "native" jpeg format).
Ex. HTTP GET /content/dam/foo.jpeg.transform/super/1234567890/image.immadeup will serve the image as a JPEG (assuming foo.jpeg is actually a jpeg and not a poorly named file).
* Not sure how to best write Unit test for `NamedImageTransformerImpl.java`'s `resolveImage()` or `transform()`. Unless someone has some tricks, it will yield extremely brittle tests of mocks orchestrated in the tests to simply meet the implementation details of the methods which isnt very useful.
* Added a "smartBounding" to Crop transform. This allows crops bounds that exceed the size of the image to be shrunk the smallest amount to fit said image, crop, and then resize back up to the original request crop size; This is optionally enabled via the `smart=true` transform param.
* Added a few convenience methods to OsgiPropertyUtil and PathInfoUtil (with supporting tests).