This actually works and apparently always has worked. It only failed because the libjpeg code, which did not originally support arithmetic coding, assumed that optimize_coding should always be TRUE for 12-bit data precision.
2370 lines
88 KiB
HTML
2370 lines
88 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc -->
|
|
<title>TJ</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.min.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
|
<script type="text/javascript" src="../../../script.js"></script>
|
|
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
|
|
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
|
<!--[if IE]>
|
|
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="../../../jquery/jquery-3.6.0.min.js"></script>
|
|
<script type="text/javascript" src="../../../jquery/jquery-ui.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="TJ";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9};
|
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
var pathtoroot = "../../../";
|
|
var useModuleDirectories = true;
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<header role="banner">
|
|
<nav role="navigation">
|
|
<div class="fixedNav">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a id="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<ul class="navListSearch">
|
|
<li><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </div>
|
|
<script type="text/javascript"><!--
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|
//-->
|
|
</script>
|
|
</nav>
|
|
</header>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<main role="main">
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.libjpegturbo.turbojpeg</a></div>
|
|
<h2 title="Class TJ" class="title">Class TJ</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>org.libjpegturbo.turbojpeg.TJ</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<pre>public final class <span class="typeNameLabel">TJ</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">TurboJPEG utility class (cannot be instantiated)</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Field</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_CMYK">CS_CMYK</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">CMYK colorspace.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_GRAY">CS_GRAY</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Grayscale colorspace.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_RGB">CS_RGB</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">RGB colorspace.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_YCbCr">CS_YCbCr</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">YCbCr colorspace.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CS_YCCK">CS_YCCK</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">YCCK colorspace.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ERR_FATAL">ERR_FATAL</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The error was fatal and non-recoverable.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ERR_WARNING">ERR_WARNING</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The error was non-fatal and recoverable, but the destination image may
|
|
still be corrupt.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_FASTDCT"><code>PARAM_FASTDCT</code></a> instead.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_BOTTOMUP"><code>PARAM_BOTTOMUP</code></a> instead.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_FASTDCT">FLAG_FASTDCT</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_FASTDCT"><code>PARAM_FASTDCT</code></a> instead.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_FASTUPSAMPLE"><code>PARAM_FASTUPSAMPLE</code></a> instead.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_LIMITSCANS">FLAG_LIMITSCANS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_SCANLIMIT"><code>PARAM_SCANLIMIT</code></a> instead.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_PROGRESSIVE"><code>PARAM_PROGRESSIVE</code></a> instead.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_STOPONWARNING"><code>PARAM_STOPONWARNING</code></a> instead.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NUMCS">NUMCS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The number of JPEG colorspaces</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NUMERR">NUMERR</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The number of error codes</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NUMPF">NUMPF</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The number of pixel formats</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NUMSAMP">NUMSAMP</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The number of chrominance subsampling options</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_ARITHMETIC">PARAM_ARITHMETIC</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Arithmetic entropy coding</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_BOTTOMUP">PARAM_BOTTOMUP</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Row order in packed-pixel source/destination images</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_COLORSPACE">PARAM_COLORSPACE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG colorspace</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_DENSITYUNITS">PARAM_DENSITYUNITS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG pixel density units</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_FASTDCT">PARAM_FASTDCT</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">DCT/IDCT algorithm [lossy compression and decompression]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_FASTUPSAMPLE">PARAM_FASTUPSAMPLE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Chrominance upsampling algorithm [lossy decompression only]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_JPEGHEIGHT">PARAM_JPEGHEIGHT</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG height (in pixels) [decompression only, read-only]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_JPEGWIDTH">PARAM_JPEGWIDTH</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG width (in pixels) [decompression only, read-only]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_LOSSLESS">PARAM_LOSSLESS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Lossless JPEG</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_LOSSLESSPSV">PARAM_LOSSLESSPSV</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Lossless JPEG predictor selection value (PSV)</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_LOSSLESSPT">PARAM_LOSSLESSPT</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Lossless JPEG point transform (Pt)</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_OPTIMIZE">PARAM_OPTIMIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Optimized baseline entropy coding [lossy compression only]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_PRECISION">PARAM_PRECISION</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG data precision (bits per sample) [decompression only, read-only]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_PROGRESSIVE">PARAM_PROGRESSIVE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Progressive entropy coding</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_QUALITY">PARAM_QUALITY</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Perceptual quality of lossy JPEG images [compression only]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_RESTARTBLOCKS">PARAM_RESTARTBLOCKS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG restart marker interval in MCU blocks (lossy) or samples (lossless)
|
|
[compression only]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_RESTARTROWS">PARAM_RESTARTROWS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG restart marker interval in MCU rows (lossy) or sample rows (lossless)
|
|
[compression only]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_SCANLIMIT">PARAM_SCANLIMIT</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Progressive JPEG scan limit for lossy JPEG images [decompression, lossless
|
|
transformation]</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_STOPONWARNING">PARAM_STOPONWARNING</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Error handling behavior</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_SUBSAMP">PARAM_SUBSAMP</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Chrominance subsampling level</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_XDENSITY">PARAM_XDENSITY</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG horizontal pixel density</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PARAM_YDENSITY">PARAM_YDENSITY</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">JPEG vertical pixel density</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_ABGR">PF_ABGR</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">ABGR pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_ARGB">PF_ARGB</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">ARGB pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_BGR">PF_BGR</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">BGR pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_BGRA">PF_BGRA</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">BGRA pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_BGRX">PF_BGRX</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">BGRX pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_CMYK">PF_CMYK</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">CMYK pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_GRAY">PF_GRAY</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Grayscale pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_RGB">PF_RGB</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">RGB pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_RGBA">PF_RGBA</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">RGBA pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_RGBX">PF_RGBX</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">RGBX pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_XBGR">PF_XBGR</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">XBGR pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PF_XRGB">PF_XRGB</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">XRGB pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_411">SAMP_411</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">4:1:1 chrominance subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_420">SAMP_420</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">4:2:0 chrominance subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_422">SAMP_422</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">4:2:2 chrominance subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_440">SAMP_440</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">4:4:0 chrominance subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_444">SAMP_444</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">4:4:4 chrominance subsampling (no chrominance subsampling).</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_GRAY">SAMP_GRAY</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Grayscale.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAMP_UNKNOWN">SAMP_UNKNOWN</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Unknown subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.awt.Rectangle</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#UNCROPPED">UNCROPPED</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A <code>java.awt.Rectangle</code> instance that specifies no cropping</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#UNSCALED">UNSCALED</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJScalingFactor</code></a> instance that specifies a scaling factor of 1/1
|
|
(no scaling)</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#bufSize(int,int,int)">bufSize</a></span>​(int width,
|
|
int height,
|
|
int jpegSubsamp)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
|
|
image with the given width, height, and level of chrominance subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#bufSizeYUV(int,int,int,int)">bufSizeYUV</a></span>​(int width,
|
|
int align,
|
|
int height,
|
|
int subsamp)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a unified
|
|
planar YUV image with the given width, height, and level of chrominance
|
|
subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAlphaOffset(int)">getAlphaOffset</a></span>​(int pixelFormat)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">For the given pixel format, returns the number of samples that the alpha
|
|
component is offset from the start of the pixel.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBlueOffset(int)">getBlueOffset</a></span>​(int pixelFormat)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">For the given pixel format, returns the number of samples that the blue
|
|
component is offset from the start of the pixel.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getGreenOffset(int)">getGreenOffset</a></span>​(int pixelFormat)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">For the given pixel format, returns the number of samples that the green
|
|
component is offset from the start of the pixel.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMCUHeight(int)">getMCUHeight</a></span>​(int subsamp)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the MCU block height for the given level of chrominance
|
|
subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMCUWidth(int)">getMCUWidth</a></span>​(int subsamp)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the MCU block width for the given level of chrominance
|
|
subsampling.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPixelSize(int)">getPixelSize</a></span>​(int pixelFormat)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the pixel size (in samples) for the given pixel format.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRedOffset(int)">getRedOffset</a></span>​(int pixelFormat)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">For the given pixel format, returns the number of samples that the red
|
|
component is offset from the start of the pixel.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getScalingFactors()">getScalingFactors</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor
|
|
supports.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#planeHeight(int,int,int)">planeHeight</a></span>​(int componentID,
|
|
int height,
|
|
int subsamp)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the plane height of a YUV image plane with the given parameters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#planeSizeYUV(int,int,int,int,int)">planeSizeYUV</a></span>​(int componentID,
|
|
int width,
|
|
int stride,
|
|
int height,
|
|
int subsamp)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
|
|
plane with the given parameters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#planeWidth(int,int,int)">planeWidth</a></span>​(int componentID,
|
|
int width,
|
|
int subsamp)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the plane width of a YUV image plane with the given parameters.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a id="NUMSAMP">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>NUMSAMP</h4>
|
|
<pre>public static final int NUMSAMP</pre>
|
|
<div class="block">The number of chrominance subsampling options</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMSAMP">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="SAMP_444">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SAMP_444</h4>
|
|
<pre>public static final int SAMP_444</pre>
|
|
<div class="block">4:4:4 chrominance subsampling (no chrominance subsampling). The JPEG
|
|
or YUV image will contain one chrominance component for every pixel in the
|
|
source image.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_444">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="SAMP_422">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SAMP_422</h4>
|
|
<pre>public static final int SAMP_422</pre>
|
|
<div class="block">4:2:2 chrominance subsampling. The JPEG or YUV image will contain one
|
|
chrominance component for every 2x1 block of pixels in the source image.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_422">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="SAMP_420">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SAMP_420</h4>
|
|
<pre>public static final int SAMP_420</pre>
|
|
<div class="block">4:2:0 chrominance subsampling. The JPEG or YUV image will contain one
|
|
chrominance component for every 2x2 block of pixels in the source image.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_420">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="SAMP_GRAY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SAMP_GRAY</h4>
|
|
<pre>public static final int SAMP_GRAY</pre>
|
|
<div class="block">Grayscale. The JPEG or YUV image will contain no chrominance components.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="SAMP_440">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SAMP_440</h4>
|
|
<pre>public static final int SAMP_440</pre>
|
|
<div class="block">4:4:0 chrominance subsampling. The JPEG or YUV image will contain one
|
|
chrominance component for every 1x2 block of pixels in the source image.
|
|
Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_440">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="SAMP_411">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SAMP_411</h4>
|
|
<pre>public static final int SAMP_411</pre>
|
|
<div class="block">4:1:1 chrominance subsampling. The JPEG or YUV image will contain one
|
|
chrominance component for every 4x1 block of pixels in the source image.
|
|
JPEG images compressed with 4:1:1 subsampling will be almost exactly the
|
|
same size as those compressed with 4:2:0 subsampling, and in the
|
|
aggregate, both subsampling methods produce approximately the same
|
|
perceptual quality. However, 4:1:1 is better able to reproduce sharp
|
|
horizontal features. Note that 4:1:1 subsampling is not fully accelerated
|
|
in libjpeg-turbo.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_411">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="SAMP_UNKNOWN">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SAMP_UNKNOWN</h4>
|
|
<pre>public static final int SAMP_UNKNOWN</pre>
|
|
<div class="block">Unknown subsampling. The JPEG image uses an unusual type of chrominance
|
|
subsampling. Such images can be decompressed into packed-pixel images,
|
|
but they cannot be
|
|
<ul>
|
|
<li> decompressed into planar YUV images,
|
|
<li> losslessly transformed if <a href="TJTransform.html#OPT_CROP"><code>TJTransform.OPT_CROP</code></a> is specified,
|
|
or
|
|
<li> partially decompressed using a cropping region.
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_UNKNOWN">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="NUMPF">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>NUMPF</h4>
|
|
<pre>public static final int NUMPF</pre>
|
|
<div class="block">The number of pixel formats</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMPF">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_RGB">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_RGB</h4>
|
|
<pre>public static final int PF_RGB</pre>
|
|
<div class="block">RGB pixel format. The red, green, and blue components in the image are
|
|
stored in 3-sample pixels in the order R, G, B from lowest to highest
|
|
memory address within each pixel.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGB">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_BGR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_BGR</h4>
|
|
<pre>public static final int PF_BGR</pre>
|
|
<div class="block">BGR pixel format. The red, green, and blue components in the image are
|
|
stored in 3-sample pixels in the order B, G, R from lowest to highest
|
|
memory address within each pixel.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_RGBX">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_RGBX</h4>
|
|
<pre>public static final int PF_RGBX</pre>
|
|
<div class="block">RGBX pixel format. The red, green, and blue components in the image are
|
|
stored in 4-sample pixels in the order R, G, B from lowest to highest
|
|
memory address within each pixel. The X component is ignored when
|
|
compressing and undefined when decompressing.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGBX">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_BGRX">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_BGRX</h4>
|
|
<pre>public static final int PF_BGRX</pre>
|
|
<div class="block">BGRX pixel format. The red, green, and blue components in the image are
|
|
stored in 4-sample pixels in the order B, G, R from lowest to highest
|
|
memory address within each pixel. The X component is ignored when
|
|
compressing and undefined when decompressing.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGRX">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_XBGR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_XBGR</h4>
|
|
<pre>public static final int PF_XBGR</pre>
|
|
<div class="block">XBGR pixel format. The red, green, and blue components in the image are
|
|
stored in 4-sample pixels in the order R, G, B from highest to lowest
|
|
memory address within each pixel. The X component is ignored when
|
|
compressing and undefined when decompressing.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_XBGR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_XRGB">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_XRGB</h4>
|
|
<pre>public static final int PF_XRGB</pre>
|
|
<div class="block">XRGB pixel format. The red, green, and blue components in the image are
|
|
stored in 4-sample pixels in the order B, G, R from highest to lowest
|
|
memory address within each pixel. The X component is ignored when
|
|
compressing and undefined when decompressing.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_XRGB">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_GRAY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_GRAY</h4>
|
|
<pre>public static final int PF_GRAY</pre>
|
|
<div class="block">Grayscale pixel format. Each 1-sample pixel represents a luminance
|
|
(brightness) level from 0 to the maximum sample value (255 for 8-bit
|
|
samples, 4095 for 12-bit samples, and 65535 for 16-bit samples.)</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_GRAY">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_RGBA">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_RGBA</h4>
|
|
<pre>public static final int PF_RGBA</pre>
|
|
<div class="block">RGBA pixel format. This is the same as <a href="#PF_RGBX"><code>PF_RGBX</code></a>, except that when
|
|
decompressing, the X component is guaranteed to be equal to the maximum
|
|
sample value, which can be interpreted as an opaque alpha channel.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_RGBA">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_BGRA">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_BGRA</h4>
|
|
<pre>public static final int PF_BGRA</pre>
|
|
<div class="block">BGRA pixel format. This is the same as <a href="#PF_BGRX"><code>PF_BGRX</code></a>, except that when
|
|
decompressing, the X component is guaranteed to be equal to the maximum
|
|
sample value, which can be interpreted as an opaque alpha channel.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_BGRA">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_ABGR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_ABGR</h4>
|
|
<pre>public static final int PF_ABGR</pre>
|
|
<div class="block">ABGR pixel format. This is the same as <a href="#PF_XBGR"><code>PF_XBGR</code></a>, except that when
|
|
decompressing, the X component is guaranteed to be equal to the maximum
|
|
sample value, which can be interpreted as an opaque alpha channel.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_ABGR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_ARGB">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_ARGB</h4>
|
|
<pre>public static final int PF_ARGB</pre>
|
|
<div class="block">ARGB pixel format. This is the same as <a href="#PF_XRGB"><code>PF_XRGB</code></a>, except that when
|
|
decompressing, the X component is guaranteed to be equal to the maximum
|
|
sample value, which can be interpreted as an opaque alpha channel.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_ARGB">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PF_CMYK">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PF_CMYK</h4>
|
|
<pre>public static final int PF_CMYK</pre>
|
|
<div class="block">CMYK pixel format. Unlike RGB, which is an additive color model used
|
|
primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive
|
|
color model used primarily for printing. In the CMYK color model, the
|
|
value of each color component typically corresponds to an amount of cyan,
|
|
magenta, yellow, or black ink that is applied to a white background. In
|
|
order to convert between CMYK and RGB, it is necessary to use a color
|
|
management system (CMS.) A CMS will attempt to map colors within the
|
|
printer's gamut to perceptually similar colors in the display's gamut and
|
|
vice versa, but the mapping is typically not 1:1 or reversible, nor can it
|
|
be defined with a simple formula. Thus, such a conversion is out of scope
|
|
for a codec library. However, the TurboJPEG API allows for compressing
|
|
packed-pixel CMYK images into YCCK JPEG images (see <a href="#CS_YCCK"><code>CS_YCCK</code></a>) and
|
|
decompressing YCCK JPEG images into packed-pixel CMYK images.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PF_CMYK">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="NUMCS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>NUMCS</h4>
|
|
<pre>public static final int NUMCS</pre>
|
|
<div class="block">The number of JPEG colorspaces</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMCS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="CS_RGB">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CS_RGB</h4>
|
|
<pre>public static final int CS_RGB</pre>
|
|
<div class="block">RGB colorspace. When compressing the JPEG image, the R, G, and B
|
|
components in the source image are reordered into image planes, but no
|
|
colorspace conversion or subsampling is performed. RGB JPEG images can be
|
|
compressed from and decompressed to packed-pixel images with any of the
|
|
extended RGB or grayscale pixel formats, but they cannot be compressed
|
|
from or decompressed to planar YUV images.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_RGB">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="CS_YCbCr">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CS_YCbCr</h4>
|
|
<pre>public static final int CS_YCbCr</pre>
|
|
<div class="block">YCbCr colorspace. YCbCr is not an absolute colorspace but rather a
|
|
mathematical transformation of RGB designed solely for storage and
|
|
transmission. YCbCr images must be converted to RGB before they can
|
|
actually be displayed. In the YCbCr colorspace, the Y (luminance)
|
|
component represents the black & white portion of the original image,
|
|
and the Cb and Cr (chrominance) components represent the color portion of
|
|
the original image. Originally, the analog equivalent of this
|
|
transformation allowed the same signal to drive both black & white and
|
|
color televisions, but JPEG images use YCbCr primarily because it allows
|
|
the color data to be optionally subsampled for the purposes of reducing
|
|
network or disk usage. YCbCr is the most common JPEG colorspace, and
|
|
YCbCr JPEG images can be compressed from and decompressed to packed-pixel
|
|
images with any of the extended RGB or grayscale pixel formats. YCbCr
|
|
JPEG images can also be compressed from and decompressed to planar YUV
|
|
images.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCbCr">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="CS_GRAY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CS_GRAY</h4>
|
|
<pre>public static final int CS_GRAY</pre>
|
|
<div class="block">Grayscale colorspace. The JPEG image retains only the luminance data (Y
|
|
component), and any color data from the source image is discarded.
|
|
Grayscale JPEG images can be compressed from and decompressed to
|
|
packed-pixel images with any of the extended RGB or grayscale pixel
|
|
formats, or they can be compressed from and decompressed to planar YUV
|
|
images.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_GRAY">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="CS_CMYK">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CS_CMYK</h4>
|
|
<pre>public static final int CS_CMYK</pre>
|
|
<div class="block">CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K
|
|
components in the source image are reordered into image planes, but no
|
|
colorspace conversion or subsampling is performed. CMYK JPEG images can
|
|
only be compressed from and decompressed to packed-pixel images with the
|
|
CMYK pixel format.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_CMYK">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="CS_YCCK">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CS_YCCK</h4>
|
|
<pre>public static final int CS_YCCK</pre>
|
|
<div class="block">YCCK colorspace. YCCK (AKA "YCbCrK") is not an absolute colorspace but
|
|
rather a mathematical transformation of CMYK designed solely for storage
|
|
and transmission. It is to CMYK as YCbCr is to RGB. CMYK pixels can be
|
|
reversibly transformed into YCCK, and as with YCbCr, the chrominance
|
|
components in the YCCK pixels can be subsampled without incurring major
|
|
perceptual loss. YCCK JPEG images can only be compressed from and
|
|
decompressed to packed-pixel images with the CMYK pixel format.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.CS_YCCK">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_STOPONWARNING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_STOPONWARNING</h4>
|
|
<pre>public static final int PARAM_STOPONWARNING</pre>
|
|
<div class="block">Error handling behavior
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default]</i> Allow the current
|
|
compression/decompression/transform operation to complete unless a fatal
|
|
error is encountered.
|
|
<li> <code>1</code> Immediately discontinue the current
|
|
compression/decompression/transform operation if a warning (non-fatal
|
|
error) occurs.
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_STOPONWARNING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_BOTTOMUP">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_BOTTOMUP</h4>
|
|
<pre>public static final int PARAM_BOTTOMUP</pre>
|
|
<div class="block">Row order in packed-pixel source/destination images
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default]</i> top-down (X11) order
|
|
<li> <code>1</code> bottom-up (Windows, OpenGL) order
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_BOTTOMUP">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_QUALITY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_QUALITY</h4>
|
|
<pre>public static final int PARAM_QUALITY</pre>
|
|
<div class="block">Perceptual quality of lossy JPEG images [compression only]
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>1</code>-<code>100</code> (<code>1</code> = worst quality but
|
|
best compression, <code>100</code> = best quality but worst compression)
|
|
<i>[no default; must be explicitly specified]</i>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_QUALITY">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_SUBSAMP">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_SUBSAMP</h4>
|
|
<pre>public static final int PARAM_SUBSAMP</pre>
|
|
<div class="block">Chrominance subsampling level
|
|
|
|
<p>The JPEG or YUV image uses (decompression, decoding) or will use (lossy
|
|
compression, encoding) the specified level of chrominance subsampling.
|
|
|
|
<p>When pixels are converted from RGB to YCbCr (see <a href="#CS_YCbCr"><code>CS_YCbCr</code></a>) or
|
|
from CMYK to YCCK (see <a href="#CS_YCCK"><code>CS_YCCK</code></a>) as part of the JPEG compression
|
|
process, some of the Cb and Cr (chrominance) components can be discarded
|
|
or averaged together to produce a smaller image with little perceptible
|
|
loss of image clarity. (The human eye is more sensitive to small changes
|
|
in brightness than to small changes in color.) This is called
|
|
"chrominance subsampling".
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> One of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a> <i>[no default; must be
|
|
explicitly specified for lossy compression, encoding, and decoding]</i>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_SUBSAMP">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_JPEGWIDTH">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_JPEGWIDTH</h4>
|
|
<pre>public static final int PARAM_JPEGWIDTH</pre>
|
|
<div class="block">JPEG width (in pixels) [decompression only, read-only]</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_JPEGWIDTH">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_JPEGHEIGHT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_JPEGHEIGHT</h4>
|
|
<pre>public static final int PARAM_JPEGHEIGHT</pre>
|
|
<div class="block">JPEG height (in pixels) [decompression only, read-only]</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_JPEGHEIGHT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_PRECISION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_PRECISION</h4>
|
|
<pre>public static final int PARAM_PRECISION</pre>
|
|
<div class="block">JPEG data precision (bits per sample) [decompression only, read-only]
|
|
|
|
<p>The JPEG image uses the specified number of bits per sample.
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>8</code>, <code>12</code>, or <code>16</code>
|
|
</ul>
|
|
|
|
<p>12-bit data precision implies <a href="#PARAM_OPTIMIZE"><code>PARAM_OPTIMIZE</code></a> unless
|
|
<a href="#PARAM_ARITHMETIC"><code>PARAM_ARITHMETIC</code></a> is set.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_PRECISION">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_COLORSPACE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_COLORSPACE</h4>
|
|
<pre>public static final int PARAM_COLORSPACE</pre>
|
|
<div class="block">JPEG colorspace
|
|
|
|
<p>The JPEG image uses (decompression) or will use (lossy compression) the
|
|
specified colorspace.
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> One of <a href="#CS_RGB"><code>TJ.CS_*</code></a> <i>[default for lossy compression:
|
|
automatically selected based on the subsampling level and pixel
|
|
format]</i>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_COLORSPACE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_FASTUPSAMPLE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_FASTUPSAMPLE</h4>
|
|
<pre>public static final int PARAM_FASTUPSAMPLE</pre>
|
|
<div class="block">Chrominance upsampling algorithm [lossy decompression only]
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default]</i> Use smooth upsampling when
|
|
decompressing a JPEG image that was compressed using chrominance
|
|
subsampling. This creates a smooth transition between neighboring
|
|
chrominance components in order to reduce upsampling artifacts in the
|
|
decompressed image.
|
|
<li> <code>1</code> Use the fastest chrominance upsampling algorithm
|
|
available, which may combine upsampling with color conversion.
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_FASTUPSAMPLE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_FASTDCT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_FASTDCT</h4>
|
|
<pre>public static final int PARAM_FASTDCT</pre>
|
|
<div class="block">DCT/IDCT algorithm [lossy compression and decompression]
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default]</i> Use the most accurate DCT/IDCT
|
|
algorithm available.
|
|
<li> <code>1</code> Use the fastest DCT/IDCT algorithm available.
|
|
</ul>
|
|
|
|
<p>This parameter is provided mainly for backward compatibility with
|
|
libjpeg, which historically implemented several different DCT/IDCT
|
|
algorithms because of performance limitations with 1990s CPUs. In the
|
|
libjpeg-turbo implementation of the TurboJPEG API:
|
|
|
|
<ul>
|
|
<li> The "fast" and "accurate" DCT/IDCT algorithms perform similarly on
|
|
modern x86/x86-64 CPUs that support AVX2 instructions.
|
|
<li> The "fast" algorithm is generally only about 5-15% faster than the
|
|
"accurate" algorithm on other types of CPUs.
|
|
<li> The difference in accuracy between the "fast" and "accurate"
|
|
algorithms is the most pronounced at JPEG quality levels above 90 and
|
|
tends to be more pronounced with decompression than with compression.
|
|
<li> The "fast" algorithm degrades and is not fully accelerated for JPEG
|
|
quality levels above 97, so it will be slower than the "accurate"
|
|
algorithm.
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_FASTDCT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_OPTIMIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_OPTIMIZE</h4>
|
|
<pre>public static final int PARAM_OPTIMIZE</pre>
|
|
<div class="block">Optimized baseline entropy coding [lossy compression only]
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default]</i> The JPEG image will use the default
|
|
Huffman tables.
|
|
<li> <code>1</code> Optimal Huffman tables will be computed for the JPEG
|
|
image. For lossless transformation, this can also be specified using
|
|
<a href="TJTransform.html#OPT_OPTIMIZE"><code>TJTransform.OPT_OPTIMIZE</code></a>.
|
|
</ul>
|
|
|
|
<p>Optimized baseline entropy coding will improve compression slightly
|
|
(generally 5% or less), but it will reduce compression performance
|
|
considerably.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_OPTIMIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_PROGRESSIVE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_PROGRESSIVE</h4>
|
|
<pre>public static final int PARAM_PROGRESSIVE</pre>
|
|
<div class="block">Progressive entropy coding
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default for compression, lossless
|
|
transformation]</i> The lossy JPEG image uses (decompression) or will use
|
|
(compression, lossless transformation) baseline entropy coding.
|
|
<li> <code>1</code> The lossy JPEG image uses (decompression) or will use
|
|
(compression, lossless transformation) progressive entropy coding. For
|
|
lossless transformation, this can also be specified using
|
|
<a href="TJTransform.html#OPT_PROGRESSIVE"><code>TJTransform.OPT_PROGRESSIVE</code></a>.
|
|
</ul>
|
|
|
|
<p>Progressive entropy coding will generally improve compression relative
|
|
to baseline entropy coding, but it will reduce compression and
|
|
decompression performance considerably. Can be combined with
|
|
<a href="#PARAM_ARITHMETIC"><code>PARAM_ARITHMETIC</code></a>. Implies <a href="#PARAM_OPTIMIZE"><code>PARAM_OPTIMIZE</code></a> unless
|
|
<a href="#PARAM_ARITHMETIC"><code>PARAM_ARITHMETIC</code></a> is also set.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_PROGRESSIVE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_SCANLIMIT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_SCANLIMIT</h4>
|
|
<pre>public static final int PARAM_SCANLIMIT</pre>
|
|
<div class="block">Progressive JPEG scan limit for lossy JPEG images [decompression, lossless
|
|
transformation]
|
|
|
|
<p>Setting this parameter will cause the decompression and transform
|
|
functions to return an error if the number of scans in a progressive JPEG
|
|
image exceeds the specified limit. The primary purpose of this is to
|
|
allow security-critical applications to guard against an exploit of the
|
|
progressive JPEG format described in
|
|
<a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>.
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> maximum number of progressive JPEG scans that the decompression and
|
|
transform functions will process <i>[default: <code>0</code> (no
|
|
limit)]</i>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#PARAM_PROGRESSIVE"><code>PARAM_PROGRESSIVE</code></a>,
|
|
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_SCANLIMIT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_ARITHMETIC">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_ARITHMETIC</h4>
|
|
<pre>public static final int PARAM_ARITHMETIC</pre>
|
|
<div class="block">Arithmetic entropy coding
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default for compression, lossless
|
|
transformation]</i> The lossy JPEG image uses (decompression) or will use
|
|
(compression, lossless transformation) Huffman entropy coding.
|
|
<li> <code>1</code> The lossy JPEG image uses (decompression) or will use
|
|
(compression, lossless transformation) arithmetic entropy coding. For
|
|
lossless transformation, this can also be specified using
|
|
<a href="TJTransform.html#OPT_ARITHMETIC"><code>TJTransform.OPT_ARITHMETIC</code></a>.
|
|
</ul>
|
|
|
|
<p>Arithmetic entropy coding will generally improve compression relative
|
|
to Huffman entropy coding, but it will reduce compression and
|
|
decompression performance considerably. Can be combined with
|
|
<a href="#PARAM_PROGRESSIVE"><code>PARAM_PROGRESSIVE</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_ARITHMETIC">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_LOSSLESS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_LOSSLESS</h4>
|
|
<pre>public static final int PARAM_LOSSLESS</pre>
|
|
<div class="block">Lossless JPEG
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default for compression]</i> The JPEG image is
|
|
(decompression) or will be (compression) lossy/DCT-based.
|
|
<li> <code>1</code> The JPEG image is (decompression) or will be
|
|
(compression) lossless/predictive.
|
|
</ul>
|
|
|
|
<p>In most cases, compressing and decompressing lossless JPEG images is
|
|
considerably slower than compressing and decompressing lossy JPEG images.
|
|
Also note that the following features are not available with lossless JPEG
|
|
images:
|
|
<ul>
|
|
<li> Colorspace conversion (lossless JPEG images always use
|
|
<a href="#CS_RGB"><code>CS_RGB</code></a>, <a href="#CS_GRAY"><code>CS_GRAY</code></a>, or <a href="#CS_CMYK"><code>CS_CMYK</code></a>, depending on the
|
|
pixel format of the source image)
|
|
<li> Chrominance subsampling (lossless JPEG images always use
|
|
<a href="#SAMP_444"><code>SAMP_444</code></a>)
|
|
<li> JPEG quality selection
|
|
<li> DCT/IDCT algorithm selection
|
|
<li> Progressive entropy coding
|
|
<li> Arithmetic entropy coding
|
|
<li> Compression from/decompression to planar YUV images
|
|
<li> Decompression scaling
|
|
<li> Lossless transformation
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#PARAM_LOSSLESSPSV"><code>PARAM_LOSSLESSPSV</code></a>,
|
|
<a href="#PARAM_LOSSLESSPT"><code>PARAM_LOSSLESSPT</code></a>,
|
|
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_LOSSLESS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_LOSSLESSPSV">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_LOSSLESSPSV</h4>
|
|
<pre>public static final int PARAM_LOSSLESSPSV</pre>
|
|
<div class="block">Lossless JPEG predictor selection value (PSV)
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>1</code>-<code>7</code> <i>[default for compression:
|
|
<code>1</code>]</i>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#PARAM_LOSSLESS"><code>PARAM_LOSSLESS</code></a>,
|
|
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_LOSSLESSPSV">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_LOSSLESSPT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_LOSSLESSPT</h4>
|
|
<pre>public static final int PARAM_LOSSLESSPT</pre>
|
|
<div class="block">Lossless JPEG point transform (Pt)
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> through <i><b>precision</b> - 1</i>, where
|
|
<b><i>precision</i></b> is the JPEG data precision in bits <i>[default for
|
|
compression: <code>0</code>]</i>
|
|
</ul>
|
|
|
|
<p>A point transform value of <code>0</code> is necessary in order to
|
|
generate a fully lossless JPEG image. (A non-zero point transform value
|
|
right-shifts the input samples by the specified number of bits, which is
|
|
effectively a form of lossy color quantization.)</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#PARAM_LOSSLESS"><code>PARAM_LOSSLESS</code></a>,
|
|
<a href="#PARAM_PRECISION"><code>PARAM_PRECISION</code></a>,
|
|
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_LOSSLESSPT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_RESTARTBLOCKS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_RESTARTBLOCKS</h4>
|
|
<pre>public static final int PARAM_RESTARTBLOCKS</pre>
|
|
<div class="block">JPEG restart marker interval in MCU blocks (lossy) or samples (lossless)
|
|
[compression only]
|
|
|
|
<p>The nature of entropy coding is such that a corrupt JPEG image cannot
|
|
be decompressed beyond the point of corruption unless it contains restart
|
|
markers. A restart marker stops and restarts the entropy coding algorithm
|
|
so that, if a JPEG image is corrupted, decompression can resume at the
|
|
next marker. Thus, adding more restart markers improves the fault
|
|
tolerance of the JPEG image, but adding too many restart markers can
|
|
adversely affect the compression ratio and performance.
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> the number of MCU blocks or samples between each restart marker
|
|
<i>[default: <code>0</code> (no restart markers)]</i>
|
|
</ul>
|
|
|
|
<p> Setting this parameter to a non-zero value sets
|
|
<a href="#PARAM_RESTARTROWS"><code>PARAM_RESTARTROWS</code></a> to 0.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_RESTARTBLOCKS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_RESTARTROWS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_RESTARTROWS</h4>
|
|
<pre>public static final int PARAM_RESTARTROWS</pre>
|
|
<div class="block">JPEG restart marker interval in MCU rows (lossy) or sample rows (lossless)
|
|
[compression only]
|
|
|
|
<p>See <a href="#PARAM_RESTARTBLOCKS"><code>PARAM_RESTARTBLOCKS</code></a> for a description of restart markers.
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> the number of MCU rows or sample rows between each restart marker
|
|
<i>[default: <code>0</code> (no restart markers)]</i>
|
|
</ul>
|
|
|
|
<p>Setting this parameter to a non-zero value sets
|
|
<a href="#PARAM_RESTARTBLOCKS"><code>PARAM_RESTARTBLOCKS</code></a> to 0.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_RESTARTROWS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_XDENSITY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_XDENSITY</h4>
|
|
<pre>public static final int PARAM_XDENSITY</pre>
|
|
<div class="block">JPEG horizontal pixel density
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> The JPEG image has (decompression) or will have (compression) the
|
|
specified horizontal pixel density <i>[default for compression:
|
|
<code>1</code>]</i>.
|
|
</ul>
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not
|
|
affect the contents of the JPEG image.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#PARAM_DENSITYUNITS"><code>PARAM_DENSITYUNITS</code></a>,
|
|
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_XDENSITY">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_YDENSITY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_YDENSITY</h4>
|
|
<pre>public static final int PARAM_YDENSITY</pre>
|
|
<div class="block">JPEG vertical pixel density
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> The JPEG image has (decompression) or will have (compression) the
|
|
specified vertical pixel density <i>[default for compression:
|
|
<code>1</code>]</i>.
|
|
</ul>
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not
|
|
affect the contents of the JPEG image.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#PARAM_DENSITYUNITS"><code>PARAM_DENSITYUNITS</code></a>,
|
|
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_YDENSITY">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="PARAM_DENSITYUNITS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PARAM_DENSITYUNITS</h4>
|
|
<pre>public static final int PARAM_DENSITYUNITS</pre>
|
|
<div class="block">JPEG pixel density units
|
|
|
|
<p><b>Value</b>
|
|
<ul>
|
|
<li> <code>0</code> <i>[default for compression]</i> The pixel density of
|
|
the JPEG image is expressed (decompression) or will be expressed
|
|
(compression) in unknown units.
|
|
<li> <code>1</code> The pixel density of the JPEG image is expressed
|
|
(decompression) or will be expressed (compression) in units of
|
|
pixels/inch.
|
|
<li> <code>2</code> The pixel density of the JPEG image is expressed
|
|
(decompression) or will be expressed (compression) in units of pixels/cm.
|
|
</ul>
|
|
|
|
<p>This value is stored in or read from the JPEG header. It does not
|
|
affect the contents of the JPEG image.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#PARAM_XDENSITY"><code>PARAM_XDENSITY</code></a>,
|
|
<a href="#PARAM_YDENSITY"><code>PARAM_YDENSITY</code></a>,
|
|
<a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.PARAM_DENSITYUNITS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="FLAG_BOTTOMUP">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FLAG_BOTTOMUP</h4>
|
|
<pre>@Deprecated
|
|
public static final int FLAG_BOTTOMUP</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_BOTTOMUP"><code>PARAM_BOTTOMUP</code></a> instead.</div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="FLAG_FASTUPSAMPLE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FLAG_FASTUPSAMPLE</h4>
|
|
<pre>@Deprecated
|
|
public static final int FLAG_FASTUPSAMPLE</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_FASTUPSAMPLE"><code>PARAM_FASTUPSAMPLE</code></a> instead.</div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="FLAG_FASTDCT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FLAG_FASTDCT</h4>
|
|
<pre>@Deprecated
|
|
public static final int FLAG_FASTDCT</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_FASTDCT"><code>PARAM_FASTDCT</code></a> instead.</div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="FLAG_ACCURATEDCT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FLAG_ACCURATEDCT</h4>
|
|
<pre>@Deprecated
|
|
public static final int FLAG_ACCURATEDCT</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_FASTDCT"><code>PARAM_FASTDCT</code></a> instead.</div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="FLAG_STOPONWARNING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FLAG_STOPONWARNING</h4>
|
|
<pre>@Deprecated
|
|
public static final int FLAG_STOPONWARNING</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_STOPONWARNING"><code>PARAM_STOPONWARNING</code></a> instead.</div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_STOPONWARNING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="FLAG_PROGRESSIVE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FLAG_PROGRESSIVE</h4>
|
|
<pre>@Deprecated
|
|
public static final int FLAG_PROGRESSIVE</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_PROGRESSIVE"><code>PARAM_PROGRESSIVE</code></a> instead.</div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_PROGRESSIVE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="FLAG_LIMITSCANS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FLAG_LIMITSCANS</h4>
|
|
<pre>@Deprecated
|
|
public static final int FLAG_LIMITSCANS</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#PARAM_SCANLIMIT"><code>PARAM_SCANLIMIT</code></a> instead.</div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_LIMITSCANS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="NUMERR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>NUMERR</h4>
|
|
<pre>public static final int NUMERR</pre>
|
|
<div class="block">The number of error codes</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.NUMERR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ERR_WARNING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERR_WARNING</h4>
|
|
<pre>public static final int ERR_WARNING</pre>
|
|
<div class="block">The error was non-fatal and recoverable, but the destination image may
|
|
still be corrupt.
|
|
<p>
|
|
NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
|
(specifically, <a href="TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor.decompress*()</code></a> methods
|
|
with a void return type) will complete and leave the destination image in
|
|
a fully recoverable state after a non-fatal error occurs.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.ERR_WARNING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ERR_FATAL">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERR_FATAL</h4>
|
|
<pre>public static final int ERR_FATAL</pre>
|
|
<div class="block">The error was fatal and non-recoverable.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.ERR_FATAL">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="UNSCALED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>UNSCALED</h4>
|
|
<pre>public static final <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a> UNSCALED</pre>
|
|
<div class="block">A <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJScalingFactor</code></a> instance that specifies a scaling factor of 1/1
|
|
(no scaling)</div>
|
|
</li>
|
|
</ul>
|
|
<a id="UNCROPPED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>UNCROPPED</h4>
|
|
<pre>public static final java.awt.Rectangle UNCROPPED</pre>
|
|
<div class="block">A <code>java.awt.Rectangle</code> instance that specifies no cropping</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a id="getMCUWidth(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMCUWidth</h4>
|
|
<pre class="methodSignature">public static int getMCUWidth​(int subsamp)</pre>
|
|
<div class="block">Returns the MCU block width for the given level of chrominance
|
|
subsampling.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>subsamp</code> - the level of chrominance subsampling (one of
|
|
<a href="#SAMP_444"><code>SAMP_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the MCU block width for the given level of chrominance
|
|
subsampling.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getMCUHeight(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMCUHeight</h4>
|
|
<pre class="methodSignature">public static int getMCUHeight​(int subsamp)</pre>
|
|
<div class="block">Returns the MCU block height for the given level of chrominance
|
|
subsampling.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>subsamp</code> - the level of chrominance subsampling (one of
|
|
<a href="#SAMP_444"><code>SAMP_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the MCU block height for the given level of chrominance
|
|
subsampling.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPixelSize(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPixelSize</h4>
|
|
<pre class="methodSignature">public static int getPixelSize​(int pixelFormat)</pre>
|
|
<div class="block">Returns the pixel size (in samples) for the given pixel format.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the pixel size (in samples) for the given pixel format.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getRedOffset(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getRedOffset</h4>
|
|
<pre class="methodSignature">public static int getRedOffset​(int pixelFormat)</pre>
|
|
<div class="block">For the given pixel format, returns the number of samples that the red
|
|
component is offset from the start of the pixel. For instance, if an
|
|
8-bit-per-sample pixel of format <code>TJ.PF_BGRX</code> is stored in
|
|
<code>char pixel[]</code>, then the red component will be
|
|
<code>pixel[TJ.getRedOffset(TJ.PF_BGRX)]</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the red offset for the given pixel format, or -1 if the pixel
|
|
format does not have a red component.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getGreenOffset(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGreenOffset</h4>
|
|
<pre class="methodSignature">public static int getGreenOffset​(int pixelFormat)</pre>
|
|
<div class="block">For the given pixel format, returns the number of samples that the green
|
|
component is offset from the start of the pixel. For instance, if an
|
|
8-bit-per-sample pixel of format <code>TJ.PF_BGRX</code> is stored in
|
|
<code>char pixel[]</code>, then the green component will be
|
|
<code>pixel[TJ.getGreenOffset(TJ.PF_BGRX)]</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the green offset for the given pixel format, or -1 if the pixel
|
|
format does not have a green component.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getBlueOffset(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBlueOffset</h4>
|
|
<pre class="methodSignature">public static int getBlueOffset​(int pixelFormat)</pre>
|
|
<div class="block">For the given pixel format, returns the number of samples that the blue
|
|
component is offset from the start of the pixel. For instance, if an
|
|
8-bit-per-sample pixel of format <code>TJ.PF_BGRX</code> is stored in
|
|
<code>char pixel[]</code>, then the blue component will be
|
|
<code>pixel[TJ.getBlueOffset(TJ.PF_BGRX)]</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the blue offset for the given pixel format, or -1 if the pixel
|
|
format does not have a blue component.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAlphaOffset(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAlphaOffset</h4>
|
|
<pre class="methodSignature">public static int getAlphaOffset​(int pixelFormat)</pre>
|
|
<div class="block">For the given pixel format, returns the number of samples that the alpha
|
|
component is offset from the start of the pixel. For instance, if an
|
|
8-bit-per-sample pixel of format <code>TJ.PF_BGRA</code> is stored in
|
|
<code>char pixel[]</code>, then the alpha component will be
|
|
<code>pixel[TJ.getAlphaOffset(TJ.PF_BGRA)]</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixelFormat</code> - the pixel format (one of <a href="#PF_RGB"><code>PF_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the alpha offset for the given pixel format, or -1 if the pixel
|
|
format does not have a alpha component.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="bufSize(int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>bufSize</h4>
|
|
<pre class="methodSignature">public static int bufSize​(int width,
|
|
int height,
|
|
int jpegSubsamp)</pre>
|
|
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
|
|
image with the given width, height, and level of chrominance subsampling.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>width</code> - the width (in pixels) of the JPEG image</dd>
|
|
<dd><code>height</code> - the height (in pixels) of the JPEG image</dd>
|
|
<dd><code>jpegSubsamp</code> - the level of chrominance subsampling to be used when
|
|
generating the JPEG image (one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>.)
|
|
<a href="#SAMP_UNKNOWN"><code>SAMP_UNKNOWN</code></a> is treated like <a href="#SAMP_444"><code>SAMP_444</code></a>, since a buffer
|
|
large enough to hold a JPEG image with no subsampling should also be large
|
|
enough to hold a JPEG image with an arbitrary level of subsampling. Note
|
|
that lossless JPEG images always use <a href="#SAMP_444"><code>SAMP_444</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the maximum size of the buffer (in bytes) required to hold a JPEG
|
|
image with the given width, height, and level of chrominance subsampling.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="bufSizeYUV(int,int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>bufSizeYUV</h4>
|
|
<pre class="methodSignature">public static int bufSizeYUV​(int width,
|
|
int align,
|
|
int height,
|
|
int subsamp)</pre>
|
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a unified
|
|
planar YUV image with the given width, height, and level of chrominance
|
|
subsampling.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>width</code> - the width (in pixels) of the YUV image</dd>
|
|
<dd><code>align</code> - row alignment (in bytes) of the YUV image (must be a power of
|
|
2.) Setting this parameter to n specifies that each row in each plane of
|
|
the YUV image will be padded to the nearest multiple of n bytes
|
|
(1 = unpadded.)</dd>
|
|
<dd><code>height</code> - the height (in pixels) of the YUV image</dd>
|
|
<dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
|
image (one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the size of the buffer (in bytes) required to hold a unified
|
|
planar YUV image with the given width, height, and level of chrominance
|
|
subsampling.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="planeSizeYUV(int,int,int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>planeSizeYUV</h4>
|
|
<pre class="methodSignature">public static int planeSizeYUV​(int componentID,
|
|
int width,
|
|
int stride,
|
|
int height,
|
|
int subsamp)</pre>
|
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
|
|
plane with the given parameters.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
|
2 = V/Cr)</dd>
|
|
<dd><code>width</code> - width (in pixels) of the YUV image. NOTE: this is the width
|
|
of the whole image, not the plane width.</dd>
|
|
<dd><code>stride</code> - bytes per row in the image plane.</dd>
|
|
<dd><code>height</code> - height (in pixels) of the YUV image. NOTE: this is the
|
|
height of the whole image, not the plane height.</dd>
|
|
<dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
|
image (one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the size of the buffer (in bytes) required to hold a YUV image
|
|
plane with the given parameters.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="planeWidth(int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>planeWidth</h4>
|
|
<pre class="methodSignature">public static int planeWidth​(int componentID,
|
|
int width,
|
|
int subsamp)</pre>
|
|
<div class="block">Returns the plane width of a YUV image plane with the given parameters.
|
|
Refer to <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane width.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
|
2 = V/Cr)</dd>
|
|
<dd><code>width</code> - width (in pixels) of the YUV image</dd>
|
|
<dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
|
|
(one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the plane width of a YUV image plane with the given parameters.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="planeHeight(int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>planeHeight</h4>
|
|
<pre class="methodSignature">public static int planeHeight​(int componentID,
|
|
int height,
|
|
int subsamp)</pre>
|
|
<div class="block">Returns the plane height of a YUV image plane with the given parameters.
|
|
Refer to <a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane height.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
|
2 = V/Cr)</dd>
|
|
<dd><code>height</code> - height (in pixels) of the YUV image</dd>
|
|
<dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
|
|
(one of <a href="#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the plane height of a YUV image plane with the given parameters.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getScalingFactors()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>getScalingFactors</h4>
|
|
<pre class="methodSignature">public static <a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[] getScalingFactors()</pre>
|
|
<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor
|
|
supports.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a list of fractional scaling factors that the JPEG decompressor
|
|
supports.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<footer role="contentinfo">
|
|
<nav role="navigation">
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|