Difference between jpg files from Matlab and ImageMagick

1 view (last 30 days)
Hi all,
I have a pgm file that I convert to jpg via matlab. To this end I use imread to read the file and imwrite to write it again. Inbetween I adjust the compression ratio by using the quality parameter. Finally I compute the error caused by the compression and compare it to the compression ratio.
If I do the same with Image Magick, I get significantly better results. For a given quality value, the resulting images look very similar (errors are roughly the same) but sometimes Graphics Magick achieves half the file size of Matlab.
Does anybody have an explanation for this? I was assuming that specifying the same quality level yields similar results independent of the software that I use for the conversion.
  1 Comment
Geoff Hayes
Geoff Hayes on 15 Oct 2014
Laurent - what is the line of code that you are using in MATLAB to adjust the compression ratio?

Sign in to comment.

Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!