Further exception cleanup
Use a new checked exception type (TJException) when passing through errors from the underlying C library. This gives the application a choice of catching all exceptions or just those from TurboJPEG. Throw IllegalArgumentException at the JNI level when arguments to the JNI function are incorrect, and when one of the TurboJPEG "utility" functions returns an error (because, per the C API specification, those functions will only return an error if one of their arguments is out of range.) Remove "throws Exception" from the signature of any methods that no longer pass through an error from the TurboJPEG C library. Credit Viktor for the new code Code formatting tweaks
This commit is contained in:
@@ -17,7 +17,8 @@ try-with-resources statement.
|
|||||||
|
|
||||||
[4] The TurboJPEG Java classes now throw unchecked idiomatic exceptions
|
[4] The TurboJPEG Java classes now throw unchecked idiomatic exceptions
|
||||||
(IllegalArgumentException, IllegalStateException) for unrecoverable errors
|
(IllegalArgumentException, IllegalStateException) for unrecoverable errors
|
||||||
caused by incorrect API usage.
|
caused by incorrect API usage, and those classes throw a new checked exception
|
||||||
|
type (TJException) for errors that are passed through from the C library.
|
||||||
|
|
||||||
|
|
||||||
1.4.1
|
1.4.1
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ set(JAVA_CLASSNAMES org/libjpegturbo/turbojpeg/TJ
|
|||||||
org/libjpegturbo/turbojpeg/TJCompressor
|
org/libjpegturbo/turbojpeg/TJCompressor
|
||||||
org/libjpegturbo/turbojpeg/TJCustomFilter
|
org/libjpegturbo/turbojpeg/TJCustomFilter
|
||||||
org/libjpegturbo/turbojpeg/TJDecompressor
|
org/libjpegturbo/turbojpeg/TJDecompressor
|
||||||
|
org/libjpegturbo/turbojpeg/TJException
|
||||||
org/libjpegturbo/turbojpeg/TJScalingFactor
|
org/libjpegturbo/turbojpeg/TJScalingFactor
|
||||||
org/libjpegturbo/turbojpeg/TJTransform
|
org/libjpegturbo/turbojpeg/TJTransform
|
||||||
org/libjpegturbo/turbojpeg/TJTransformer
|
org/libjpegturbo/turbojpeg/TJTransformer
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ JAVASOURCES = org/libjpegturbo/turbojpeg/TJ.java \
|
|||||||
org/libjpegturbo/turbojpeg/TJCompressor.java \
|
org/libjpegturbo/turbojpeg/TJCompressor.java \
|
||||||
org/libjpegturbo/turbojpeg/TJCustomFilter.java \
|
org/libjpegturbo/turbojpeg/TJCustomFilter.java \
|
||||||
org/libjpegturbo/turbojpeg/TJDecompressor.java \
|
org/libjpegturbo/turbojpeg/TJDecompressor.java \
|
||||||
|
org/libjpegturbo/turbojpeg/TJException.java \
|
||||||
org/libjpegturbo/turbojpeg/TJScalingFactor.java \
|
org/libjpegturbo/turbojpeg/TJScalingFactor.java \
|
||||||
org/libjpegturbo/turbojpeg/TJTransform.java \
|
org/libjpegturbo/turbojpeg/TJTransform.java \
|
||||||
org/libjpegturbo/turbojpeg/TJTransformer.java \
|
org/libjpegturbo/turbojpeg/TJTransformer.java \
|
||||||
@@ -31,6 +32,7 @@ JAVA_CLASSES = org/libjpegturbo/turbojpeg/TJ.class \
|
|||||||
org/libjpegturbo/turbojpeg/TJCompressor.class \
|
org/libjpegturbo/turbojpeg/TJCompressor.class \
|
||||||
org/libjpegturbo/turbojpeg/TJCustomFilter.class \
|
org/libjpegturbo/turbojpeg/TJCustomFilter.class \
|
||||||
org/libjpegturbo/turbojpeg/TJDecompressor.class \
|
org/libjpegturbo/turbojpeg/TJDecompressor.class \
|
||||||
|
org/libjpegturbo/turbojpeg/TJException.class \
|
||||||
org/libjpegturbo/turbojpeg/TJLoader.class \
|
org/libjpegturbo/turbojpeg/TJLoader.class \
|
||||||
org/libjpegturbo/turbojpeg/TJScalingFactor.class \
|
org/libjpegturbo/turbojpeg/TJScalingFactor.class \
|
||||||
org/libjpegturbo/turbojpeg/TJTransform.class \
|
org/libjpegturbo/turbojpeg/TJTransform.class \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2012, 2014 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2012, 2014-2015 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -351,7 +351,7 @@ public class TJExample implements TJCustomFilter {
|
|||||||
public void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
public void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
||||||
Rectangle planeRegion, int componentIndex,
|
Rectangle planeRegion, int componentIndex,
|
||||||
int transformIndex, TJTransform transform)
|
int transformIndex, TJTransform transform)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
for (int i = 0; i < bufferRegion.width * bufferRegion.height; i++) {
|
for (int i = 0; i < bufferRegion.width * bufferRegion.height; i++) {
|
||||||
coeffBuffer.put(i, (short)(-coeffBuffer.get(i)));
|
coeffBuffer.put(i, (short)(-coeffBuffer.get(i)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><i>TJCustomFilter</i></a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><i>TJCustomFilter</i></a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</a></li>
|
||||||
|
<li><a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJException</a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><i>TJCustomFilter</i></a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><i>TJCustomFilter</i></a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></li>
|
||||||
|
<li><a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></li>
|
||||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></li>
|
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></li>
|
||||||
|
|||||||
@@ -821,6 +821,16 @@
|
|||||||
source image stored in <code>yuvImage</code> with the newly created
|
source image stored in <code>yuvImage</code> with the newly created
|
||||||
instance.</div>
|
instance.</div>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><a href="./org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJException</span></a> - Exception in <a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJException.html#TJException()">TJException()</a></span> - Constructor for exception org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String,%20java.lang.Throwable)">TJException(String, Throwable)</a></span> - Constructor for exception org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String)">TJException(String)</a></span> - Constructor for exception org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
|
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.Throwable)">TJException(Throwable)</a></span> - Constructor for exception org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></dt>
|
||||||
|
<dd> </dd>
|
||||||
<dt><a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJScalingFactor</span></a> - Class in <a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
|
<dt><a href="./org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJScalingFactor</span></a> - Class in <a href="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div class="block">Fractional scaling factor</div>
|
<div class="block">Fractional scaling factor</div>
|
||||||
|
|||||||
@@ -1075,16 +1075,13 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<h4>bufSize</h4>
|
<h4>bufSize</h4>
|
||||||
<pre>public static int bufSize(int width,
|
<pre>public static int bufSize(int width,
|
||||||
int height,
|
int height,
|
||||||
int jpegSubsamp)
|
int jpegSubsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
|
<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>
|
image with the given width, height, and level of chrominance subsampling.</div>
|
||||||
<dl><dt><span class="strong">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
|
<dl><dt><span class="strong">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="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
generating the JPEG image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the maximum size of the buffer (in bytes) required to hold a JPEG
|
<dt><span class="strong">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>
|
image with the given width, height, and level of chrominance subsampling.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="bufSizeYUV(int, int, int, int)">
|
<a name="bufSizeYUV(int, int, int, int)">
|
||||||
@@ -1096,17 +1093,14 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<pre>public static int bufSizeYUV(int width,
|
<pre>public static int bufSizeYUV(int width,
|
||||||
int pad,
|
int pad,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
image with the given width, height, and level of chrominance subsampling.</div>
|
image with the given width, height, and level of chrominance subsampling.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the YUV image</dd><dd><code>pad</code> - the width of each line in each plane of the image is padded to
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the YUV image</dd><dd><code>pad</code> - the width of each line in each plane of the image is padded to
|
||||||
the nearest multiple of this number of bytes (must be a power of 2.)</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
|
the nearest multiple of this number of bytes (must be a power of 2.)</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="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
|
<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
image with the given width, height, and level of chrominance subsampling.</dd>
|
image with the given width, height, and level of chrominance subsampling.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="bufSizeYUV(int, int, int)">
|
<a name="bufSizeYUV(int, int, int)">
|
||||||
@@ -1118,11 +1112,8 @@ public static final int FLAG_FORCESSE3</pre>
|
|||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public static int bufSizeYUV(int width,
|
public static int bufSizeYUV(int width,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="planeSizeYUV(int, int, int, int, int)">
|
<a name="planeSizeYUV(int, int, int, int, int)">
|
||||||
@@ -1135,8 +1126,7 @@ public static int bufSizeYUV(int width,
|
|||||||
int width,
|
int width,
|
||||||
int stride,
|
int stride,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
|
<div class="block">Returns the size of the buffer (in bytes) required to hold a YUV image
|
||||||
plane with the given parameters.</div>
|
plane with the given parameters.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
@@ -1145,9 +1135,7 @@ public static int bufSizeYUV(int width,
|
|||||||
height of the whole image, not the plane height.</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
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="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
|
<dt><span class="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
image with the given parameters.</dd>
|
image with the given parameters.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="planeWidth(int, int, int)">
|
<a name="planeWidth(int, int, int)">
|
||||||
@@ -1158,16 +1146,13 @@ public static int bufSizeYUV(int width,
|
|||||||
<h4>planeWidth</h4>
|
<h4>planeWidth</h4>
|
||||||
<pre>public static int planeWidth(int componentID,
|
<pre>public static int planeWidth(int componentID,
|
||||||
int width,
|
int width,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the plane width of a YUV image plane with the given parameters.
|
<div class="block">Returns the plane width of a YUV image plane with the given parameters.
|
||||||
Refer to <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane width.</div>
|
Refer to <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane width.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
<dl><dt><span class="strong">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
|
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="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
(one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the plane width of a YUV image plane with the given parameters.</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>the plane width of a YUV image plane with the given parameters.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="planeHeight(int, int, int)">
|
<a name="planeHeight(int, int, int)">
|
||||||
@@ -1178,16 +1163,13 @@ public static int bufSizeYUV(int width,
|
|||||||
<h4>planeHeight</h4>
|
<h4>planeHeight</h4>
|
||||||
<pre>public static int planeHeight(int componentID,
|
<pre>public static int planeHeight(int componentID,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the plane height of a YUV image plane with the given parameters.
|
<div class="block">Returns the plane height of a YUV image plane with the given parameters.
|
||||||
Refer to <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane height.</div>
|
Refer to <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane height.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
|
<dl><dt><span class="strong">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
|
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="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
(one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the plane height of a YUV image plane with the given parameters.</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>the plane height of a YUV image plane with the given parameters.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getScalingFactors()">
|
<a name="getScalingFactors()">
|
||||||
@@ -1196,14 +1178,11 @@ public static int bufSizeYUV(int width,
|
|||||||
<ul class="blockListLast">
|
<ul class="blockListLast">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getScalingFactors</h4>
|
<h4>getScalingFactors</h4>
|
||||||
<pre>public static <a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[] getScalingFactors()
|
<pre>public static <a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[] getScalingFactors()</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor in
|
<div class="block">Returns a list of fractional scaling factors that the JPEG decompressor in
|
||||||
this implementation of TurboJPEG supports.</div>
|
this implementation of TurboJPEG supports.</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>a list of fractional scaling factors that the JPEG decompressor in
|
<dl><dt><span class="strong">Returns:</span></dt><dd>a list of fractional scaling factors that the JPEG decompressor in
|
||||||
this implementation of TurboJPEG supports.</dd>
|
this implementation of TurboJPEG supports.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -381,10 +381,10 @@ implements java.io.Closeable</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>TJCompressor</h4>
|
<h4>TJCompressor</h4>
|
||||||
<pre>public TJCompressor()
|
<pre>public TJCompressor()
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG compressor instance.</div>
|
<div class="block">Create a TurboJPEG compressor instance.</div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJCompressor(byte[], int, int, int, int, int, int)">
|
<a name="TJCompressor(byte[], int, int, int, int, int, int)">
|
||||||
@@ -400,14 +400,14 @@ implements java.io.Closeable</pre>
|
|||||||
int pitch,
|
int pitch,
|
||||||
int height,
|
int height,
|
||||||
int pixelFormat)
|
int pixelFormat)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
||||||
source image stored in <code>srcImage</code> with the newly created
|
source image stored in <code>srcImage</code> with the newly created
|
||||||
instance.</div>
|
instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>x</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>y</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>width</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pitch</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pixelFormat</code> - pixel format of the source image (one of
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>x</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>y</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>width</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pitch</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pixelFormat</code> - pixel format of the source image (one of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJCompressor(byte[], int, int, int, int)">
|
<a name="TJCompressor(byte[], int, int, int, int)">
|
||||||
@@ -422,11 +422,11 @@ public TJCompressor(byte[] srcImage,
|
|||||||
int pitch,
|
int pitch,
|
||||||
int height,
|
int height,
|
||||||
int pixelFormat)
|
int pixelFormat)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJCompressor(java.awt.image.BufferedImage, int, int, int, int)">
|
<a name="TJCompressor(java.awt.image.BufferedImage, int, int, int, int)">
|
||||||
@@ -440,7 +440,7 @@ public TJCompressor(byte[] srcImage,
|
|||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
<div class="block">Create a TurboJPEG compressor instance and associate the uncompressed
|
||||||
source image stored in <code>srcImage</code> with the newly created
|
source image stored in <code>srcImage</code> with the newly created
|
||||||
instance.</div>
|
instance.</div>
|
||||||
@@ -451,7 +451,7 @@ public TJCompressor(byte[] srcImage,
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -475,7 +475,7 @@ public TJCompressor(byte[] srcImage,
|
|||||||
int pitch,
|
int pitch,
|
||||||
int height,
|
int height,
|
||||||
int pixelFormat)
|
int pixelFormat)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
<div class="block">Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - image buffer containing RGB, grayscale, or CMYK pixels to
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - image buffer containing RGB, grayscale, or CMYK pixels to
|
||||||
@@ -493,7 +493,7 @@ public TJCompressor(byte[] srcImage,
|
|||||||
which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pixelFormat</code> - pixel format of the source image (one of
|
which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pixelFormat</code> - pixel format of the source image (one of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="setSourceImage(byte[], int, int, int, int)">
|
<a name="setSourceImage(byte[], int, int, int, int)">
|
||||||
@@ -508,11 +508,11 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
int pitch,
|
int pitch,
|
||||||
int height,
|
int height,
|
||||||
int pixelFormat)
|
int pixelFormat)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="setSourceImage(java.awt.image.BufferedImage, int, int, int, int)">
|
<a name="setSourceImage(java.awt.image.BufferedImage, int, int, int, int)">
|
||||||
@@ -526,7 +526,7 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Associate an uncompressed RGB or grayscale source image with this
|
<div class="block">Associate an uncompressed RGB or grayscale source image with this
|
||||||
compressor instance.</div>
|
compressor instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - a <code>BufferedImage</code> instance containing RGB or
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - a <code>BufferedImage</code> instance containing RGB or
|
||||||
@@ -538,7 +538,7 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
which the JPEG or YUV image should be compressed/encoded (0 = use the
|
which the JPEG or YUV image should be compressed/encoded (0 = use the
|
||||||
height of the source image)</dd>
|
height of the source image)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">
|
<a name="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">
|
||||||
@@ -548,13 +548,13 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>setSourceImage</h4>
|
<h4>setSourceImage</h4>
|
||||||
<pre>public void setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)
|
<pre>public void setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Associate an uncompressed YUV planar source image with this compressor
|
<div class="block">Associate an uncompressed YUV planar source image with this compressor
|
||||||
instance.</div>
|
instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - YUV planar image to be compressed. This image is not
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - YUV planar image to be compressed. This image is not
|
||||||
modified.</dd>
|
modified.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="setSubsamp(int)">
|
<a name="setSubsamp(int)">
|
||||||
@@ -604,7 +604,7 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<h4>compress</h4>
|
<h4>compress</h4>
|
||||||
<pre>public void compress(byte[] dstBuf,
|
<pre>public void compress(byte[] dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the uncompressed source image associated with this compressor
|
||||||
instance and output a JPEG image to the given destination buffer.</div>
|
instance and output a JPEG image to the given destination buffer.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the JPEG image. Use
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBuf</code> - buffer that will receive the JPEG image. Use
|
||||||
@@ -613,7 +613,7 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
subsampling.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
subsampling.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="compress(int)">
|
<a name="compress(int)">
|
||||||
@@ -623,7 +623,7 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>compress</h4>
|
<h4>compress</h4>
|
||||||
<pre>public byte[] compress(int flags)
|
<pre>public byte[] compress(int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Compress the uncompressed source image associated with this compressor
|
<div class="block">Compress the uncompressed source image associated with this compressor
|
||||||
instance and return a buffer containing a JPEG image.</div>
|
instance and return a buffer containing a JPEG image.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>flags</code> - the bitwise OR of one or more of
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
@@ -631,7 +631,7 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
<dt><span class="strong">Returns:</span></dt><dd>a buffer containing a JPEG image. The length of this buffer will
|
<dt><span class="strong">Returns:</span></dt><dd>a buffer containing a JPEG image. The length of this buffer will
|
||||||
not be equal to the size of the JPEG image. Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()"><code>getCompressedSize()</code></a> to obtain the size of the JPEG image.</dd>
|
not be equal to the size of the JPEG image. Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()"><code>getCompressedSize()</code></a> to obtain the size of the JPEG image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="compress(java.awt.image.BufferedImage, byte[], int)">
|
<a name="compress(java.awt.image.BufferedImage, byte[], int)">
|
||||||
@@ -644,12 +644,12 @@ public void setSourceImage(byte[] srcImage,
|
|||||||
public void compress(java.awt.image.BufferedImage srcImage,
|
public void compress(java.awt.image.BufferedImage srcImage,
|
||||||
byte[] dstBuf,
|
byte[] dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)"><code>compress(byte[], int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)"><code>compress(byte[], int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="compress(java.awt.image.BufferedImage, int)">
|
<a name="compress(java.awt.image.BufferedImage, int)">
|
||||||
@@ -661,12 +661,12 @@ public void compress(java.awt.image.BufferedImage srcImage,
|
|||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public byte[] compress(java.awt.image.BufferedImage srcImage,
|
public byte[] compress(java.awt.image.BufferedImage srcImage,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>compress(int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>compress(int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">
|
<a name="encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">
|
||||||
@@ -677,7 +677,7 @@ public byte[] compress(java.awt.image.BufferedImage srcImage,
|
|||||||
<h4>encodeYUV</h4>
|
<h4>encodeYUV</h4>
|
||||||
<pre>public void encodeYUV(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
<pre>public void encodeYUV(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a YUV planar image and store it in the given
|
||||||
<code>YUVImage</code> instance. This method uses the accelerated color
|
<code>YUVImage</code> instance. This method uses the accelerated color
|
||||||
@@ -688,7 +688,7 @@ public byte[] compress(java.awt.image.BufferedImage srcImage,
|
|||||||
image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="encodeYUV(byte[], int)">
|
<a name="encodeYUV(byte[], int)">
|
||||||
@@ -700,10 +700,10 @@ public byte[] compress(java.awt.image.BufferedImage srcImage,
|
|||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public void encodeYUV(byte[] dstBuf,
|
public void encodeYUV(byte[] dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="encodeYUV(int, int)">
|
<a name="encodeYUV(int, int)">
|
||||||
@@ -714,7 +714,7 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
<h4>encodeYUV</h4>
|
<h4>encodeYUV</h4>
|
||||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int pad,
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int pad,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
instance into a unified YUV planar image buffer and return a
|
instance into a unified YUV planar image buffer and return a
|
||||||
<code>YUVImage</code> instance containing the encoded image. This method
|
<code>YUVImage</code> instance containing the encoded image. This method
|
||||||
@@ -727,7 +727,7 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="encodeYUV(int[], int)">
|
<a name="encodeYUV(int[], int)">
|
||||||
@@ -738,7 +738,7 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
<h4>encodeYUV</h4>
|
<h4>encodeYUV</h4>
|
||||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int[] strides,
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int[] strides,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Encode the uncompressed source image associated with this compressor
|
<div class="block">Encode the uncompressed source image associated with this compressor
|
||||||
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
<code>YUVImage</code> instance containing the encoded image planes. This
|
<code>YUVImage</code> instance containing the encoded image planes. This
|
||||||
@@ -755,7 +755,7 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="encodeYUV(int)">
|
<a name="encodeYUV(int)">
|
||||||
@@ -766,10 +766,10 @@ public void encodeYUV(byte[] dstBuf,
|
|||||||
<h4>encodeYUV</h4>
|
<h4>encodeYUV</h4>
|
||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public byte[] encodeYUV(int flags)
|
public byte[] encodeYUV(int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="encodeYUV(java.awt.image.BufferedImage, byte[], int)">
|
<a name="encodeYUV(java.awt.image.BufferedImage, byte[], int)">
|
||||||
@@ -782,12 +782,12 @@ public byte[] encodeYUV(int flags)
|
|||||||
public void encodeYUV(java.awt.image.BufferedImage srcImage,
|
public void encodeYUV(java.awt.image.BufferedImage srcImage,
|
||||||
byte[] dstBuf,
|
byte[] dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)"><code>encodeYUV(byte[], int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)"><code>encodeYUV(byte[], int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="encodeYUV(java.awt.image.BufferedImage, int)">
|
<a name="encodeYUV(java.awt.image.BufferedImage, int)">
|
||||||
@@ -799,12 +799,12 @@ public void encodeYUV(java.awt.image.BufferedImage srcImage,
|
|||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public byte[] encodeYUV(java.awt.image.BufferedImage srcImage,
|
public byte[] encodeYUV(java.awt.image.BufferedImage srcImage,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getCompressedSize()">
|
<a name="getCompressedSize()">
|
||||||
@@ -827,7 +827,7 @@ public byte[] encodeYUV(java.awt.image.BufferedImage srcImage,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>close</h4>
|
<h4>close</h4>
|
||||||
<pre>public void close()
|
<pre>public void close()
|
||||||
throws java.io.IOException</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Free the native structures associated with this compressor instance.</div>
|
<div class="block">Free the native structures associated with this compressor instance.</div>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><strong>Specified by:</strong></dt>
|
<dt><strong>Specified by:</strong></dt>
|
||||||
@@ -835,7 +835,7 @@ public byte[] encodeYUV(java.awt.image.BufferedImage srcImage,
|
|||||||
<dt><strong>Specified by:</strong></dt>
|
<dt><strong>Specified by:</strong></dt>
|
||||||
<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>
|
<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.io.IOException</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="finalize()">
|
<a name="finalize()">
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
int componentID,
|
int componentID,
|
||||||
int transformID,
|
int transformID,
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">A callback function that can be used to modify the DCT coefficients after
|
<div class="block">A callback function that can be used to modify the DCT coefficients after
|
||||||
they are losslessly transformed but before they are transcoded to a new
|
they are losslessly transformed but before they are transcoded to a new
|
||||||
JPEG image. This allows for custom filters or other transformations to be
|
JPEG image. This allows for custom filters or other transformations to be
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
transform in the <code>transforms</code> array that was passed to <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
|
transform in the <code>transforms</code> array that was passed to <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
|
||||||
parameters and/or cropping region for this transform</dd>
|
parameters and/or cropping region for this transform</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<ul class="navList">
|
<ul class="navList">
|
||||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navList">
|
<ul class="navList">
|
||||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJDecompressor.html" target="_top">Frames</a></li>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJDecompressor.html" target="_top">Frames</a></li>
|
||||||
@@ -534,10 +534,10 @@ implements java.io.Closeable</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>TJDecompressor</h4>
|
<h4>TJDecompressor</h4>
|
||||||
<pre>public TJDecompressor()
|
<pre>public TJDecompressor()
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG decompresssor instance.</div>
|
<div class="block">Create a TurboJPEG decompresssor instance.</div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJDecompressor(byte[])">
|
<a name="TJDecompressor(byte[])">
|
||||||
@@ -547,13 +547,13 @@ implements java.io.Closeable</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>TJDecompressor</h4>
|
<h4>TJDecompressor</h4>
|
||||||
<pre>public TJDecompressor(byte[] jpegImage)
|
<pre>public TJDecompressor(byte[] jpegImage)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
||||||
be the length of the array.) This buffer is not modified.</dd>
|
be the length of the array.) This buffer is not modified.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJDecompressor(byte[], int)">
|
<a name="TJDecompressor(byte[], int)">
|
||||||
@@ -564,13 +564,13 @@ implements java.io.Closeable</pre>
|
|||||||
<h4>TJDecompressor</h4>
|
<h4>TJDecompressor</h4>
|
||||||
<pre>public TJDecompressor(byte[] jpegImage,
|
<pre>public TJDecompressor(byte[] jpegImage,
|
||||||
int imageSize)
|
int imageSize)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
<div class="block">Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
image of length <code>imageSize</code> bytes stored in
|
image of length <code>imageSize</code> bytes stored in
|
||||||
<code>jpegImage</code> with the newly created instance.</div>
|
<code>jpegImage</code> with the newly created instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJDecompressor(org.libjpegturbo.turbojpeg.YUVImage)">
|
<a name="TJDecompressor(org.libjpegturbo.turbojpeg.YUVImage)">
|
||||||
@@ -580,14 +580,14 @@ implements java.io.Closeable</pre>
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>TJDecompressor</h4>
|
<h4>TJDecompressor</h4>
|
||||||
<pre>public TJDecompressor(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage)
|
<pre>public TJDecompressor(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG decompressor instance and associate the YUV planar
|
<div class="block">Create a TurboJPEG decompressor instance and associate the YUV planar
|
||||||
source image stored in <code>yuvImage</code> with the newly created
|
source image stored in <code>yuvImage</code> with the newly created
|
||||||
instance.</div>
|
instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar
|
||||||
image to be decoded. This image is not modified.</dd>
|
image to be decoded. This image is not modified.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -606,13 +606,13 @@ implements java.io.Closeable</pre>
|
|||||||
<h4>setSourceImage</h4>
|
<h4>setSourceImage</h4>
|
||||||
<pre>public void setSourceImage(byte[] jpegImage,
|
<pre>public void setSourceImage(byte[] jpegImage,
|
||||||
int imageSize)
|
int imageSize)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
<div class="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
||||||
<code>jpegImage</code> with this decompressor instance. This image will
|
<code>jpegImage</code> with this decompressor instance. This image will
|
||||||
be used as the source image for subsequent decompress operations.</div>
|
be used as the source image for subsequent decompress operations.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="setJPEGImage(byte[], int)">
|
<a name="setJPEGImage(byte[], int)">
|
||||||
@@ -624,10 +624,10 @@ implements java.io.Closeable</pre>
|
|||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public void setJPEGImage(byte[] jpegImage,
|
public void setJPEGImage(byte[] jpegImage,
|
||||||
int imageSize)
|
int imageSize)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>setSourceImage(byte[], int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>setSourceImage(byte[], int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">
|
<a name="setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">
|
||||||
@@ -636,15 +636,12 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>setSourceImage</h4>
|
<h4>setSourceImage</h4>
|
||||||
<pre>public void setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)
|
<pre>public void setSourceImage(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Associate the specified YUV planar source image with this decompressor
|
<div class="block">Associate the specified YUV planar source image with this decompressor
|
||||||
instance. Subsequent decompress operations will decode this image into an
|
instance. Subsequent decompress operations will decode this image into an
|
||||||
RGB or grayscale destination image.</div>
|
RGB or grayscale destination image.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar image to
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>srcImage</code> - <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar image to
|
||||||
be decoded. This image is not modified.</dd>
|
be decoded. This image is not modified.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getWidth()">
|
<a name="getWidth()">
|
||||||
@@ -732,8 +729,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getScaledWidth</h4>
|
<h4>getScaledWidth</h4>
|
||||||
<pre>public int getScaledWidth(int desiredWidth,
|
<pre>public int getScaledWidth(int desiredWidth,
|
||||||
int desiredHeight)
|
int desiredHeight)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the width of the largest scaled-down image that the TurboJPEG
|
<div class="block">Returns the width of the largest scaled-down image that the TurboJPEG
|
||||||
decompressor can generate without exceeding the desired image width and
|
decompressor can generate without exceeding the desired image width and
|
||||||
height.</div>
|
height.</div>
|
||||||
@@ -746,9 +742,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
the scaled image size.)</dd>
|
the scaled image size.)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the width of the largest scaled-down image that the TurboJPEG
|
<dt><span class="strong">Returns:</span></dt><dd>the width of the largest scaled-down image that the TurboJPEG
|
||||||
decompressor can generate without exceeding the desired image width and
|
decompressor can generate without exceeding the desired image width and
|
||||||
height.</dd>
|
height.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getScaledHeight(int, int)">
|
<a name="getScaledHeight(int, int)">
|
||||||
@@ -758,8 +752,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getScaledHeight</h4>
|
<h4>getScaledHeight</h4>
|
||||||
<pre>public int getScaledHeight(int desiredWidth,
|
<pre>public int getScaledHeight(int desiredWidth,
|
||||||
int desiredHeight)
|
int desiredHeight)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the height of the largest scaled-down image that the TurboJPEG
|
<div class="block">Returns the height of the largest scaled-down image that the TurboJPEG
|
||||||
decompressor can generate without exceeding the desired image width and
|
decompressor can generate without exceeding the desired image width and
|
||||||
height.</div>
|
height.</div>
|
||||||
@@ -772,9 +765,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
the scaled image size.)</dd>
|
the scaled image size.)</dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>the height of the largest scaled-down image that the TurboJPEG
|
<dt><span class="strong">Returns:</span></dt><dd>the height of the largest scaled-down image that the TurboJPEG
|
||||||
decompressor can generate without exceeding the desired image width and
|
decompressor can generate without exceeding the desired image width and
|
||||||
height.</dd>
|
height.</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompress(byte[], int, int, int, int, int, int, int)">
|
<a name="decompress(byte[], int, int, int, int, int, int, int)">
|
||||||
@@ -791,7 +782,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||||
to the given destination buffer.</div>
|
to the given destination buffer.</div>
|
||||||
@@ -839,7 +830,7 @@ public void setJPEGImage(byte[] jpegImage,
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompress(byte[], int, int, int, int, int)">
|
<a name="decompress(byte[], int, int, int, int, int)">
|
||||||
@@ -855,11 +846,11 @@ public void decompress(byte[] dstBuf,
|
|||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompress(int, int, int, int, int)">
|
<a name="decompress(int, int, int, int, int)">
|
||||||
@@ -873,7 +864,7 @@ public void decompress(byte[] dstBuf,
|
|||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance and return a buffer containing the decompressed image.</div>
|
instance and return a buffer containing the decompressed image.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - see
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desiredWidth</code> - see
|
||||||
@@ -887,7 +878,7 @@ public void decompress(byte[] dstBuf,
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a buffer containing the decompressed image.</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>a buffer containing the decompressed image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">
|
<a name="decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">
|
||||||
@@ -898,7 +889,7 @@ public void decompress(byte[] dstBuf,
|
|||||||
<h4>decompressToYUV</h4>
|
<h4>decompressToYUV</h4>
|
||||||
<pre>public void decompressToYUV(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
<pre>public void decompressToYUV(<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance into a YUV planar image and store it in the given
|
instance into a YUV planar image and store it in the given
|
||||||
<code>YUVImage</code> instance. This method performs JPEG decompression
|
<code>YUVImage</code> instance. This method performs JPEG decompression
|
||||||
@@ -913,7 +904,7 @@ public void decompress(byte[] dstBuf,
|
|||||||
source image.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
source image.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompressToYUV(byte[], int)">
|
<a name="decompressToYUV(byte[], int)">
|
||||||
@@ -925,10 +916,10 @@ public void decompress(byte[] dstBuf,
|
|||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public void decompressToYUV(byte[] dstBuf,
|
public void decompressToYUV(byte[] dstBuf,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompressToYUV(int, int[], int, int)">
|
<a name="decompressToYUV(int, int[], int, int)">
|
||||||
@@ -941,7 +932,7 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
int[] strides,
|
int[] strides,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance into a set of Y, U (Cb), and V (Cr) image planes and return a
|
instance into a set of Y, U (Cb), and V (Cr) image planes and return a
|
||||||
<code>YUVImage</code> instance containing the decompressed image planes.
|
<code>YUVImage</code> instance containing the decompressed image planes.
|
||||||
@@ -971,7 +962,7 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompressToYUV(int, int, int, int)">
|
<a name="decompressToYUV(int, int, int, int)">
|
||||||
@@ -984,7 +975,7 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
int pad,
|
int pad,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image associated with this decompressor
|
<div class="block">Decompress the JPEG source image associated with this decompressor
|
||||||
instance into a unified YUV planar image buffer and return a
|
instance into a unified YUV planar image buffer and return a
|
||||||
<code>YUVImage</code> instance containing the decompressed image. This
|
<code>YUVImage</code> instance containing the decompressed image. This
|
||||||
@@ -1010,7 +1001,7 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
<dt><span class="strong">Returns:</span></dt><dd>a YUV planar image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompressToYUV(int)">
|
<a name="decompressToYUV(int)">
|
||||||
@@ -1021,10 +1012,10 @@ public void decompressToYUV(byte[] dstBuf,
|
|||||||
<h4>decompressToYUV</h4>
|
<h4>decompressToYUV</h4>
|
||||||
<pre>@Deprecated
|
<pre>@Deprecated
|
||||||
public byte[] decompressToYUV(int flags)
|
public byte[] decompressToYUV(int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
<div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompress(int[], int, int, int, int, int, int, int)">
|
<a name="decompress(int[], int, int, int, int, int, int, int)">
|
||||||
@@ -1041,7 +1032,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int pixelFormat,
|
int pixelFormat,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||||
to the given destination buffer.</div>
|
to the given destination buffer.</div>
|
||||||
@@ -1087,7 +1078,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB"><code>TJ.PF_*</code></a>)</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompress(java.awt.image.BufferedImage, int)">
|
<a name="decompress(java.awt.image.BufferedImage, int)">
|
||||||
@@ -1098,7 +1089,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
<h4>decompress</h4>
|
<h4>decompress</h4>
|
||||||
<pre>public void decompress(java.awt.image.BufferedImage dstImage,
|
<pre>public void decompress(java.awt.image.BufferedImage dstImage,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and output a decompressed/decoded image to
|
with this decompressor instance and output a decompressed/decoded image to
|
||||||
the given <code>BufferedImage</code> instance.</div>
|
the given <code>BufferedImage</code> instance.</div>
|
||||||
@@ -1111,7 +1102,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
height of the YUV image.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
height of the YUV image.</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="decompress(int, int, int, int)">
|
<a name="decompress(int, int, int, int)">
|
||||||
@@ -1124,7 +1115,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int bufferedImageType,
|
int bufferedImageType,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
<div class="block">Decompress the JPEG source image or decode the YUV source image associated
|
||||||
with this decompressor instance and return a <code>BufferedImage</code>
|
with this decompressor instance and return a <code>BufferedImage</code>
|
||||||
instance containing the decompressed/decoded image.</div>
|
instance containing the decompressed/decoded image.</div>
|
||||||
@@ -1139,7 +1130,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
<dt><span class="strong">Returns:</span></dt><dd>a <code>BufferedImage</code> instance containing the
|
<dt><span class="strong">Returns:</span></dt><dd>a <code>BufferedImage</code> instance containing the
|
||||||
decompressed/decoded image.</dd>
|
decompressed/decoded image.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="close()">
|
<a name="close()">
|
||||||
@@ -1149,7 +1140,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>close</h4>
|
<h4>close</h4>
|
||||||
<pre>public void close()
|
<pre>public void close()
|
||||||
throws java.io.IOException</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Free the native structures associated with this decompressor instance.</div>
|
<div class="block">Free the native structures associated with this decompressor instance.</div>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><strong>Specified by:</strong></dt>
|
<dt><strong>Specified by:</strong></dt>
|
||||||
@@ -1157,7 +1148,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
<dt><strong>Specified by:</strong></dt>
|
<dt><strong>Specified by:</strong></dt>
|
||||||
<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>
|
<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.io.IOException</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="finalize()">
|
<a name="finalize()">
|
||||||
@@ -1200,7 +1191,7 @@ public byte[] decompressToYUV(int flags)
|
|||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<ul class="navList">
|
<ul class="navList">
|
||||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navList">
|
<ul class="navList">
|
||||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJDecompressor.html" target="_top">Frames</a></li>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJDecompressor.html" target="_top">Frames</a></li>
|
||||||
|
|||||||
287
java/doc/org/libjpegturbo/turbojpeg/TJException.html
Normal file
287
java/doc/org/libjpegturbo/turbojpeg/TJException.html
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<!-- NewPage -->
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>TJException</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
|
parent.document.title="TJException";
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<noscript>
|
||||||
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
|
<div class="topNav"><a name="navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="navList" title="Navigation">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/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">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJException.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJException.html" target="_top">No Frames</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></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>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
|
<li>Field | </li>
|
||||||
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
|
<li><a href="#methods_inherited_from_class_java.lang.Throwable">Method</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Detail: </li>
|
||||||
|
<li>Field | </li>
|
||||||
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
|
<li>Method</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<!-- ======== START OF CLASS DATA ======== -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||||
|
<h2 title="Class TJException" class="title">Class TJException</h2>
|
||||||
|
</div>
|
||||||
|
<div class="contentContainer">
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.lang.Object</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.lang.Throwable</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.lang.Exception</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.io.IOException</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>org.libjpegturbo.turbojpeg.TJException</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="description">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<dl>
|
||||||
|
<dt>All Implemented Interfaces:</dt>
|
||||||
|
<dd>java.io.Serializable</dd>
|
||||||
|
</dl>
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
<pre>public class <span class="strong">TJException</span>
|
||||||
|
extends java.io.IOException</pre>
|
||||||
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../serialized-form.html#org.libjpegturbo.turbojpeg.TJException">Serialized Form</a></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="summary">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="constructor_summary">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Constructor Summary</h3>
|
||||||
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||||
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||||
|
<tr>
|
||||||
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException()">TJException</a></strong>()</code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String)">TJException</a></strong>(java.lang.String message)</code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String,%20java.lang.Throwable)">TJException</a></strong>(java.lang.String message,
|
||||||
|
java.lang.Throwable cause)</code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.Throwable)">TJException</a></strong>(java.lang.Throwable cause)</code> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- ========== METHOD SUMMARY =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="method_summary">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Method Summary</h3>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Throwable">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||||
|
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="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, wait, wait, wait</code></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="details">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="constructor_detail">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Constructor Detail</h3>
|
||||||
|
<a name="TJException()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>TJException</h4>
|
||||||
|
<pre>public TJException()</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="TJException(java.lang.String, java.lang.Throwable)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>TJException</h4>
|
||||||
|
<pre>public TJException(java.lang.String message,
|
||||||
|
java.lang.Throwable cause)</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="TJException(java.lang.String)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>TJException</h4>
|
||||||
|
<pre>public TJException(java.lang.String message)</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="TJException(java.lang.Throwable)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockListLast">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>TJException</h4>
|
||||||
|
<pre>public TJException(java.lang.Throwable cause)</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ========= END OF CLASS DATA ========= -->
|
||||||
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="navList" title="Navigation">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/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">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJException.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJException.html" target="_top">No Frames</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
|
<li><a href="../../../allclasses-noframe.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>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
|
<li>Field | </li>
|
||||||
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
|
<li><a href="#methods_inherited_from_class_java.lang.Throwable">Method</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Detail: </li>
|
||||||
|
<li>Field | </li>
|
||||||
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
|
<li>Method</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<ul class="navList">
|
<ul class="navList">
|
||||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navList">
|
<ul class="navList">
|
||||||
@@ -288,7 +288,7 @@ extends java.lang.Object</pre>
|
|||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<ul class="navList">
|
<ul class="navList">
|
||||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navList">
|
<ul class="navList">
|
||||||
|
|||||||
@@ -608,8 +608,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
int h,
|
int h,
|
||||||
int op,
|
int op,
|
||||||
int options,
|
int options,
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - the left boundary of the cropping region. This must be evenly
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - the left boundary of the cropping region. This must be evenly
|
||||||
divisible by the MCU block width (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth(int)</code></a>)</dd><dd><code>y</code> - the upper boundary of the cropping region. This must be evenly
|
divisible by the MCU block width (see <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth(int)</code></a>)</dd><dd><code>y</code> - the upper boundary of the cropping region. This must be evenly
|
||||||
@@ -618,9 +617,7 @@ extends java.awt.Rectangle</pre>
|
|||||||
<code>x</code>).</dd><dd><code>h</code> - the height of the cropping region. Setting this to 0 is the
|
<code>x</code>).</dd><dd><code>h</code> - the height of the cropping region. Setting this to 0 is the
|
||||||
equivalent of setting it to (height of the source JPEG image -
|
equivalent of setting it to (height of the source JPEG image -
|
||||||
<code>y</code>).</dd><dd><code>op</code> - one of the transform operations (<code>OP_*</code>)</dd><dd><code>options</code> - the bitwise OR of one or more of the transform options
|
<code>y</code>).</dd><dd><code>op</code> - one of the transform operations (<code>OP_*</code>)</dd><dd><code>options</code> - the bitwise OR of one or more of the transform options
|
||||||
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd>
|
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJTransform(java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)">
|
<a name="TJTransform(java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJCustomFilter)">
|
||||||
@@ -632,15 +629,12 @@ extends java.awt.Rectangle</pre>
|
|||||||
<pre>public TJTransform(java.awt.Rectangle r,
|
<pre>public TJTransform(java.awt.Rectangle r,
|
||||||
int op,
|
int op,
|
||||||
int options,
|
int options,
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)
|
<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
<div class="block">Create a new lossless transform instance with the given parameters.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>r</code> - a <code>Rectangle</code> instance that specifies the cropping
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>r</code> - a <code>Rectangle</code> instance that specifies the cropping
|
||||||
region. See <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int,%20int,%20int,%20int,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJCustomFilter)"><code>TJTransform(int, int, int, int, int, int, TJCustomFilter)</code></a> for more
|
region. See <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int,%20int,%20int,%20int,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJCustomFilter)"><code>TJTransform(int, int, int, int, int, int, TJCustomFilter)</code></a> for more
|
||||||
detail.</dd><dd><code>op</code> - one of the transform operations (<code>OP_*</code>)</dd><dd><code>options</code> - the bitwise OR of one or more of the transform options
|
detail.</dd><dd><code>op</code> - one of the transform operations (<code>OP_*</code>)</dd><dd><code>options</code> - the bitwise OR of one or more of the transform options
|
||||||
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd>
|
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -232,10 +232,10 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>TJTransformer</h4>
|
<h4>TJTransformer</h4>
|
||||||
<pre>public TJTransformer()
|
<pre>public TJTransformer()
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG lossless transformer instance.</div>
|
<div class="block">Create a TurboJPEG lossless transformer instance.</div>
|
||||||
<dl><dt><span class="strong">Throws:</span></dt>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJTransformer(byte[])">
|
<a name="TJTransformer(byte[])">
|
||||||
@@ -245,13 +245,13 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>TJTransformer</h4>
|
<h4>TJTransformer</h4>
|
||||||
<pre>public TJTransformer(byte[] jpegImage)
|
<pre>public TJTransformer(byte[] jpegImage)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
||||||
be the length of the array.) This buffer is not modified.</dd>
|
be the length of the array.) This buffer is not modified.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="TJTransformer(byte[], int)">
|
<a name="TJTransformer(byte[], int)">
|
||||||
@@ -262,13 +262,13 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<h4>TJTransformer</h4>
|
<h4>TJTransformer</h4>
|
||||||
<pre>public TJTransformer(byte[] jpegImage,
|
<pre>public TJTransformer(byte[] jpegImage,
|
||||||
int imageSize)
|
int imageSize)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
image of length <code>imageSize</code> bytes stored in
|
image of length <code>imageSize</code> bytes stored in
|
||||||
<code>jpegImage</code> with the newly created instance.</div>
|
<code>jpegImage</code> with the newly created instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -288,7 +288,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<pre>public void transform(byte[][] dstBufs,
|
<pre>public void transform(byte[][] dstBufs,
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
instance into one or more JPEG images stored in the given destination
|
instance into one or more JPEG images stored in the given destination
|
||||||
buffers. Lossless transforms work by moving the raw coefficients from one
|
buffers. Lossless transforms work by moving the raw coefficients from one
|
||||||
@@ -310,7 +310,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">
|
<a name="transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">
|
||||||
@@ -321,7 +321,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<h4>transform</h4>
|
<h4>transform</h4>
|
||||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[] transform(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[] transform(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</pre>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||||
which has a transformed JPEG image associated with it.</div>
|
which has a transformed JPEG image associated with it.</div>
|
||||||
@@ -332,7 +332,7 @@ extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title=
|
|||||||
<dt><span class="strong">Returns:</span></dt><dd>an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
<dt><span class="strong">Returns:</span></dt><dd>an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||||
which has a transformed JPEG image associated with it.</dd>
|
which has a transformed JPEG image associated with it.</dd>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getTransformedSizes()">
|
<a name="getTransformedSizes()">
|
||||||
|
|||||||
@@ -434,8 +434,7 @@ extends java.lang.Object</pre>
|
|||||||
<pre>public YUVImage(int width,
|
<pre>public YUVImage(int width,
|
||||||
int[] strides,
|
int[] strides,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
planes, and allocate memory for the image planes.</div>
|
planes, and allocate memory for the image planes.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
@@ -445,9 +444,7 @@ extends java.lang.Object</pre>
|
|||||||
strides for all planes will be set to their respective plane widths. When
|
strides for all planes will be set to their respective plane widths. When
|
||||||
using this constructor, the stride for each plane must be equal to or
|
using this constructor, the stride for each plane must be equal to or
|
||||||
greater than the plane width.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
greater than the plane width.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
||||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="YUVImage(int, int, int, int)">
|
<a name="YUVImage(int, int, int, int)">
|
||||||
@@ -459,15 +456,12 @@ extends java.lang.Object</pre>
|
|||||||
<pre>public YUVImage(int width,
|
<pre>public YUVImage(int width,
|
||||||
int pad,
|
int pad,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
||||||
buffer, and allocate memory for the image buffer.</div>
|
buffer, and allocate memory for the image buffer.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - Each line of each plane in the YUV image buffer will be padded
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - Each line of each plane in the YUV image buffer will be padded
|
||||||
to this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
to this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
||||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="YUVImage(byte[][], int[], int, int[], int, int)">
|
<a name="YUVImage(byte[][], int[], int, int[], int, int)">
|
||||||
@@ -481,8 +475,7 @@ extends java.lang.Object</pre>
|
|||||||
int width,
|
int width,
|
||||||
int[] strides,
|
int[] strides,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
||||||
planes.</div>
|
planes.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
@@ -503,9 +496,7 @@ extends java.lang.Object</pre>
|
|||||||
to each plane or to specify that this <code>YUVImage</code> instance is a
|
to each plane or to specify that this <code>YUVImage</code> instance is a
|
||||||
subregion of a larger image (in which case, <code>strides[i]</code> should
|
subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the new YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the new YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="YUVImage(byte[], int, int, int, int)">
|
<a name="YUVImage(byte[], int, int, int, int)">
|
||||||
@@ -518,8 +509,7 @@ extends java.lang.Object</pre>
|
|||||||
int width,
|
int width,
|
||||||
int pad,
|
int pad,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
||||||
buffer.</div>
|
buffer.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||||
@@ -529,9 +519,7 @@ extends java.lang.Object</pre>
|
|||||||
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
||||||
instance, if each line in each plane of the buffer is padded to the
|
instance, if each line in each plane of the buffer is padded to the
|
||||||
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</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
|
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</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="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -553,8 +541,7 @@ extends java.lang.Object</pre>
|
|||||||
int width,
|
int width,
|
||||||
int[] strides,
|
int[] strides,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
image planes (or just the Y plane, if the image is grayscale.) These
|
image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
@@ -574,9 +561,7 @@ extends java.lang.Object</pre>
|
|||||||
to each plane or to specify that this <code>YUVImage</code> image is a
|
to each plane or to specify that this <code>YUVImage</code> image is a
|
||||||
subregion of a larger image (in which case, <code>strides[i]</code> should
|
subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="setBuf(byte[], int, int, int, int)">
|
<a name="setBuf(byte[], int, int, int, int)">
|
||||||
@@ -589,8 +574,7 @@ extends java.lang.Object</pre>
|
|||||||
int width,
|
int width,
|
||||||
int pad,
|
int pad,
|
||||||
int height,
|
int height,
|
||||||
int subsamp)
|
int subsamp)</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
||||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||||
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
||||||
@@ -599,9 +583,7 @@ extends java.lang.Object</pre>
|
|||||||
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
||||||
instance, if each line in each plane of the buffer is padded to the
|
instance, if each line in each plane of the buffer is padded to the
|
||||||
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</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
|
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</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="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a name="getWidth()">
|
<a name="getWidth()">
|
||||||
@@ -704,13 +686,10 @@ extends java.lang.Object</pre>
|
|||||||
<ul class="blockListLast">
|
<ul class="blockListLast">
|
||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h4>getSize</h4>
|
<h4>getSize</h4>
|
||||||
<pre>public int getSize()
|
<pre>public int getSize()</pre>
|
||||||
throws java.lang.Exception</pre>
|
|
||||||
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||||
stored in a unified buffer rather than separate image planes.)</div>
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV image buffer</dd>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV image buffer</dd></dl>
|
||||||
<dt><span class="strong">Throws:</span></dt>
|
|
||||||
<dd><code>java.lang.Exception</code></dd></dl>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
<li><a href="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
<li><a href="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
||||||
<li><a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</a></li>
|
<li><a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<h2 title="Exceptions">Exceptions</h2>
|
||||||
|
<ul title="Exceptions">
|
||||||
|
<li><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJException</a></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -134,6 +134,21 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="blockList">
|
||||||
|
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Exception Summary table, listing exceptions, and an explanation">
|
||||||
|
<caption><span>Exception Summary</span><span class="tabEnd"> </span></caption>
|
||||||
|
<tr>
|
||||||
|
<th class="colFirst" scope="col">Exception</th>
|
||||||
|
<th class="colLast" scope="col">Description</th>
|
||||||
|
</tr>
|
||||||
|
<tbody>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></td>
|
||||||
|
<td class="colLast"> </td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
|
|||||||
@@ -79,6 +79,19 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
|
||||||
|
<ul>
|
||||||
|
<li type="circle">java.lang.Exception
|
||||||
|
<ul>
|
||||||
|
<li type="circle">java.io.IOException
|
||||||
|
<ul>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJException</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
||||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
|
||||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a> (implements java.io.Closeable)
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a> (implements java.io.Closeable)
|
||||||
|
|||||||
@@ -83,6 +83,19 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
|
||||||
|
<ul>
|
||||||
|
<li type="circle">java.lang.Exception
|
||||||
|
<ul>
|
||||||
|
<li type="circle">java.io.IOException
|
||||||
|
<ul>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJException</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
||||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
|
||||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a> (implements java.io.Closeable)
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a> (implements java.io.Closeable)
|
||||||
|
|||||||
@@ -66,6 +66,15 @@
|
|||||||
<li class="blockList">
|
<li class="blockList">
|
||||||
<h2 title="Package">Package org.libjpegturbo.turbojpeg</h2>
|
<h2 title="Package">Package org.libjpegturbo.turbojpeg</h2>
|
||||||
<ul class="blockList">
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="org.libjpegturbo.turbojpeg.TJException">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Class <a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJException</a> extends java.io.IOException implements Serializable</h3>
|
||||||
|
<dl class="nameValue">
|
||||||
|
<dt>serialVersionUID:</dt>
|
||||||
|
<dd>1L</dd>
|
||||||
|
</dl>
|
||||||
|
</li>
|
||||||
<li class="blockList"><a name="org.libjpegturbo.turbojpeg.TJTransform">
|
<li class="blockList"><a name="org.libjpegturbo.turbojpeg.TJTransform">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -401,8 +402,7 @@ public final class TJ {
|
|||||||
* @return the maximum size of the buffer (in bytes) required to hold a JPEG
|
* @return the maximum size of the buffer (in bytes) required to hold a JPEG
|
||||||
* image with the given width, height, and level of chrominance subsampling.
|
* image with the given width, height, and level of chrominance subsampling.
|
||||||
*/
|
*/
|
||||||
public static native int bufSize(int width, int height, int jpegSubsamp)
|
public static native int bufSize(int width, int height, int jpegSubsamp);
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size of the buffer (in bytes) required to hold a YUV planar
|
* Returns the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
@@ -422,15 +422,13 @@ public final class TJ {
|
|||||||
* image with the given width, height, and level of chrominance subsampling.
|
* image with the given width, height, and level of chrominance subsampling.
|
||||||
*/
|
*/
|
||||||
public static native int bufSizeYUV(int width, int pad, int height,
|
public static native int bufSizeYUV(int width, int pad, int height,
|
||||||
int subsamp)
|
int subsamp);
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use {@link #bufSizeYUV(int, int, int, int)} instead.
|
* @deprecated Use {@link #bufSizeYUV(int, int, int, int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static native int bufSizeYUV(int width, int height, int subsamp)
|
public static native int bufSizeYUV(int width, int height, int subsamp);
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size of the buffer (in bytes) required to hold a YUV image
|
* Returns the size of the buffer (in bytes) required to hold a YUV image
|
||||||
@@ -454,8 +452,7 @@ public final class TJ {
|
|||||||
* image with the given parameters.
|
* image with the given parameters.
|
||||||
*/
|
*/
|
||||||
public static native int planeSizeYUV(int componentID, int width, int stride,
|
public static native int planeSizeYUV(int componentID, int width, int stride,
|
||||||
int height, int subsamp)
|
int height, int subsamp);
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the plane width of a YUV image plane with the given parameters.
|
* Returns the plane width of a YUV image plane with the given parameters.
|
||||||
@@ -471,8 +468,7 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @return the plane width of a YUV image plane with the given parameters.
|
* @return the plane width of a YUV image plane with the given parameters.
|
||||||
*/
|
*/
|
||||||
public static native int planeWidth(int componentID, int width, int subsamp)
|
public static native int planeWidth(int componentID, int width, int subsamp);
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the plane height of a YUV image plane with the given parameters.
|
* Returns the plane height of a YUV image plane with the given parameters.
|
||||||
@@ -489,8 +485,7 @@ public final class TJ {
|
|||||||
* @return the plane height of a YUV image plane with the given parameters.
|
* @return the plane height of a YUV image plane with the given parameters.
|
||||||
*/
|
*/
|
||||||
public static native int planeHeight(int componentID, int height,
|
public static native int planeHeight(int componentID, int height,
|
||||||
int subsamp)
|
int subsamp);
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of fractional scaling factors that the JPEG decompressor in
|
* Returns a list of fractional scaling factors that the JPEG decompressor in
|
||||||
@@ -499,8 +494,7 @@ public final class TJ {
|
|||||||
* @return a list of fractional scaling factors that the JPEG decompressor in
|
* @return a list of fractional scaling factors that the JPEG decompressor in
|
||||||
* this implementation of TurboJPEG supports.
|
* this implementation of TurboJPEG supports.
|
||||||
*/
|
*/
|
||||||
public static native TJScalingFactor[] getScalingFactors()
|
public static native TJScalingFactor[] getScalingFactors();
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2015 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2015 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -43,7 +44,7 @@ public class TJCompressor implements Closeable {
|
|||||||
/**
|
/**
|
||||||
* Create a TurboJPEG compressor instance.
|
* Create a TurboJPEG compressor instance.
|
||||||
*/
|
*/
|
||||||
public TJCompressor() throws Exception {
|
public TJCompressor() throws TJException {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* {@link TJ#PF_RGB TJ.PF_*})
|
* {@link TJ#PF_RGB TJ.PF_*})
|
||||||
*/
|
*/
|
||||||
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
|
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
|
||||||
int height, int pixelFormat) throws Exception {
|
int height, int pixelFormat) throws TJException {
|
||||||
setSourceImage(srcImage, x, y, width, pitch, height, pixelFormat);
|
setSourceImage(srcImage, x, y, width, pitch, height, pixelFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +79,7 @@ public class TJCompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
|
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
|
||||||
int pixelFormat) throws Exception {
|
int pixelFormat) throws TJException {
|
||||||
setSourceImage(srcImage, width, pitch, height, pixelFormat);
|
setSourceImage(srcImage, width, pitch, height, pixelFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||||
*/
|
*/
|
||||||
public TJCompressor(BufferedImage srcImage, int x, int y, int width,
|
public TJCompressor(BufferedImage srcImage, int x, int y, int width,
|
||||||
int height) throws Exception {
|
int height) throws TJException {
|
||||||
setSourceImage(srcImage, x, y, width, height);
|
setSourceImage(srcImage, x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +141,7 @@ public class TJCompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
public void setSourceImage(byte[] srcImage, int x, int y, int width,
|
public void setSourceImage(byte[] srcImage, int x, int y, int width,
|
||||||
int pitch, int height, int pixelFormat)
|
int pitch, int height, int pixelFormat)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
if (handle == 0) init();
|
if (handle == 0) init();
|
||||||
if (srcImage == null || x < 0 || y < 0 || width < 1 || height < 1 ||
|
if (srcImage == null || x < 0 || y < 0 || width < 1 || height < 1 ||
|
||||||
pitch < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF)
|
pitch < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF)
|
||||||
@@ -165,7 +166,7 @@ public class TJCompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setSourceImage(byte[] srcImage, int width, int pitch,
|
public void setSourceImage(byte[] srcImage, int width, int pitch,
|
||||||
int height, int pixelFormat) throws Exception {
|
int height, int pixelFormat) throws TJException {
|
||||||
setSourceImage(srcImage, 0, 0, width, pitch, height, pixelFormat);
|
setSourceImage(srcImage, 0, 0, width, pitch, height, pixelFormat);
|
||||||
srcX = srcY = -1;
|
srcX = srcY = -1;
|
||||||
}
|
}
|
||||||
@@ -192,7 +193,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* height of the source image)
|
* height of the source image)
|
||||||
*/
|
*/
|
||||||
public void setSourceImage(BufferedImage srcImage, int x, int y, int width,
|
public void setSourceImage(BufferedImage srcImage, int x, int y, int width,
|
||||||
int height) throws Exception {
|
int height) throws TJException {
|
||||||
if (handle == 0) init();
|
if (handle == 0) init();
|
||||||
if (srcImage == null || x < 0 || y < 0 || width < 0 || height < 0)
|
if (srcImage == null || x < 0 || y < 0 || width < 0 || height < 0)
|
||||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
@@ -263,7 +264,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* @param srcImage YUV planar image to be compressed. This image is not
|
* @param srcImage YUV planar image to be compressed. This image is not
|
||||||
* modified.
|
* modified.
|
||||||
*/
|
*/
|
||||||
public void setSourceImage(YUVImage srcImage) throws Exception {
|
public void setSourceImage(YUVImage srcImage) throws TJException {
|
||||||
if (handle == 0) init();
|
if (handle == 0) init();
|
||||||
if (srcImage == null)
|
if (srcImage == null)
|
||||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
@@ -323,7 +324,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public void compress(byte[] dstBuf, int flags) throws Exception {
|
public void compress(byte[] dstBuf, int flags) throws TJException {
|
||||||
if (dstBuf == null || flags < 0)
|
if (dstBuf == null || flags < 0)
|
||||||
throw new IllegalArgumentException("Invalid argument in compress()");
|
throw new IllegalArgumentException("Invalid argument in compress()");
|
||||||
if (srcBuf == null && srcBufInt == null && srcYUVImage == null)
|
if (srcBuf == null && srcBufInt == null && srcYUVImage == null)
|
||||||
@@ -373,7 +374,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* not be equal to the size of the JPEG image. Use {@link
|
* not be equal to the size of the JPEG image. Use {@link
|
||||||
* #getCompressedSize} to obtain the size of the JPEG image.
|
* #getCompressedSize} to obtain the size of the JPEG image.
|
||||||
*/
|
*/
|
||||||
public byte[] compress(int flags) throws Exception {
|
public byte[] compress(int flags) throws TJException {
|
||||||
checkSourceImage();
|
checkSourceImage();
|
||||||
byte[] buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
byte[] buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
||||||
compress(buf, flags);
|
compress(buf, flags);
|
||||||
@@ -387,7 +388,7 @@ public class TJCompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
|
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||||
compress(dstBuf, flags);
|
compress(dstBuf, flags);
|
||||||
}
|
}
|
||||||
@@ -398,7 +399,8 @@ public class TJCompressor implements Closeable {
|
|||||||
* {@link #compress(int)} instead.
|
* {@link #compress(int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public byte[] compress(BufferedImage srcImage, int flags) throws Exception {
|
public byte[] compress(BufferedImage srcImage, int flags)
|
||||||
|
throws TJException {
|
||||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||||
return compress(flags);
|
return compress(flags);
|
||||||
}
|
}
|
||||||
@@ -417,7 +419,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public void encodeYUV(YUVImage dstImage, int flags) throws Exception {
|
public void encodeYUV(YUVImage dstImage, int flags) throws TJException {
|
||||||
if (dstImage == null || flags < 0)
|
if (dstImage == null || flags < 0)
|
||||||
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
||||||
if (srcBuf == null && srcBufInt == null)
|
if (srcBuf == null && srcBufInt == null)
|
||||||
@@ -444,7 +446,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* @deprecated Use {@link #encodeYUV(YUVImage, int)} instead.
|
* @deprecated Use {@link #encodeYUV(YUVImage, int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void encodeYUV(byte[] dstBuf, int flags) throws Exception {
|
public void encodeYUV(byte[] dstBuf, int flags) throws TJException {
|
||||||
if(dstBuf == null)
|
if(dstBuf == null)
|
||||||
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
||||||
checkSourceImage();
|
checkSourceImage();
|
||||||
@@ -470,7 +472,7 @@ public class TJCompressor implements Closeable {
|
|||||||
*
|
*
|
||||||
* @return a YUV planar image.
|
* @return a YUV planar image.
|
||||||
*/
|
*/
|
||||||
public YUVImage encodeYUV(int pad, int flags) throws Exception {
|
public YUVImage encodeYUV(int pad, int flags) throws TJException {
|
||||||
checkSourceImage();
|
checkSourceImage();
|
||||||
checkSubsampling();
|
checkSubsampling();
|
||||||
if(pad < 1 || ((pad & (pad - 1)) != 0))
|
if(pad < 1 || ((pad & (pad - 1)) != 0))
|
||||||
@@ -501,7 +503,7 @@ public class TJCompressor implements Closeable {
|
|||||||
*
|
*
|
||||||
* @return a YUV planar image.
|
* @return a YUV planar image.
|
||||||
*/
|
*/
|
||||||
public YUVImage encodeYUV(int[] strides, int flags) throws Exception {
|
public YUVImage encodeYUV(int[] strides, int flags) throws TJException {
|
||||||
checkSourceImage();
|
checkSourceImage();
|
||||||
checkSubsampling();
|
checkSubsampling();
|
||||||
YUVImage yuvImage = new YUVImage(srcWidth, strides, srcHeight, subsamp);
|
YUVImage yuvImage = new YUVImage(srcWidth, strides, srcHeight, subsamp);
|
||||||
@@ -513,7 +515,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* @deprecated Use {@link #encodeYUV(int, int)} instead.
|
* @deprecated Use {@link #encodeYUV(int, int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public byte[] encodeYUV(int flags) throws Exception {
|
public byte[] encodeYUV(int flags) throws TJException {
|
||||||
checkSourceImage();
|
checkSourceImage();
|
||||||
checkSubsampling();
|
checkSubsampling();
|
||||||
YUVImage yuvImage = new YUVImage(srcWidth, 4, srcHeight, subsamp);
|
YUVImage yuvImage = new YUVImage(srcWidth, 4, srcHeight, subsamp);
|
||||||
@@ -528,7 +530,7 @@ public class TJCompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
|
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||||
encodeYUV(dstBuf, flags);
|
encodeYUV(dstBuf, flags);
|
||||||
}
|
}
|
||||||
@@ -539,7 +541,8 @@ public class TJCompressor implements Closeable {
|
|||||||
* {@link #encodeYUV(int, int)} instead.
|
* {@link #encodeYUV(int, int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public byte[] encodeYUV(BufferedImage srcImage, int flags) throws Exception {
|
public byte[] encodeYUV(BufferedImage srcImage, int flags)
|
||||||
|
throws TJException {
|
||||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||||
return encodeYUV(flags);
|
return encodeYUV(flags);
|
||||||
}
|
}
|
||||||
@@ -559,7 +562,7 @@ public class TJCompressor implements Closeable {
|
|||||||
* Free the native structures associated with this compressor instance.
|
* Free the native structures associated with this compressor instance.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws TJException {
|
||||||
if (handle != 0)
|
if (handle != 0)
|
||||||
destroy();
|
destroy();
|
||||||
}
|
}
|
||||||
@@ -568,55 +571,59 @@ public class TJCompressor implements Closeable {
|
|||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
try {
|
try {
|
||||||
close();
|
close();
|
||||||
} catch(Exception e) {
|
} catch(TJException e) {
|
||||||
} finally {
|
} finally {
|
||||||
super.finalize();
|
super.finalize();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private native void init() throws Exception;
|
private native void init() throws TJException;
|
||||||
|
|
||||||
private native void destroy() throws IOException;
|
private native void destroy() throws TJException;
|
||||||
|
|
||||||
// JPEG size in bytes is returned
|
// JPEG size in bytes is returned
|
||||||
|
@Deprecated
|
||||||
private native int compress(byte[] srcBuf, int width, int pitch,
|
private native int compress(byte[] srcBuf, int width, int pitch,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
||||||
int flags) throws Exception; // deprecated
|
int flags) throws TJException;
|
||||||
|
|
||||||
private native int compress(byte[] srcBuf, int x, int y, int width,
|
private native int compress(byte[] srcBuf, int x, int y, int width,
|
||||||
int pitch, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
int pitch, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
||||||
int jpegQual, int flags) throws Exception;
|
int jpegQual, int flags) throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native int compress(int[] srcBuf, int width, int stride,
|
private native int compress(int[] srcBuf, int width, int stride,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
||||||
int flags) throws Exception; // deprecated
|
int flags) throws TJException;
|
||||||
|
|
||||||
private native int compress(int[] srcBuf, int x, int y, int width,
|
private native int compress(int[] srcBuf, int x, int y, int width,
|
||||||
int stride, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
int stride, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
||||||
int jpegQual, int flags) throws Exception;
|
int jpegQual, int flags) throws TJException;
|
||||||
|
|
||||||
private native int compressFromYUV(byte[][] srcPlanes, int[] srcOffsets,
|
private native int compressFromYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
int width, int[] srcStrides, int height, int subsamp, byte[] dstBuf,
|
int width, int[] srcStrides, int height, int subsamp, byte[] dstBuf,
|
||||||
int jpegQual, int flags)
|
int jpegQual, int flags)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||||
throws Exception; // deprecated
|
throws TJException;
|
||||||
|
|
||||||
private native void encodeYUV(byte[] srcBuf, int x, int y, int width,
|
private native void encodeYUV(byte[] srcBuf, int x, int y, int width,
|
||||||
int pitch, int height, int pixelFormat, byte[][] dstPlanes,
|
int pitch, int height, int pixelFormat, byte[][] dstPlanes,
|
||||||
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||||
throws Exception; // deprecated
|
throws TJException;
|
||||||
|
|
||||||
private native void encodeYUV(int[] srcBuf, int x, int y, int width,
|
private native void encodeYUV(int[] srcBuf, int x, int y, int width,
|
||||||
int srcStride, int height, int pixelFormat, byte[][] dstPlanes,
|
int srcStride, int height, int pixelFormat, byte[][] dstPlanes,
|
||||||
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
|
|||||||
@@ -72,5 +72,5 @@ public interface TJCustomFilter {
|
|||||||
void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
||||||
Rectangle planeRegion, int componentID, int transformID,
|
Rectangle planeRegion, int componentID, int transformID,
|
||||||
TJTransform transform)
|
TJTransform transform)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2015 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2015 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -43,7 +44,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
/**
|
/**
|
||||||
* Create a TurboJPEG decompresssor instance.
|
* Create a TurboJPEG decompresssor instance.
|
||||||
*/
|
*/
|
||||||
public TJDecompressor() throws Exception {
|
public TJDecompressor() throws TJException {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
||||||
* be the length of the array.) This buffer is not modified.
|
* be the length of the array.) This buffer is not modified.
|
||||||
*/
|
*/
|
||||||
public TJDecompressor(byte[] jpegImage) throws Exception {
|
public TJDecompressor(byte[] jpegImage) throws TJException {
|
||||||
init();
|
init();
|
||||||
setSourceImage(jpegImage, jpegImage.length);
|
setSourceImage(jpegImage, jpegImage.length);
|
||||||
}
|
}
|
||||||
@@ -68,7 +69,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG image (in bytes)
|
||||||
*/
|
*/
|
||||||
public TJDecompressor(byte[] jpegImage, int imageSize) throws Exception {
|
public TJDecompressor(byte[] jpegImage, int imageSize) throws TJException {
|
||||||
init();
|
init();
|
||||||
setSourceImage(jpegImage, imageSize);
|
setSourceImage(jpegImage, imageSize);
|
||||||
}
|
}
|
||||||
@@ -81,7 +82,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @param yuvImage {@link YUVImage} instance containing a YUV planar
|
* @param yuvImage {@link YUVImage} instance containing a YUV planar
|
||||||
* image to be decoded. This image is not modified.
|
* image to be decoded. This image is not modified.
|
||||||
*/
|
*/
|
||||||
public TJDecompressor(YUVImage yuvImage) throws Exception {
|
public TJDecompressor(YUVImage yuvImage) throws TJException {
|
||||||
init();
|
init();
|
||||||
setSourceImage(yuvImage);
|
setSourceImage(yuvImage);
|
||||||
}
|
}
|
||||||
@@ -96,7 +97,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG image (in bytes)
|
||||||
*/
|
*/
|
||||||
public void setSourceImage(byte[] jpegImage, int imageSize)
|
public void setSourceImage(byte[] jpegImage, int imageSize)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
if (jpegImage == null || imageSize < 1)
|
if (jpegImage == null || imageSize < 1)
|
||||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
jpegBuf = jpegImage;
|
jpegBuf = jpegImage;
|
||||||
@@ -109,7 +110,8 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @deprecated Use {@link #setSourceImage(byte[], int)} instead.
|
* @deprecated Use {@link #setSourceImage(byte[], int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setJPEGImage(byte[] jpegImage, int imageSize) throws Exception {
|
public void setJPEGImage(byte[] jpegImage, int imageSize)
|
||||||
|
throws TJException {
|
||||||
setSourceImage(jpegImage, imageSize);
|
setSourceImage(jpegImage, imageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +123,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @param srcImage {@link YUVImage} instance containing a YUV planar image to
|
* @param srcImage {@link YUVImage} instance containing a YUV planar image to
|
||||||
* be decoded. This image is not modified.
|
* be decoded. This image is not modified.
|
||||||
*/
|
*/
|
||||||
public void setSourceImage(YUVImage srcImage) throws Exception {
|
public void setSourceImage(YUVImage srcImage) {
|
||||||
if (srcImage == null)
|
if (srcImage == null)
|
||||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
yuvImage = srcImage;
|
yuvImage = srcImage;
|
||||||
@@ -239,8 +241,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* decompressor can generate without exceeding the desired image width and
|
* decompressor can generate without exceeding the desired image width and
|
||||||
* height.
|
* height.
|
||||||
*/
|
*/
|
||||||
public int getScaledWidth(int desiredWidth, int desiredHeight)
|
public int getScaledWidth(int desiredWidth, int desiredHeight) {
|
||||||
throws Exception {
|
|
||||||
if (jpegWidth < 1 || jpegHeight < 1)
|
if (jpegWidth < 1 || jpegHeight < 1)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (desiredWidth < 0 || desiredHeight < 0)
|
if (desiredWidth < 0 || desiredHeight < 0)
|
||||||
@@ -281,8 +282,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* decompressor can generate without exceeding the desired image width and
|
* decompressor can generate without exceeding the desired image width and
|
||||||
* height.
|
* height.
|
||||||
*/
|
*/
|
||||||
public int getScaledHeight(int desiredWidth, int desiredHeight)
|
public int getScaledHeight(int desiredWidth, int desiredHeight) {
|
||||||
throws Exception {
|
|
||||||
if (jpegWidth < 1 || jpegHeight < 1)
|
if (jpegWidth < 1 || jpegHeight < 1)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (desiredWidth < 0 || desiredHeight < 0)
|
if (desiredWidth < 0 || desiredHeight < 0)
|
||||||
@@ -370,7 +370,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
|
public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
|
||||||
int pitch, int desiredHeight, int pixelFormat,
|
int pitch, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception {
|
int flags) throws TJException {
|
||||||
if (jpegBuf == null && yuvImage == null)
|
if (jpegBuf == null && yuvImage == null)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (dstBuf == null || x < 0 || y < 0 || pitch < 0 ||
|
if (dstBuf == null || x < 0 || y < 0 || pitch < 0 ||
|
||||||
@@ -399,7 +399,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public void decompress(byte[] dstBuf, int desiredWidth, int pitch,
|
public void decompress(byte[] dstBuf, int desiredWidth, int pitch,
|
||||||
int desiredHeight, int pixelFormat, int flags)
|
int desiredHeight, int pixelFormat, int flags)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
decompress(dstBuf, 0, 0, desiredWidth, pitch, desiredHeight, pixelFormat,
|
decompress(dstBuf, 0, 0, desiredWidth, pitch, desiredHeight, pixelFormat,
|
||||||
flags);
|
flags);
|
||||||
}
|
}
|
||||||
@@ -429,7 +429,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @return a buffer containing the decompressed image.
|
* @return a buffer containing the decompressed image.
|
||||||
*/
|
*/
|
||||||
public byte[] decompress(int desiredWidth, int pitch, int desiredHeight,
|
public byte[] decompress(int desiredWidth, int pitch, int desiredHeight,
|
||||||
int pixelFormat, int flags) throws Exception {
|
int pixelFormat, int flags) throws TJException {
|
||||||
if (pitch < 0 ||
|
if (pitch < 0 ||
|
||||||
(yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
(yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||||
@@ -462,7 +462,8 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public void decompressToYUV(YUVImage dstImage, int flags) throws Exception {
|
public void decompressToYUV(YUVImage dstImage, int flags)
|
||||||
|
throws TJException {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (dstImage == null || flags < 0)
|
if (dstImage == null || flags < 0)
|
||||||
@@ -486,7 +487,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @deprecated Use {@link #decompressToYUV(YUVImage, int)} instead.
|
* @deprecated Use {@link #decompressToYUV(YUVImage, int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void decompressToYUV(byte[] dstBuf, int flags) throws Exception {
|
public void decompressToYUV(byte[] dstBuf, int flags) throws TJException {
|
||||||
YUVImage dstImage = new YUVImage(dstBuf, jpegWidth, 4, jpegHeight,
|
YUVImage dstImage = new YUVImage(dstBuf, jpegWidth, 4, jpegHeight,
|
||||||
jpegSubsamp);
|
jpegSubsamp);
|
||||||
decompressToYUV(dstImage, flags);
|
decompressToYUV(dstImage, flags);
|
||||||
@@ -532,7 +533,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
public YUVImage decompressToYUV(int desiredWidth, int[] strides,
|
public YUVImage decompressToYUV(int desiredWidth, int[] strides,
|
||||||
int desiredHeight,
|
int desiredHeight,
|
||||||
int flags) throws Exception {
|
int flags) throws TJException {
|
||||||
if (flags < 0)
|
if (flags < 0)
|
||||||
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||||
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||||
@@ -585,7 +586,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @return a YUV planar image.
|
* @return a YUV planar image.
|
||||||
*/
|
*/
|
||||||
public YUVImage decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
public YUVImage decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
||||||
int flags) throws Exception {
|
int flags) throws TJException {
|
||||||
if (flags < 0)
|
if (flags < 0)
|
||||||
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||||
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||||
@@ -607,7 +608,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @deprecated Use {@link #decompressToYUV(int, int, int, int)} instead.
|
* @deprecated Use {@link #decompressToYUV(int, int, int, int)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public byte[] decompressToYUV(int flags) throws Exception {
|
public byte[] decompressToYUV(int flags) throws TJException {
|
||||||
YUVImage dstImage = new YUVImage(jpegWidth, 4, jpegHeight, jpegSubsamp);
|
YUVImage dstImage = new YUVImage(jpegWidth, 4, jpegHeight, jpegSubsamp);
|
||||||
decompressToYUV(dstImage, flags);
|
decompressToYUV(dstImage, flags);
|
||||||
return dstImage.getBuf();
|
return dstImage.getBuf();
|
||||||
@@ -677,7 +678,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
|
public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
|
||||||
int stride, int desiredHeight, int pixelFormat,
|
int stride, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception {
|
int flags) throws TJException {
|
||||||
if (jpegBuf == null && yuvImage == null)
|
if (jpegBuf == null && yuvImage == null)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (dstBuf == null || x < 0 || y < 0 || stride < 0 ||
|
if (dstBuf == null || x < 0 || y < 0 || stride < 0 ||
|
||||||
@@ -710,7 +711,8 @@ public class TJDecompressor implements Closeable {
|
|||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public void decompress(BufferedImage dstImage, int flags) throws Exception {
|
public void decompress(BufferedImage dstImage, int flags)
|
||||||
|
throws TJException {
|
||||||
if (dstImage == null || flags < 0)
|
if (dstImage == null || flags < 0)
|
||||||
throw new IllegalArgumentException("Invalid argument in decompress()");
|
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||||
int desiredWidth = dstImage.getWidth();
|
int desiredWidth = dstImage.getWidth();
|
||||||
@@ -819,7 +821,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
*/
|
*/
|
||||||
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
||||||
int bufferedImageType, int flags)
|
int bufferedImageType, int flags)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
if ((yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
if ((yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||||
flags < 0)
|
flags < 0)
|
||||||
throw new IllegalArgumentException("Invalid argument in decompress()");
|
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||||
@@ -835,7 +837,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
* Free the native structures associated with this decompressor instance.
|
* Free the native structures associated with this decompressor instance.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws TJException {
|
||||||
if (handle != 0)
|
if (handle != 0)
|
||||||
destroy();
|
destroy();
|
||||||
}
|
}
|
||||||
@@ -844,49 +846,52 @@ public class TJDecompressor implements Closeable {
|
|||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
try {
|
try {
|
||||||
close();
|
close();
|
||||||
} catch(Exception e) {
|
} catch(TJException e) {
|
||||||
} finally {
|
} finally {
|
||||||
super.finalize();
|
super.finalize();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private native void init() throws Exception;
|
private native void init() throws TJException;
|
||||||
|
|
||||||
private native void destroy() throws IOException;
|
private native void destroy() throws TJException;
|
||||||
|
|
||||||
private native void decompressHeader(byte[] srcBuf, int size)
|
private native void decompressHeader(byte[] srcBuf, int size)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf,
|
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf,
|
||||||
int desiredWidth, int pitch, int desiredHeight, int pixelFormat, int flags)
|
int desiredWidth, int pitch, int desiredHeight, int pixelFormat, int flags)
|
||||||
throws Exception; // deprecated
|
throws TJException;
|
||||||
|
|
||||||
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf, int x,
|
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf, int x,
|
||||||
int y, int desiredWidth, int pitch, int desiredHeight, int pixelFormat,
|
int y, int desiredWidth, int pitch, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception;
|
int flags) throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void decompress(byte[] srcBuf, int size, int[] dstBuf,
|
private native void decompress(byte[] srcBuf, int size, int[] dstBuf,
|
||||||
int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception; // deprecated
|
int flags) throws TJException;
|
||||||
|
|
||||||
private native void decompress(byte[] srcBuf, int size, int[] dstBuf, int x,
|
private native void decompress(byte[] srcBuf, int size, int[] dstBuf, int x,
|
||||||
int y, int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
int y, int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception;
|
int flags) throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
||||||
int flags) throws Exception; // deprecated
|
int flags) throws TJException;
|
||||||
|
|
||||||
private native void decompressToYUV(byte[] srcBuf, int size,
|
private native void decompressToYUV(byte[] srcBuf, int size,
|
||||||
byte[][] dstPlanes, int[] dstOffsets, int desiredWidth, int[] dstStrides,
|
byte[][] dstPlanes, int[] dstOffsets, int desiredWidth, int[] dstStrides,
|
||||||
int desiredheight, int flags) throws Exception;
|
int desiredheight, int flags) throws TJException;
|
||||||
|
|
||||||
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
int[] srcStrides, int subsamp, byte[] dstBuf, int x, int y, int width,
|
int[] srcStrides, int subsamp, byte[] dstBuf, int x, int y, int width,
|
||||||
int pitch, int height, int pixelFormat, int flags) throws Exception;
|
int pitch, int height, int pixelFormat, int flags) throws TJException;
|
||||||
|
|
||||||
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
int[] srcStrides, int subsamp, int[] dstBuf, int x, int y, int width,
|
int[] srcStrides, int subsamp, int[] dstBuf, int x, int y, int width,
|
||||||
int stride, int height, int pixelFormat, int flags) throws Exception;
|
int stride, int height, int pixelFormat, int flags) throws TJException;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
|
|||||||
53
java/org/libjpegturbo/turbojpeg/TJException.java
Normal file
53
java/org/libjpegturbo/turbojpeg/TJException.java
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* - Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* - Neither the name of the libjpeg-turbo Project nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived from this
|
||||||
|
* software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.libjpegturbo.turbojpeg;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class TJException extends IOException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public TJException() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public TJException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TJException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TJException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class TJTransform extends Rectangle {
|
|||||||
* TJCustomFilter} interface, or null if no custom filter is needed
|
* TJCustomFilter} interface, or null if no custom filter is needed
|
||||||
*/
|
*/
|
||||||
public TJTransform(int x, int y, int w, int h, int op, int options,
|
public TJTransform(int x, int y, int w, int h, int op, int options,
|
||||||
TJCustomFilter cf) throws Exception {
|
TJCustomFilter cf) {
|
||||||
super(x, y, w, h);
|
super(x, y, w, h);
|
||||||
this.op = op;
|
this.op = op;
|
||||||
this.options = options;
|
this.options = options;
|
||||||
@@ -184,7 +184,7 @@ public class TJTransform extends Rectangle {
|
|||||||
* TJCustomFilter} interface, or null if no custom filter is needed
|
* TJCustomFilter} interface, or null if no custom filter is needed
|
||||||
*/
|
*/
|
||||||
public TJTransform(Rectangle r, int op, int options,
|
public TJTransform(Rectangle r, int op, int options,
|
||||||
TJCustomFilter cf) throws Exception {
|
TJCustomFilter cf) {
|
||||||
super(r);
|
super(r);
|
||||||
this.op = op;
|
this.op = op;
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011, 2013-2015 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011, 2013-2015 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -36,7 +37,7 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
/**
|
/**
|
||||||
* Create a TurboJPEG lossless transformer instance.
|
* Create a TurboJPEG lossless transformer instance.
|
||||||
*/
|
*/
|
||||||
public TJTransformer() throws Exception {
|
public TJTransformer() throws TJException {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
||||||
* be the length of the array.) This buffer is not modified.
|
* be the length of the array.) This buffer is not modified.
|
||||||
*/
|
*/
|
||||||
public TJTransformer(byte[] jpegImage) throws Exception {
|
public TJTransformer(byte[] jpegImage) throws TJException {
|
||||||
init();
|
init();
|
||||||
setSourceImage(jpegImage, jpegImage.length);
|
setSourceImage(jpegImage, jpegImage.length);
|
||||||
}
|
}
|
||||||
@@ -61,7 +62,7 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG image (in bytes)
|
||||||
*/
|
*/
|
||||||
public TJTransformer(byte[] jpegImage, int imageSize) throws Exception {
|
public TJTransformer(byte[] jpegImage, int imageSize) throws TJException {
|
||||||
init();
|
init();
|
||||||
setSourceImage(jpegImage, imageSize);
|
setSourceImage(jpegImage, imageSize);
|
||||||
}
|
}
|
||||||
@@ -94,7 +95,7 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public void transform(byte[][] dstBufs, TJTransform[] transforms,
|
public void transform(byte[][] dstBufs, TJTransform[] transforms,
|
||||||
int flags) throws Exception {
|
int flags) throws TJException {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null)
|
||||||
throw new IllegalStateException("JPEG buffer not initialized");
|
throw new IllegalStateException("JPEG buffer not initialized");
|
||||||
transformedSizes = transform(jpegBuf, jpegBufSize, dstBufs, transforms,
|
transformedSizes = transform(jpegBuf, jpegBufSize, dstBufs, transforms,
|
||||||
@@ -117,7 +118,7 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
|
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
byte[][] dstBufs = new byte[transforms.length][];
|
byte[][] dstBufs = new byte[transforms.length][];
|
||||||
if (jpegWidth < 1 || jpegHeight < 1)
|
if (jpegWidth < 1 || jpegHeight < 1)
|
||||||
throw new IllegalStateException("JPEG buffer not initialized");
|
throw new IllegalStateException("JPEG buffer not initialized");
|
||||||
@@ -149,10 +150,10 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
return transformedSizes;
|
return transformedSizes;
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void init() throws Exception;
|
private native void init() throws TJException;
|
||||||
|
|
||||||
private native int[] transform(byte[] srcBuf, int srcSize, byte[][] dstBufs,
|
private native int[] transform(byte[] srcBuf, int srcSize, byte[][] dstBufs,
|
||||||
TJTransform[] transforms, int flags) throws Exception;
|
TJTransform[] transforms, int flags) throws TJException;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2014 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2014 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -86,8 +87,7 @@ public class YUVImage {
|
|||||||
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public YUVImage(int width, int[] strides, int height, int subsamp)
|
public YUVImage(int width, int[] strides, int height, int subsamp) {
|
||||||
throws Exception {
|
|
||||||
setBuf(null, null, width, strides, height, subsamp, true);
|
setBuf(null, null, width, strides, height, subsamp, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,8 +105,7 @@ public class YUVImage {
|
|||||||
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public YUVImage(int width, int pad, int height, int subsamp)
|
public YUVImage(int width, int pad, int height, int subsamp) {
|
||||||
throws Exception {
|
|
||||||
setBuf(new byte[TJ.bufSizeYUV(width, pad, height, subsamp)], width, pad,
|
setBuf(new byte[TJ.bufSizeYUV(width, pad, height, subsamp)], width, pad,
|
||||||
height, subsamp);
|
height, subsamp);
|
||||||
}
|
}
|
||||||
@@ -146,7 +145,7 @@ public class YUVImage {
|
|||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public YUVImage(byte[][] planes, int[] offsets, int width, int[] strides,
|
public YUVImage(byte[][] planes, int[] offsets, int width, int[] strides,
|
||||||
int height, int subsamp) throws Exception {
|
int height, int subsamp) {
|
||||||
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +171,7 @@ public class YUVImage {
|
|||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public YUVImage(byte[] yuvImage, int width, int pad, int height,
|
public YUVImage(byte[] yuvImage, int width, int pad, int height,
|
||||||
int subsamp) throws Exception {
|
int subsamp) {
|
||||||
setBuf(yuvImage, width, pad, height, subsamp);
|
setBuf(yuvImage, width, pad, height, subsamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,12 +209,12 @@ public class YUVImage {
|
|||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public void setBuf(byte[][] planes, int[] offsets, int width, int strides[],
|
public void setBuf(byte[][] planes, int[] offsets, int width, int strides[],
|
||||||
int height, int subsamp) throws Exception {
|
int height, int subsamp) {
|
||||||
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBuf(byte[][] planes, int[] offsets, int width, int strides[],
|
private void setBuf(byte[][] planes, int[] offsets, int width, int strides[],
|
||||||
int height, int subsamp, boolean alloc) throws Exception {
|
int height, int subsamp, boolean alloc) {
|
||||||
if ((planes == null && !alloc) || width < 1 || height < 1 || subsamp < 0 ||
|
if ((planes == null && !alloc) || width < 1 || height < 1 || subsamp < 0 ||
|
||||||
subsamp >= TJ.NUMSAMP)
|
subsamp >= TJ.NUMSAMP)
|
||||||
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||||
@@ -279,7 +278,7 @@ public class YUVImage {
|
|||||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
*/
|
*/
|
||||||
public void setBuf(byte[] yuvImage, int width, int pad, int height,
|
public void setBuf(byte[] yuvImage, int width, int pad, int height,
|
||||||
int subsamp) throws Exception {
|
int subsamp) {
|
||||||
if (yuvImage == null || width < 1 || pad < 1 || ((pad & (pad - 1)) != 0) ||
|
if (yuvImage == null || width < 1 || pad < 1 || ((pad & (pad - 1)) != 0) ||
|
||||||
height < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
height < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
||||||
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||||
@@ -413,7 +412,7 @@ public class YUVImage {
|
|||||||
*
|
*
|
||||||
* @return the size (in bytes) of the YUV image buffer
|
* @return the size (in bytes) of the YUV image buffer
|
||||||
*/
|
*/
|
||||||
public int getSize() throws Exception {
|
public int getSize() {
|
||||||
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
|
|||||||
@@ -46,9 +46,7 @@
|
|||||||
goto bailout; \
|
goto bailout; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _throwio(msg) _throw(msg, "java/io/IOException")
|
#define _throwtj() _throw(tjGetErrorStr(), "org/libjpegturbo/turbojpeg/TJException")
|
||||||
|
|
||||||
#define _throwtj() _throw(tjGetErrorStr(), "java/lang/Exception")
|
|
||||||
|
|
||||||
#define _throwarg(msg) _throw(msg, "java/lang/IllegalArgumentException")
|
#define _throwarg(msg) _throw(msg, "java/lang/IllegalArgumentException")
|
||||||
|
|
||||||
@@ -107,7 +105,7 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSize
|
|||||||
(JNIEnv *env, jclass cls, jint width, jint height, jint jpegSubsamp)
|
(JNIEnv *env, jclass cls, jint width, jint height, jint jpegSubsamp)
|
||||||
{
|
{
|
||||||
jint retval=(jint)tjBufSize(width, height, jpegSubsamp);
|
jint retval=(jint)tjBufSize(width, height, jpegSubsamp);
|
||||||
if(retval==-1) _throwtj();
|
if(retval==-1) _throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
return retval;
|
return retval;
|
||||||
@@ -118,7 +116,7 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII
|
|||||||
(JNIEnv *env, jclass cls, jint width, jint pad, jint height, jint subsamp)
|
(JNIEnv *env, jclass cls, jint width, jint pad, jint height, jint subsamp)
|
||||||
{
|
{
|
||||||
jint retval=(jint)tjBufSizeYUV2(width, pad, height, subsamp);
|
jint retval=(jint)tjBufSizeYUV2(width, pad, height, subsamp);
|
||||||
if(retval==-1) _throwtj();
|
if(retval==-1) _throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
return retval;
|
return retval;
|
||||||
@@ -139,7 +137,7 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeSizeYUV__IIIII
|
|||||||
{
|
{
|
||||||
jint retval=(jint)tjPlaneSizeYUV(componentID, width, stride, height,
|
jint retval=(jint)tjPlaneSizeYUV(componentID, width, stride, height,
|
||||||
subsamp);
|
subsamp);
|
||||||
if(retval==-1) _throwtj();
|
if(retval==-1) _throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
return retval;
|
return retval;
|
||||||
@@ -150,7 +148,7 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeWidth__III
|
|||||||
(JNIEnv *env, jclass cls, jint componentID, jint width, jint subsamp)
|
(JNIEnv *env, jclass cls, jint componentID, jint width, jint subsamp)
|
||||||
{
|
{
|
||||||
jint retval=(jint)tjPlaneWidth(componentID, width, subsamp);
|
jint retval=(jint)tjPlaneWidth(componentID, width, subsamp);
|
||||||
if(retval==-1) _throwtj();
|
if(retval==-1) _throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
return retval;
|
return retval;
|
||||||
@@ -161,7 +159,7 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeHeight__III
|
|||||||
(JNIEnv *env, jclass cls, jint componentID, jint height, jint subsamp)
|
(JNIEnv *env, jclass cls, jint componentID, jint height, jint subsamp)
|
||||||
{
|
{
|
||||||
jint retval=(jint)tjPlaneHeight(componentID, height, subsamp);
|
jint retval=(jint)tjPlaneHeight(componentID, height, subsamp);
|
||||||
if(retval==-1) _throwtj();
|
if(retval==-1) _throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
return retval;
|
return retval;
|
||||||
@@ -323,7 +321,7 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFrom
|
|||||||
int pw=tjPlaneWidth(i, width, subsamp);
|
int pw=tjPlaneWidth(i, width, subsamp);
|
||||||
|
|
||||||
if(planeSize<0 || pw<0)
|
if(planeSize<0 || pw<0)
|
||||||
_throwtj();
|
_throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
if(srcOffsets[i]<0)
|
if(srcOffsets[i]<0)
|
||||||
_throwarg("Invalid argument in compressFromYUV()");
|
_throwarg("Invalid argument in compressFromYUV()");
|
||||||
@@ -402,7 +400,7 @@ static void TJCompressor_encodeYUV
|
|||||||
int pw=tjPlaneWidth(i, width, subsamp);
|
int pw=tjPlaneWidth(i, width, subsamp);
|
||||||
|
|
||||||
if(planeSize<0 || pw<0)
|
if(planeSize<0 || pw<0)
|
||||||
_throwtj();
|
_throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
if(dstOffsets[i]<0)
|
if(dstOffsets[i]<0)
|
||||||
_throwarg("Invalid argument in encodeYUV()");
|
_throwarg("Invalid argument in encodeYUV()");
|
||||||
@@ -537,7 +535,7 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_destroy
|
|||||||
|
|
||||||
gethandle();
|
gethandle();
|
||||||
|
|
||||||
if(tjDestroy(handle)==-1) _throwio(tjGetErrorStr());
|
if(tjDestroy(handle)==-1) _throwtj();
|
||||||
(*env)->SetLongField(env, obj, _fid, 0);
|
(*env)->SetLongField(env, obj, _fid, 0);
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
@@ -572,7 +570,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_libjpegturbo_turbojpeg_TJ_getScalingFact
|
|||||||
jobjectArray sfjava=NULL;
|
jobjectArray sfjava=NULL;
|
||||||
|
|
||||||
if((sf=tjGetScalingFactors(&n))==NULL || n==0)
|
if((sf=tjGetScalingFactors(&n))==NULL || n==0)
|
||||||
_throwtj();
|
_throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
bailif0(sfcls=(*env)->FindClass(env, "org/libjpegturbo/turbojpeg/TJScalingFactor"));
|
bailif0(sfcls=(*env)->FindClass(env, "org/libjpegturbo/turbojpeg/TJScalingFactor"));
|
||||||
bailif0(sfjava=(jobjectArray)(*env)->NewObjectArray(env, n, sfcls, 0));
|
bailif0(sfjava=(jobjectArray)(*env)->NewObjectArray(env, n, sfcls, 0));
|
||||||
@@ -751,7 +749,7 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
|||||||
if(height==0) height=jpegHeight;
|
if(height==0) height=jpegHeight;
|
||||||
sf=tjGetScalingFactors(&nsf);
|
sf=tjGetScalingFactors(&nsf);
|
||||||
if(!sf || nsf<1)
|
if(!sf || nsf<1)
|
||||||
_throwtj();
|
_throwarg(tjGetErrorStr());
|
||||||
for(i=0; i<nsf; i++)
|
for(i=0; i<nsf; i++)
|
||||||
{
|
{
|
||||||
scaledWidth=TJSCALED(jpegWidth, sf[i]);
|
scaledWidth=TJSCALED(jpegWidth, sf[i]);
|
||||||
@@ -769,7 +767,7 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
|||||||
int pw=tjPlaneWidth(i, scaledWidth, jpegSubsamp);
|
int pw=tjPlaneWidth(i, scaledWidth, jpegSubsamp);
|
||||||
|
|
||||||
if(planeSize<0 || pw<0)
|
if(planeSize<0 || pw<0)
|
||||||
_throwtj();
|
_throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
if(dstOffsets[i]<0)
|
if(dstOffsets[i]<0)
|
||||||
_throwarg("Invalid argument in decompressToYUV()");
|
_throwarg("Invalid argument in decompressToYUV()");
|
||||||
@@ -882,7 +880,7 @@ static void TJDecompressor_decodeYUV
|
|||||||
int pw=tjPlaneWidth(i, width, subsamp);
|
int pw=tjPlaneWidth(i, width, subsamp);
|
||||||
|
|
||||||
if(planeSize<0 || pw<0)
|
if(planeSize<0 || pw<0)
|
||||||
_throwtj();
|
_throwarg(tjGetErrorStr());
|
||||||
|
|
||||||
if(srcOffsets[i]<0)
|
if(srcOffsets[i]<0)
|
||||||
_throwarg("Invalid argument in decodeYUV()");
|
_throwarg("Invalid argument in decodeYUV()");
|
||||||
|
|||||||
Reference in New Issue
Block a user