1 2 3 4 5<!DOCTYPE html> 6<html lang="en"> 7<head> 8 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> 9 <title>ImageMagick: JP2 Encoding Options</title> 10 <meta http-equiv="content-type" content="text/html; charset=utf-8"/> 11 <meta name="application-name" content="ImageMagick"/> 12 <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."/> 13 <meta name="application-url" content="http://www.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-2015 ImageMagick Studio LLC"/> 23 <meta name="distribution" content="Global"/> 24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/> 25 <link rel="icon" href="../image/wand.png"/> 26 <link rel="shortcut icon" href="../image/wand.ico"/> 27 <link rel="stylesheet" href="../css/magick.php"/> 28</head> 29<body> 30<div class="main"> 31<div class="magick-masthead"> 32 <div class="container"> 33 <script async="async" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" 34 style="display:block" 35 data-ad-client="ca-pub-3129977114552745" 36 data-ad-slot="6345125851" 37 data-ad-format="auto"></ins> 38 <script> 39 (adsbygoogle = window.adsbygoogle || []).push({}); 40 </script> 41 <nav class="magick-nav"> 42 <a class="magick-nav-item " href="../index.php">Home</a> 43 <a class="magick-nav-item " href="binary-releases.php">Download</a> 44 <a class="magick-nav-item " href="command-line-tools.php">Tools</a> 45 <a class="magick-nav-item " href="command-line-processing.php">Command-line</a> 46 <a class="magick-nav-item " href="resources.php">Resources</a> 47 <a class="magick-nav-item " href="api.php">Develop</a> 48 <a class="magick-nav-item " href="search.php">Search</a> 49 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> 50 </nav> 51 </div> 52</div> 53<div class="container"> 54<div class="magick-header"> 55 56<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> 57 58<ul> 59<li>code blocks are 64 samples in width and 32 samples in height</li> 60<li>no multicomponent transform</li> 61<li>4 resolution levels for each component</li> 62<li>compression is lossy at 64:1</li> 63</ul> 64 65<p>Use this command to convert a JPEG-2000 image to the PNG image format:</p> 66 67<pre> 68convert wizard.jp2 wizard.png 69</pre> 70 71<p>Let's convert a JPEG image to a lossless JPEG-2000 image:</p> 72 73<pre> 74convert wizard.jpg -quality 0 wizard.jp2 75</pre> 76 77<p>Here we extract an area from the image:</p> 78 79<pre> 80convert 'wizard.jp2[640x480+0+0]' wizard.png 81</pre> 82 83<p>Extract a particular tile from the image:</p> 84 85<pre> 86convert 'wizard.jp2[2]' wizard.png 87</pre> 88 89<p>Specify a subsampling factor:</p> 90 91<pre> 92convert wizard.png -colorspace YUV -sampling-factor 2,2 wizard.jp2 93</pre> 94 95<p>Save a tiled JPEG-2000 image:</p> 96 97<pre> 98convert wizard.png 'wizard.png[512x512]' 99</pre> 100 101<p>Write a digital Cinema 4K profile compliant codestream:</p> 102 103<pre> 104convert wizard.png -resize 4096x2160! -depth 12 wizard.jp2 105</pre> 106 107<p>Here is a complete list of JPEG-2000 decoding options:</p> 108 109<div class="table-responsive"> 110<table class="table table-condensed table-striped"> 111 <tr> 112 <td>jp2:layer-number=<var>x</var></td> 113 <td>set the maximum number of quality layers to decode.</td> 114 </tr> 115 <tr> 116 <td>jp2:reduce-factor=<var>x</var></td> 117 <td>set the number of highest resolution levels to be discarded.</td> 118 </tr> 119</table></div> 120 121<p>Here is a complete list of JPEG-2000 encoding options:</p> 122 123<div class="table-responsive"> 124<table class="table table-condensed table-striped"> 125 <tr> 126 <dt>jp2:number-resolutions=<var>x</var></dt> 127 <dd>number of resolutions to encode.</dd> 128 </tr> 129 <tr> 130 <td>jp2:quality=<var>x</var>,<var>x</var>,...</td> 131 <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> 132 </tr> 133 <tr> 134 <td>jp2:rate=<var>x</var>,<var>x</var>,...</td> 135 <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> 136 </tr> 137 <tr> 138 <td>jp2:progression-order=<var>x</var></td> 139 <td>choose from LRCP, RLCP, RPCL, PCRL or CPRL.</td> 140 </tr> 141</table></div> 142</div> 143 <footer class="magick-footer"> 144 <p><a href="support.php">Donate</a> • 145 <a href="sitemap.php">Sitemap</a> • 146 <a href="links.php">Related</a> • 147 <a href="architecture.php">Architecture</a> 148</p> 149 <p><a href="jp2.php#">Back to top</a> • 150 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • 151 <a href="contact.php">Contact Us</a></p> 152 <p><small>© 1999-2016 ImageMagick Studio LLC</small></p> 153 </footer> 154</div><!-- /.container --> 155 156 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 157 <script src="http://nextgen.imagemagick.org/js/magick.php"></script> 158</div> 159</body> 160</html> 161