8 <meta charset="utf-8" />
9 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
10 <meta http-equiv="x-ua-compatible" content="ie=edge" />
11 <title>JP2 Encoding Options @ ImageMagick</title>
12 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
13 <meta name="application-name" content="ImageMagick"/>
14 <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
15 <meta name="application-url" content="https://www.imagemagick.org"/>
16 <meta name="generator" content="PHP"/>
17 <meta name="keywords" content="jp2, encoding, options, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
18 <meta name="rating" content="GENERAL"/>
19 <meta name="robots" content="INDEX, FOLLOW"/>
20 <meta name="generator" content="ImageMagick Studio LLC"/>
21 <meta name="author" content="ImageMagick Studio LLC"/>
22 <meta name="revisit-after" content="2 DAYS"/>
23 <meta name="resource-type" content="document"/>
24 <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/>
25 <meta name="distribution" content="Global"/>
26 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
27 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
28 <link rel="canonical" href="https://www.imagemagick.org/script/jp2.html"/>
29 <link rel="icon" href="../images/wand.png"/>
30 <link rel="shortcut icon" href="../images/wand.ico"/>
31 <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700" />
32 <link rel="stylesheet" href="css/magick.css"/>
36 <div class="magick-masthead">
37 <div class="container">
38 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle"
40 data-ad-client="ca-pub-3129977114552745"
41 data-ad-slot="6345125851"
42 data-ad-format="auto"></ins>
44 (adsbygoogle = window.adsbygoogle || []).push({});
46 <nav class="magick-nav">
47 <a class="magick-nav-item " href="../index.html">Home</a>
48 <a class="magick-nav-item " href="binary-releases.html">Download</a>
49 <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
50 <a class="magick-nav-item " href="command-line-processing.html">Command-line</a>
51 <a class="magick-nav-item " href="resources.html">Resources</a>
52 <a class="magick-nav-item " href="api.html">Develop</a>
53 <a class="magick-nav-item " href="https://www.imagemagick.org/script/search.php">Search</a>
54 <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
58 <div class="container">
59 <div class="magick-header">
61 <p class="lead magick-description">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:</p>
64 <li>code blocks are 64 samples in width and 32 samples in height</li>
65 <li>no multicomponent transform</li>
66 <li>4 resolution levels for each component</li>
67 <li>compression is lossy at 64:1</li>
70 <p>Use this command to convert a JPEG-2000 image to the PNG image format:</p>
73 convert wizard.jp2 wizard.png
76 <p>Let's convert a JPEG image to a lossless JPEG-2000 image:</p>
79 convert wizard.jpg -quality 0 wizard.jp2
82 <p>Here we extract an area from the image:</p>
85 convert 'wizard.jp2[640x480+0+0]' wizard.png
88 <p>Extract a particular tile from the image:</p>
91 convert 'wizard.jp2[2]' wizard.png
94 <p>Specify a subsampling factor:</p>
97 convert wizard.png -colorspace YUV -sampling-factor 2,2 wizard.jp2
100 <p>Save a tiled JPEG-2000 image:</p>
103 convert wizard.png 'wizard.png[512x512]'
106 <p>Write a digital Cinema 4K profile compliant codestream:</p>
109 convert wizard.png -resize 4096x2160! -depth 12 wizard.jp2
112 <p>Here is a complete list of JPEG-2000 decoding options:</p>
114 <div class="table-responsive">
115 <table class="table table-condensed table-striped">
117 <td>jp2:layer-number=<var>x</var></td>
118 <td>set the maximum number of quality layers to decode.</td>
121 <td>jp2:reduce-factor=<var>x</var></td>
122 <td>set the number of highest resolution levels to be discarded.</td>
126 <p>Here is a complete list of JPEG-2000 encoding options:</p>
128 <div class="table-responsive">
129 <table class="table table-condensed table-striped">
131 <dt>jp2:number-resolutions=<var>x</var></dt>
132 <dd>number of resolutions to encode.</dd>
135 <td>jp2:quality=<var>x</var>,<var>x</var>,...</td>
136 <td>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.</td>
139 <td>jp2:rate=<var>x</var>,<var>x</var>,...</td>
140 <td>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.</td>
143 <td>jp2:progression-order=<var>x</var></td>
144 <td>choose from LRCP, RLCP, RPCL, PCRL or CPRL.</td>
148 <footer class="magick-footer">
149 <p><a href="support.html">Donate</a> •
150 <a href="sitemap.html">Sitemap</a> •
151 <a href="links.html">Related</a> •
152 <a href="security-policy.html">Security</a> •
153 <a href="architecture.html">Architecture</a>
155 <p><a href="jp2.html#">Back to top</a> •
156 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> •
157 <a href="https://www.imagemagick.org/script/contact.php">Contact Us</a></p>
158 <p><small>© 1999-2016 ImageMagick Studio LLC</small></p>
160 </div><!-- /.container -->
162 <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
163 <script src="../js/magick.html"></script>
167 <!-- Magick Cache 22nd November 2016 09:38 -->