Page 1 of 1

jpg to jpeg2000

Posted: 2016-12-17T14:55:30-07:00
by KuntzeM
Hi,
I hope you can help me.

I have to convert different image to the jpeg2000 format.
I'm not sure which parameter I need to use.

I converted a images as jpg and jpeg2000 with a quality of 10%. Both images look equal and both have block artefacts.
But jpeg2000 can not have block artefact. They have blurring artefacts.
jpg:

Code: Select all

convert original.jpg -quality 10 test_q10.jpg
jpeg2000:

Code: Select all

convert original.jpg -quality 10 test_q10.jp2
I can see that image from the following command is lossless encoded, but why?

Code: Select all

convert original.jpg -define jp2:rate=10 -define jp2:quality=10 test_jp2_q10.jp2
What is wrong on my commands?
Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-29

here are my example images (original image from german wikipedia: https://de.wikipedia.org/wiki/JPEG_2000#Beispielbilder)
https://www.dropbox.com/sh/6lirk2yzqqoy ... 6vc9a?dl=0

Re: jpg to jpeg2000

Posted: 2016-12-20T08:13:03-07:00
by Jason S
The test_q10.jp2 and test_jp2_q10.jp2 files from your dropbox link are not JPEG2000 files. They are regular JPEG files with an incorrect extension.

I tried your commands (with a newer version of ImageMagick) and correctly got JPEG2000 files. However, a quality of 10 seems to be too low to get much more than a blank image.

Re: jpg to jpeg2000

Posted: 2016-12-21T07:54:51-07:00
by KuntzeM
Hi,
thank you for you answer.
yes this is a problem. .jp2 is a jpeg2000 extension and imagemagick have to transcode the image to jpeg2000. But he doesn't it.

Which version are you using?

Can I install a newer version with the ubuntu package manager?

regards
Mathias