1 2 3 4 5<!DOCTYPE html> 6<html lang="en"> 7<head> 8 <meta charset="utf-8" /> 9 <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no" /> 10 <title>ImageMagick - JP2 Encoding Options</title> 11 <meta name="application-name" content="ImageMagick" /> 12 <meta name="description" content="Use ImageMagick® to create, edit, compose, and convert bitmap images. Resize an image, crop it, change its shades and colors, add captions, and more." /> 13 <meta name="application-url" content="https://imagemagick.org" /> 14 <meta name="generator" content="PHP" /> 15 <meta name="keywords" content="jp2, encoding, options, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" /> 16 <meta name="rating" content="GENERAL" /> 17 <meta name="robots" content="INDEX, FOLLOW" /> 18 <meta name="generator" content="ImageMagick Studio LLC" /> 19 <meta name="author" content="ImageMagick Studio LLC" /> 20 <meta name="revisit-after" content="2 DAYS" /> 21 <meta name="resource-type" content="document" /> 22 <meta name="copyright" content="Copyright (c) 1999-2020 ImageMagick Studio LLC" /> 23 <meta name="distribution" content="Global" /> 24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" /> 25 <meta property='og:url' content='../' /> 26 <meta property='og:title' content='ImageMagick' /> 27 <meta property='og:image' content='../images/logo.png' /> 28 <meta property='og:type' content='website' /> 29 <meta property='og:site_name' content='ImageMagick' /> 30 <meta property='og:description' content="Convert, Edit, or Compose Bitmap Images" /> 31 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> 32 <link href="../www/jp2.html" rel="canonical" /> 33 <link href="../images/wand.png" rel="icon" /> 34 <link href="../images/wand.ico" rel="shortcut icon" /> 35 <link href="assets/magick.css" rel="stylesheet" /> 36</head> 37<body> 38 <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> 39 <a class="navbar-brand" href="../index.html"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a> 40 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation"> 41 <span class="navbar-toggler-icon"></span> 42 </button> 43 44 <div class="navbar-collapse collapse" id="navbarsMagick" style=""> 45 <ul class="navbar-nav mr-auto"> 46 <li class="nav-item "> 47 <a class="nav-link" href="../index.html">Home <span class="sr-only">(current)</span></a> 48 </li> 49 <li class="nav-item "> 50 <a class="nav-link" href="download.html">Download</a> 51 </li> 52 <li class="nav-item "> 53 <a class="nav-link" href="command-line-tools.html">Tools</a> 54 </li> 55 <li class="nav-item "> 56 <a class="nav-link" href="command-line-processing.html">Command-line</a> 57 </li> 58 <li class="nav-item "> 59 <a class="nav-link" href="resources.html">Resources</a> 60 </li> 61 <li class="nav-item "> 62 <a class="nav-link" href="develop.html">Develop</a> 63 </li> 64 <li class="nav-item"> 65 <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a> 66 </li> 67 </ul> 68 <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php"> 69 <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search"> 70 <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button> 71 </form> 72 </div> 73 </nav> 74 <div class="container"> 75 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" 76 style="display:block" 77 data-ad-client="ca-pub-3129977114552745" 78 data-ad-slot="6345125851" 79 data-full-width-responsive="true" 80 data-ad-format="horizontal"></ins> 81 <script> 82 (adsbygoogle = window.adsbygoogle || []).push({}); 83 </script> 84 85 </div> 86 87 <main class="container"> 88 <div class="magick-template"> 89<div class="magick-header"> 90 91<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> 92 93<ul> 94<li>code blocks are 64 samples in width and 32 samples in height</li> 95<li>no multicomponent transform</li> 96<li>4 resolution levels for each component</li> 97<li>compression is lossy at 64:1</li> 98</ul> 99 100<p>Use this command to convert a JPEG-2000 image to the PNG image format:</p> 101 102<pre class="highlight"><code>magick convert wizard.jp2 wizard.png 103</code></pre> 104 105<p>Let's convert a JPEG image to a lossless JPEG-2000 image:</p> 106 107<pre class="highlight"><code>magick convert wizard.jpg -quality 0 wizard.jp2 108</code></pre> 109 110<p>Here we extract an area from the image:</p> 111 112<pre class="highlight"><code>magick convert 'wizard.jp2[640x480+0+0]' wizard.png 113</code></pre> 114 115<p>Extract a particular tile from the image:</p> 116 117<pre class="highlight"><code>magick convert 'wizard.jp2[2]' wizard.png 118</code></pre> 119 120<p>Specify a subsampling factor:</p> 121 122<pre class="highlight"><code>magick convert wizard.png -colorspace YUV -sampling-factor 2,2 wizard.jp2 123</code></pre> 124 125<p>Save a tiled JPEG-2000 image:</p> 126 127<pre class="highlight"><code>magick convert wizard.png 'wizard.png[512x512]' 128</code></pre> 129 130<p>Write a digital Cinema 4K profile compliant codestream:</p> 131 132<pre class="highlight"><code>magick convert wizard.png -resize 4096x2160! -depth 12 wizard.jp2 133</code></pre> 134 135<p>Here is a complete list of JPEG-2000 decoding options:</p> 136 137<div class="table-responsive" style="font-size:87.5% !important;"> 138<table class="table table-sm table-striped"> 139 <tr> 140 <td>jp2:quality-layers=<var>x</var></td> 141 <td>set the maximum number of quality layers to decode.</td> 142 </tr> 143 <tr> 144 <td>jp2:reduce-factor=<var>x</var></td> 145 <td>set the number of highest resolution levels to be discarded.</td> 146 </tr> 147</table></div> 148 149<p>Here is a complete list of JPEG-2000 encoding options:</p> 150 151<div class="table-responsive" style="font-size:87.5% !important;"> 152<table class="table table-sm table-striped"> 153 <tr> 154 <td>jp2:number-resolutions=<var>x</var></td> 155 <td>number of resolutions to encode.</td> 156 </tr> 157 <tr> 158 <td>jp2:quality=<var>x</var>,<var>x</var>,...</td> 159 <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> 160 </tr> 161 <tr> 162 <td>jp2:rate=<var>x</var>,<var>x</var>,...</td> 163 <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> 164 </tr> 165 <tr> 166 <td>jp2:progression-order=<var>x</var></td> 167 <td>choose from LRCP, RLCP, RPCL, PCRL or CPRL.</td> 168 </tr> 169</table></div> 170</div> 171 </div> 172 </main><!-- /.container --> 173 <footer class="magick-footer"> 174 <p><a href="security-policy.html">Security</a> • 175 <a href="architecture.html">Architecture</a> 176 177 <a href="jp2.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../images/wand.ico"/></a> 178 179 <a href="links.html">Related</a> • 180 <a href="sitemap.html">Sitemap</a> 181 <br/> 182 <a href="support.html">Donate</a> • 183 <a href="http://pgp.mit.edu/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • 184 <a href="https://imagemagick.org/script/contact.php">Contact Us</a> 185 <br/> 186 <small>© 1999-2020 ImageMagick Studio LLC</small></p> 187 </footer> 188 189 <!-- Javascript assets --> 190 <script src="assets/magick.js" crossorigin="anonymous"></script> 191 <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.4.1/jquery.min.js"><\/script>')</script> 192</body> 193</html> 194<!-- Magick Cache 5th January 2020 10:31 -->