ImageMagick Logo ImageMagick Sprite
Unix
Mac OS X
iOS
Windows
Processing
Options
Usage
MagickWand
MagickCore
PerlMagick
Magick++
Unix
Windows
Links

ImageMagick JPEG-2000 Image Format

ImageMagick's JPEG-2000 image formats, JP2 and JPC, accept a plethora of encoding options as detailed below. As an example, suppose you are interested in these options:

Use this command to convert a JPEG-2000 image to the PNG image format:

$magick> convert wizard.jp2 wizard.png

Here we extract an area from the image:

$magick> convert 'wizard.jp2[640x480+0+0]' wizard.png

Extract a particular tile from the image:

$magick> convert 'wizard.jp2[2]' wizard.png

Specify a subsampling factor:

$magick> convert wizard.png -colorspace YUV -sampling-factor 2,2 wizard.jp2

Save a tiled JPEG-2000 image:

$magick> convert wizard.png 'wizard.png[512x512]'

Write a digital Cinema 4K profile compliant codestream:

$magick> convert wizard.png -resize 4096x2160! -depth 12 wizard.jp2

Here is a complete list of JPEG-2000 decoding options:

jp2:layer-number=x
set the maximum number of quality layers to decode.
jp2:reduce-factor=x
set the number of highest resolution levels to be discarded.

Here is a complete list of JPEG-2000 encoding options:

jp2:number-resolutions=x
number of resolutions to encode.
jp2:quality=x,x,...
set the quality layer PSNR, given in dB. The order is from left to right in ascending order. The default is a single lossless quality layer.
jp2:rate=x,x,...
the compression ratio values. Each value is a factor of compression, thus 20 means 20 times compressed. The order is from left to right in descending order. A final lossless quality layer is signified by the value 1. The default is a single lossless quality layer.
jp2:progression-order=x
choose from LRCP, RLCP, RPCL, PCRL or CPRL.