Skip to content
Advertisement

ImageMagick: How to compare original PNG to lossy JPEG?

I want to compare original PNG image to lossy JPEG image to see how much I am loosing. I found that I can use ImageMagic to compare images. I prefer using Java (im4java). I am very confused with their documentation (http://www.imagemagick.org/script/compare.php). It doesn’t describe which platform it is for. How do I use these command lines and are they even available in im4java? If someone can write steps on how I use it I will appreciate it.

Advertisement

Answer

ImageMagick runs on many platforms. If you click Binary Releases, they have a listing of available packages. The im4java library, as its home page describes, calls the ImageMagick command line tools to do its work, so it will run on any platform that supports both ImageMagick and Java. Browsing through its API documentation, it looks like the compare command is not available in im4java, so you must modify im4java to support it.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement