diff --git a/java/doc/index-all.html b/java/doc/index-all.html index e38d2302..66427697 100644 --- a/java/doc/index-all.html +++ b/java/doc/index-all.html @@ -300,8 +300,8 @@ Method in class org.libjpegturbo.turbojpeg.getTransformedSizes() - Method in class org.libjpegturbo.turbojpeg.TJTransformer -
transform().
+srcImage with the newly-created
+ source image stored in srcImage with the newly created
instance.
jpegImage with the newly-created instance.
+ stored in jpegImage with the newly created instance.
imageSize bytes stored in jpegImage
- with the newly-created instance.
+ with the newly created instance.
jpegImage with the newly-created instance.
+ image stored in jpegImage with the newly created instance.
imageSize bytes stored in
- jpegImage with the newly-created instance.
+ jpegImage with the newly created instance.
srcImage with the newly-created
+ source image stored in srcImage with the newly created
instance.
@@ -354,12 +354,12 @@ public TJCompressor(byte[] srcImage,
throws java.lang.Exception
srcImage with the newly-created
+ source image stored in srcImage with the newly created
instance.
srcImage - see setSourceImage(byte[], int, int, int, int, int, int) for descriptionx - see setSourceImage(byte[], int, int, int, int, int, int) for descriptiony - see setSourceImage(byte[], int, int, int, int, int, int) for descriptionwidth - see setSourceImage(byte[], int, int, int, int, int, int) for descriptionpitch - see setSourceImage(byte[], int, int, int, int, int, int) for descriptionheight - see setSourceImage(byte[], int, int, int, int, int, int) for descriptionpixelFormat - pixel format of the source image (one of
- TJ.PF_*)
+ TJ.PF_*)
java.lang.Exception
srcImage - image buffer containing RGB or grayscale pixels to be
- compressedx - x offset (in pixels) of the region from which the JPEG image
- should be compressed, relative to the start of srcImage.y - y offset (in pixels) of the region from which the JPEG image
- should be compressed, relative to the start of srcImage.width - width (in pixels) of the region in the source image from
- which the JPEG image should be compressed.pitch - bytes per line of the source image. Normally, this should be
+ compressed or encodedx - x offset (in pixels) of the region in the source image from which
+ the JPEG or YUV image should be compressed/encodedy - y offset (in pixels) of the region in the source image from which
+ the JPEG or YUV image should be compressed/encodedwidth - width (in pixels) of the region in the source image from
+ which the JPEG or YUV image should be compressed/encodedpitch - bytes per line of the source image. Normally, this should be
width * TJ.pixelSize(pixelFormat) if the source image is
unpadded, but you can use this parameter to, for instance, specify that
the scanlines in the source image are padded to a 4-byte boundary or to
- compress a JPEG image from a region of a larger source image. You can
- also be clever and use this parameter to skip lines, etc. Setting this
- parameter to 0 is the equivalent of setting it to width *
- TJ.pixelSize(pixelFormat).height - height (in pixels) of the region in the source image from
- which the JPEG image should be compressed.pixelFormat - pixel format of the source image (one of
- TJ.PF_*)
+ compress/encode a JPEG or YUV image from a region of a larger source
+ image. You can also be clever and use this parameter to skip lines, etc.
+ Setting this parameter to 0 is the equivalent of setting it to
+ width * TJ.pixelSize(pixelFormat).height - height (in pixels) of the region in the source image from
+ which the JPEG or YUV image should be compressed/encodedpixelFormat - pixel format of the source image (one of
+ TJ.PF_*)
java.lang.Exception
newSubsamp - the new level of chrominance subsampling (one of
- TJ.SAMP_*)
+newSubsamp - the level of chrominance subsampling to use in
+ subsequent compress/encode operations (one of
+ TJ.SAMP_*)
java.lang.ExceptiondstBuf - buffer that will receive the JPEG image. Use
TJ.bufSize(int, int, int) to determine the maximum size for this buffer based on
- the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of TJ.FLAG_*
+ the source image's width and height and the desired level of chrominance
+ subsampling.flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.Exception
flags - the bitwise OR of one or more of TJ.FLAG_*
+flags - the bitwise OR of one or more of
+ TJ.FLAG_*
getCompressedSize() to obtain the size of the JPEG image.
srcImage - a BufferedImage instance containing RGB or
grayscale pixels to be compresseddstBuf - buffer that will receive the JPEG image. Use
TJ.bufSize(int, int, int) to determine the maximum size for this buffer based on
- the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of TJ.FLAG_*
+ the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.Exception
srcImage - a BufferedImage instance containing RGB or
- grayscale pixels to be compressedflags - the bitwise OR of one or more of TJ.FLAG_*
+ grayscale pixels to be compressedflags - the bitwise OR of one or more of
+ TJ.FLAG_*
getCompressedSize() to obtain the size of the JPEG image.
dstBuf - buffer that will receive the YUV planar image. Use
TJ.bufSizeYUV(int, int, int) to determine the appropriate size for this buffer
- based on the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of TJ.FLAG_*
+ based on the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.ExceptionencodeYUV(byte[], int) for more detail.
flags - the bitwise OR of one or more of TJ.FLAG_*
+flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.ExceptionsrcImage - a BufferedImage instance containing RGB or
grayscale pixels to be encodeddstBuf - buffer that will receive the YUV planar image. Use
TJ.bufSizeYUV(int, int, int) to determine the appropriate size for this buffer
- based on the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of TJ.FLAG_*
+ based on the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.Exception
srcImage - a BufferedImage instance containing RGB or
- grayscale pixels to be encodedflags - the bitwise OR of one or more of TJ.FLAG_*
+ grayscale pixels to be encodedflags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.ExceptionjpegImage with the newly-created instance.
+ stored in jpegImage with the newly created instance.
TJDecompressor(byte[] jpegImage,
@@ -193,7 +193,7 @@ TurboJPEG decompressor
Create a TurboJPEG decompressor instance and associate the JPEG image
of length imageSize bytes stored in jpegImage
- with the newly-created instance.jpegImage with the newly-created instance.
+ stored in jpegImage with the newly created instance.
jpegImage - JPEG image buffer (size of the JPEG image is assumed to
@@ -532,7 +532,7 @@ public TJDecompressor(byte[] jpegImage,
imageSize bytes stored in jpegImage
- with the newly-created instance.
+ with the newly created instance.
jpegImage - JPEG image bufferimageSize - size of the JPEG image (in bytes)
@@ -766,8 +766,9 @@ public void decompress(byte[] dstBuf,
scaling in the JPEG decompressor to generate the largest possible image
that will fit within the desired dimensions. Setting this to 0 is the
same as setting it to the height of the JPEG image (in other words, the
- height will not be considered when determining the scaled image size.)pixelFormat - pixel format of the decompressed image (one of
- TJ.PF_*)flags - the bitwise OR of one or more of TJ.FLAG_*
+ height will not be considered when determining the scaled image size.)pixelFormat - pixel format of the decompressed/decoded image (one of
+ TJ.PF_*)flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.ExceptiondesiredHeight - see
decompress(byte[], int, int, int, int, int, int, int)
for descriptionpixelFormat - pixel format of the decompressed image (one of
- TJ.PF_*)flags - the bitwise OR of one or more of TJ.FLAG_*
+ TJ.PF_*)flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.ExceptionTJCompressor.encodeYUV(byte[], int). Note
- that, if the width or height of the image is not an even multiple of the
- MCU block size (see TJ.getMCUWidth(int) and TJ.getMCUHeight(int)),
- then an intermediate buffer copy will be performed within TurboJPEG.
+ images generated by TJCompressor.encodeYUV(byte[], int).
NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the convention of the digital video community, the TurboJPEG API uses "YUV" to @@ -850,7 +849,8 @@ public void decompressToYUV(byte[] dstBuf,
dstBuf - buffer that will receive the YUV planar image. Use
TJ.bufSizeYUV(int, int, int) to determine the appropriate size for this buffer
- based on the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of TJ.FLAG_*
+ based on the image width, height, and level of chrominance subsampling.flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.ExceptiondecompressToYUV(byte[], int) for more detail.
flags - the bitwise OR of one or more of TJ.FLAG_*
+flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.ExceptionpixelFormat - pixel format of the decompressed image (one of
- TJ.PF_*)flags - the bitwise OR of one or more of TJ.FLAG_*
+ TJ.PF_*)flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.Exception
dstImage - a BufferedImage instance that will receive
- the decompressed imageflags - the bitwise OR of one or more of TJ.FLAG_*
+ the decompressed image. The width and height of the
+ BufferedImage instance must match one of the scaled image
+ sizes that TurboJPEG is capable of generating from the JPEG image.flags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.Exceptiondecompress(byte[], int, int, int, int, int, int, int) for
descriptiondesiredHeight - see
decompress(byte[], int, int, int, int, int, int, int) for
- descriptionbufferedImageType - the image type of the newly-created
- BufferedImage instance (for instance,
- BufferedImage.TYPE_INT_RGB)flags - the bitwise OR of one or more of TJ.FLAG_*
+ descriptionbufferedImageType - the image type of the BufferedImage
+ instance that will be created (for instance,
+ BufferedImage.TYPE_INT_RGB)flags - the bitwise OR of one or more of
+ TJ.FLAG_*
BufferedImage instance containing the
decompressed image
jpegImage with the newly-created instance.
+ image stored in jpegImage with the newly created instance.
TJTransformer(byte[] jpegImage,
@@ -152,7 +152,7 @@ TurboJPEG lossless transformer
Create a TurboJPEG lossless transformer instance and associate the JPEG
image of length imageSize bytes stored in
- jpegImage with the newly-created instance.jpegImage with the newly created instance.
getTransformedSizes()
transform().jpegImage with the newly-created instance.
+ image stored in jpegImage with the newly created instance.
jpegImage - JPEG image buffer (size of the JPEG image is assumed to
@@ -269,7 +269,7 @@ public TJTransformer(byte[] jpegImage,
imageSize bytes stored in
- jpegImage with the newly-created instance.
+ jpegImage with the newly created instance.
jpegImage - JPEG image bufferimageSize - size of the JPEG image (in bytes)
@@ -313,9 +313,10 @@ public void transform(byte[][] dstBufs,
receive a JPEG image that has been transformed using the parameters in
transforms[i]. Use TJ.bufSize(int, int, int) to determine the
maximum size for each buffer based on the transformed or cropped width and
- height.transforms - an array of TJTransform instances, each of
+ height and the level of subsampling used in the source image.transforms - an array of TJTransform instances, each of
which specifies the transform parameters and/or cropping region for the
- corresponding transformed output imageflags - the bitwise OR of one or more of TJ.FLAG_*
+ corresponding transformed output imageflags - the bitwise OR of one or more of
+ TJ.FLAG_*
java.lang.ExceptionTJTransform instances, each of
which specifies the transform parameters and/or cropping region for the
- corresponding transformed output imageflags - the bitwise OR of one or more of TJ.FLAG_*
+ corresponding transformed output imageflags - the bitwise OR of one or more of
+ TJ.FLAG_*
TJDecompressor instances, each of
which has a transformed JPEG image associated with it
transform().
+
transform()
+java.lang.ExceptionsrcImage with the newly-created
+ * source image stored in srcImage with the newly created
* instance.
*
* @param srcImage see {@link #setSourceImage} for description
@@ -64,7 +64,7 @@ public class TJCompressor {
* @param height see {@link #setSourceImage} for description
*
* @param pixelFormat pixel format of the source image (one of
- * {@link TJ TJ.PF_*})
+ * {@link TJ#PF_RGB TJ.PF_*})
*/
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
int height, int pixelFormat) throws Exception {
@@ -85,31 +85,31 @@ public class TJCompressor {
* Associate an uncompressed source image with this compressor instance.
*
* @param srcImage image buffer containing RGB or grayscale pixels to be
- * compressed
+ * compressed or encoded
*
- * @param x x offset (in pixels) of the region from which the JPEG image
- * should be compressed, relative to the start of srcImage.
+ * @param x x offset (in pixels) of the region in the source image from which
+ * the JPEG or YUV image should be compressed/encoded
*
- * @param y y offset (in pixels) of the region from which the JPEG image
- * should be compressed, relative to the start of srcImage.
+ * @param y y offset (in pixels) of the region in the source image from which
+ * the JPEG or YUV image should be compressed/encoded
*
* @param width width (in pixels) of the region in the source image from
- * which the JPEG image should be compressed.
+ * which the JPEG or YUV image should be compressed/encoded
*
* @param pitch bytes per line of the source image. Normally, this should be
* width * TJ.pixelSize(pixelFormat) if the source image is
* unpadded, but you can use this parameter to, for instance, specify that
* the scanlines in the source image are padded to a 4-byte boundary or to
- * compress a JPEG image from a region of a larger source image. You can
- * also be clever and use this parameter to skip lines, etc. Setting this
- * parameter to 0 is the equivalent of setting it to width *
- * TJ.pixelSize(pixelFormat).
+ * compress/encode a JPEG or YUV image from a region of a larger source
+ * image. You can also be clever and use this parameter to skip lines, etc.
+ * Setting this parameter to 0 is the equivalent of setting it to
+ * width * TJ.pixelSize(pixelFormat).
*
* @param height height (in pixels) of the region in the source image from
- * which the JPEG image should be compressed.
+ * which the JPEG or YUV image should be compressed/encoded
*
* @param pixelFormat pixel format of the source image (one of
- * {@link TJ TJ.PF_*})
+ * {@link TJ#PF_RGB TJ.PF_*})
*/
public void setSourceImage(byte[] srcImage, int x, int y, int width,
int pitch, int height, int pixelFormat)
@@ -146,8 +146,9 @@ public class TJCompressor {
* Set the level of chrominance subsampling for subsequent compress/encode
* operations.
*
- * @param newSubsamp the new level of chrominance subsampling (one of
- * {@link TJ TJ.SAMP_*})
+ * @param newSubsamp the level of chrominance subsampling to use in
+ * subsequent compress/encode operations (one of
+ * {@link TJ#SAMP_444 TJ.SAMP_*})
*/
public void setSubsamp(int newSubsamp) throws Exception {
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
@@ -173,9 +174,11 @@ public class TJCompressor {
*
* @param dstBuf buffer that will receive the JPEG image. Use
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
- * the image width, height, and level of chrominance subsampling.
+ * the source image's width and height and the desired level of chrominance
+ * subsampling.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void compress(byte[] dstBuf, int flags) throws Exception {
if (dstBuf == null || flags < 0)
@@ -200,7 +203,8 @@ public class TJCompressor {
* Compress the uncompressed source image associated with this compressor
* instance and return a buffer containing a JPEG image.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a JPEG image. The length of this buffer will
* not be equal to the size of the JPEG image. Use {@link
@@ -225,7 +229,8 @@ public class TJCompressor {
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
* the image width, height, and level of chrominance subsampling.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
throws Exception {
@@ -306,7 +311,8 @@ public class TJCompressor {
* @param srcImage a BufferedImage instance containing RGB or
* grayscale pixels to be compressed
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a JPEG image. The length of this buffer will
* not be equal to the size of the JPEG image. Use {@link
@@ -343,7 +349,8 @@ public class TJCompressor {
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void encodeYUV(byte[] dstBuf, int flags) throws Exception {
if (dstBuf == null || flags < 0)
@@ -362,7 +369,8 @@ public class TJCompressor {
* instance and return a buffer containing a YUV planar image. See
* {@link #encodeYUV(byte[], int)} for more detail.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a YUV planar image
*/
@@ -388,7 +396,8 @@ public class TJCompressor {
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
throws Exception {
@@ -457,7 +466,8 @@ public class TJCompressor {
* @param srcImage a BufferedImage instance containing RGB or
* grayscale pixels to be encoded
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a YUV planar image
*/
diff --git a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
index 1b7efbea..ec8ab772 100644
--- a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
+++ b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
@@ -48,7 +48,7 @@ public class TJDecompressor {
/**
* Create a TurboJPEG decompressor instance and associate the JPEG image
- * stored in jpegImage with the newly-created instance.
+ * stored in jpegImage with the newly created instance.
*
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
* be the length of the array)
@@ -61,7 +61,7 @@ public class TJDecompressor {
/**
* Create a TurboJPEG decompressor instance and associate the JPEG image
* of length imageSize bytes stored in jpegImage
- * with the newly-created instance.
+ * with the newly created instance.
*
* @param jpegImage JPEG image buffer
*
@@ -154,7 +154,6 @@ public class TJDecompressor {
return jpegBufSize;
}
-
/**
* Returns the width of the largest scaled-down image that the TurboJPEG
* decompressor can generate without exceeding the desired image width and
@@ -287,10 +286,11 @@ public class TJDecompressor {
* same as setting it to the height of the JPEG image (in other words, the
* height will not be considered when determining the scaled image size.)
*
- * @param pixelFormat pixel format of the decompressed image (one of
- * {@link TJ TJ.PF_*})
+ * @param pixelFormat pixel format of the decompressed/decoded image (one of
+ * {@link TJ#PF_RGB TJ.PF_*})
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
int pitch, int desiredHeight, int pixelFormat,
@@ -338,9 +338,10 @@ public class TJDecompressor {
* for description
*
* @param pixelFormat pixel format of the decompressed image (one of
- * {@link TJ TJ.PF_*})
+ * {@link TJ#PF_RGB TJ.PF_*})
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing the decompressed image
*/
@@ -365,10 +366,7 @@ public class TJDecompressor {
* This method performs JPEG decompression but leaves out the color
* conversion step, so a planar YUV image is generated instead of an RGB
* image. The padding of the planes in this image is the same as in the
- * images generated by {@link TJCompressor#encodeYUV(byte[], int)}. Note
- * that, if the width or height of the image is not an even multiple of the
- * MCU block size (see {@link TJ#getMCUWidth} and {@link TJ#getMCUHeight}),
- * then an intermediate buffer copy will be performed within TurboJPEG.
+ * images generated by {@link TJCompressor#encodeYUV(byte[], int)}.
*
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
* convention of the digital video community, the TurboJPEG API uses "YUV" to
@@ -378,7 +376,8 @@ public class TJDecompressor {
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
* based on the image width, height, and level of chrominance subsampling.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void decompressToYUV(byte[] dstBuf, int flags) throws Exception {
if (jpegBuf == null)
@@ -394,7 +393,8 @@ public class TJDecompressor {
* instance and return a buffer containing a YUV planar image. See {@link
* #decompressToYUV(byte[], int)} for more detail.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a buffer containing a YUV planar image
*/
@@ -456,9 +456,10 @@ public class TJDecompressor {
* height will not be considered when determining the scaled image size.)
*
* @param pixelFormat pixel format of the decompressed image (one of
- * {@link TJ TJ.PF_*})
+ * {@link TJ#PF_RGB TJ.PF_*})
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
int stride, int desiredHeight, int pixelFormat,
@@ -479,9 +480,13 @@ public class TJDecompressor {
* BufferedImage instance.
*
* @param dstImage a BufferedImage instance that will receive
- * the decompressed image
+ * the decompressed image. The width and height of the
+ * BufferedImage instance must match one of the scaled image
+ * sizes that TurboJPEG is capable of generating from the JPEG image.
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ *
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void decompress(BufferedImage dstImage, int flags) throws Exception {
if (dstImage == null || flags < 0)
@@ -491,7 +496,7 @@ public class TJDecompressor {
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
- throw new Exception("BufferedImage dimensions do not match a scaled image size that TurboJPEG is capable of generating.");
+ throw new Exception("BufferedImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
int pixelFormat; boolean intPixels = false;
if (byteOrder == null)
byteOrder = ByteOrder.nativeOrder();
@@ -562,11 +567,12 @@ public class TJDecompressor {
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
* description
*
- * @param bufferedImageType the image type of the newly-created
- * BufferedImage instance (for instance,
+ * @param bufferedImageType the image type of the BufferedImage
+ * instance that will be created (for instance,
* BufferedImage.TYPE_INT_RGB)
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*
* @return a BufferedImage instance containing the
* decompressed image
diff --git a/java/org/libjpegturbo/turbojpeg/TJTransformer.java b/java/org/libjpegturbo/turbojpeg/TJTransformer.java
index f84eaa12..da821633 100644
--- a/java/org/libjpegturbo/turbojpeg/TJTransformer.java
+++ b/java/org/libjpegturbo/turbojpeg/TJTransformer.java
@@ -42,7 +42,7 @@ public class TJTransformer extends TJDecompressor {
/**
* Create a TurboJPEG lossless transformer instance and associate the JPEG
- * image stored in jpegImage with the newly-created instance.
+ * image stored in jpegImage with the newly created instance.
*
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
* be the length of the array)
@@ -55,7 +55,7 @@ public class TJTransformer extends TJDecompressor {
/**
* Create a TurboJPEG lossless transformer instance and associate the JPEG
* image of length imageSize bytes stored in
- * jpegImage with the newly-created instance.
+ * jpegImage with the newly created instance.
*
* @param jpegImage JPEG image buffer
*
@@ -84,13 +84,14 @@ public class TJTransformer extends TJDecompressor {
* receive a JPEG image that has been transformed using the parameters in
* transforms[i]. Use {@link TJ#bufSize} to determine the
* maximum size for each buffer based on the transformed or cropped width and
- * height.
+ * height and the level of subsampling used in the source image.
*
* @param transforms an array of {@link TJTransform} instances, each of
* which specifies the transform parameters and/or cropping region for the
* corresponding transformed output image
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public void transform(byte[][] dstBufs, TJTransform[] transforms,
int flags) throws Exception {
@@ -112,7 +113,8 @@ public class TJTransformer extends TJDecompressor {
* @return an array of {@link TJDecompressor} instances, each of
* which has a transformed JPEG image associated with it
*
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @param flags the bitwise OR of one or more of
+ * {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
*/
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
throws Exception {
@@ -135,11 +137,11 @@ public class TJTransformer extends TJDecompressor {
}
/**
- * Returns an array containing the sizes of the transformed JPEG images from
- * the most recent call to {@link #transform transform()}.
+ * Returns an array containing the sizes of the transformed JPEG images
+ * generated by the most recent transform operation.
*
- * @return an array containing the sizes of the transformed JPEG images from
- * the most recent call to {@link #transform transform()}
+ * @return an array containing the sizes of the transformed JPEG images
+ * generated by the most recent transform operation
*/
public int[] getTransformedSizes() throws Exception {
if (transformedSizes == null)