TurboJPEG: Expose/extend hidden "max pixels" param

TJPARAM_MAXPIXELS was previously hidden and used only for fuzz testing,
but it is potentially useful for calling applications as well,
particularly if they want to guard against excessive memory consumption
by the tj3LoadImage*() functions.  The parameter has also been extended
to decompression and lossless transformation functions/methods, mainly
as a convenience.  (It was already possible for calling applications to
impose their own JPEG image size limits by reading the JPEG header prior
to decompressing or transforming the image.)
This commit is contained in:
DRC
2023-11-16 15:36:47 -05:00
parent 6136a9e285
commit 55d342c788
41 changed files with 409 additions and 309 deletions

View File

@@ -326,216 +326,223 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
<td class="colLast"><code>23</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_MAXPIXELS">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_MAXPIXELS">PARAM_MAXPIXELS</a></code></th>
<td class="colLast"><code>24</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_OPTIMIZE">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_OPTIMIZE">PARAM_OPTIMIZE</a></code></th>
<td class="colLast"><code>11</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_PRECISION">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_PRECISION">PARAM_PRECISION</a></code></th>
<td class="colLast"><code>7</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_PROGRESSIVE">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_PROGRESSIVE">PARAM_PROGRESSIVE</a></code></th>
<td class="colLast"><code>12</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_QUALITY">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_QUALITY">PARAM_QUALITY</a></code></th>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_RESTARTBLOCKS">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_RESTARTBLOCKS">PARAM_RESTARTBLOCKS</a></code></th>
<td class="colLast"><code>18</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_RESTARTROWS">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_RESTARTROWS">PARAM_RESTARTROWS</a></code></th>
<td class="colLast"><code>19</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_SCANLIMIT">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_SCANLIMIT">PARAM_SCANLIMIT</a></code></th>
<td class="colLast"><code>13</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_STOPONWARNING">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_STOPONWARNING">PARAM_STOPONWARNING</a></code></th>
<td class="colLast"><code>0</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_SUBSAMP">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_SUBSAMP">PARAM_SUBSAMP</a></code></th>
<td class="colLast"><code>4</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_XDENSITY">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_XDENSITY">PARAM_XDENSITY</a></code></th>
<td class="colLast"><code>20</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PARAM_YDENSITY">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PARAM_YDENSITY">PARAM_YDENSITY</a></code></th>
<td class="colLast"><code>21</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_ABGR">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></code></th>
<td class="colLast"><code>9</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_ARGB">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></code></th>
<td class="colLast"><code>10</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_BGR">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></code></th>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_BGRA">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></code></th>
<td class="colLast"><code>8</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_BGRX">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></code></th>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_CMYK">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></code></th>
<td class="colLast"><code>11</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_GRAY">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></code></th>
<td class="colLast"><code>6</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_RGB">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></code></th>
<td class="colLast"><code>0</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_RGBA">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></code></th>
<td class="colLast"><code>7</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_RGBX">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></code></th>
<td class="colLast"><code>2</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_XBGR">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></code></th>
<td class="colLast"><code>4</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.PF_XRGB">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></code></th>
<td class="colLast"><code>5</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.SAMP_411">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></code></th>
<td class="colLast"><code>5</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.SAMP_420">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></code></th>
<td class="colLast"><code>2</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.SAMP_422">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></code></th>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.SAMP_440">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></code></th>
<td class="colLast"><code>4</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.SAMP_441">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_441">SAMP_441</a></code></th>
<td class="colLast"><code>6</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.SAMP_444">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></code></th>
<td class="colLast"><code>0</code></td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<th class="colSecond" scope="row"><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</a></code></th>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colFirst"><a id="org.libjpegturbo.turbojpeg.TJ.SAMP_UNKNOWN">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>