Search code examples
javaimagemagickaem

How to covert any Image to JEPG Format through ImageMagick in Java for AEM?


I need to Rendition for an Image in Java using ImageMagick.I know there are other OOTB implmenations like Web Renditions.But how to achieve this through Java?


Solution

  • I never tried it, probably you can try following.

    1. Install it in your system or server. It seems Java API of JMagick or Im4java are just interfaces to ImageMagick software installed.
    2. Use maven repository and embed the dependency with export of packages, so that API can be consumed. (http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#embedding-dependencies)
    3. Probably try this sample code for conversion (https://stackoverflow.com/a/10372485/2075487).