jpg to jpeg2000

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
KuntzeM
Posts: 2
Joined: 2016-12-17T14:38:35-07:00
Authentication code: 1151

jpg to jpeg2000

Post 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
Jason S
Posts: 103
Joined: 2010-12-14T19:42:12-07:00
Authentication code: 8675308

Re: jpg to jpeg2000

Post 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.
KuntzeM
Posts: 2
Joined: 2016-12-17T14:38:35-07:00
Authentication code: 1151

Re: jpg to jpeg2000

Post 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
Post Reply