diff --git a/java/doc/allclasses-frame.html b/java/doc/allclasses-frame.html index 7c849bed..c02463d0 100644 --- a/java/doc/allclasses-frame.html +++ b/java/doc/allclasses-frame.html @@ -2,12 +2,12 @@
- +| +Deprecated Methods | +|
|---|---|
| org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)
+ + Use + TJDecompressor.decompress(byte[], int, int, int, int, int, int, int) instead. |
+|
| org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)
+ + Use + TJCompressor.setSourceImage(byte[], int, int, int, int, int, int) instead. |
+|
TJDecompressor.decompress(byte[], int, int, int, int, int, int, int) instead.
TJCompressor.setSourceImage(byte[], int, int, int, int, int, int) instead.
FLAG_FASTUPSAMPLE
getPixelSize(int pixelFormat)
public static final int FLAG_FASTUPSAMPLE
pixelFormat - the pixel format (one of PF_*)
-java.lang.Exception
width - the width (in pixels) of the JPEG imageheight - the height (in pixels) of the JPEG imagejpegSubsamp - the level of chrominance subsampling to be used when
generating the JPEG image (one of TJ.SAMP_*)
java.lang.ExceptionsetSourceImage(byte[], int, int, int, int, int, int) instead.
srcImage - 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 - see setSourceImage(byte[], int, int, int, int, int, int) for description
+srcImage - 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_*)
java.lang.Exception
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 - see setSourceImage(byte[], int, int, int, int, int, int) for description
+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_*)
java.lang.ExceptionsetSourceImage(byte[], int, int, int, int, int, int) instead.
srcImage - 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_*)
+
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 and height.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.ExceptionsrcImage - 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 and height.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.ExceptionTJ.SAMP_420, which produces an image compatible with the I420 (AKA
- "YUV420P") format.
+ of the luminance plane is padded to the nearest multiple of 2 in the
+ output image (same goes for the height of the luminance plane, if the
+ chrominance components are subsampled along the vertical dimension.)
+ Also, each line of each plane in the output image is padded to 4 bytes.
+ Although this will work with any subsampling option, it is really only
+ useful in combination with TJ.SAMP_420, which produces an image
+ compatible with the I420 (AKA "YUV420P") format.
dstBuf - buffer that will receive the YUV planar image. Use
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html b/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html
index 09b8b227..c91978d5 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html
@@ -2,12 +2,12 @@
-
+
planeRegion - rectangle containing the width and height of the
component plane to which coeffBuffer belongscomponentID - ID number of the component plane to which
- coeffBufferbelongs (Y, Cb, and Cr have, respectively, ID's of
+ coeffBuffer belongs (Y, U, and V have, respectively, ID's of
0, 1, and 2 in typical JPEG images.)transformID - ID number of the transformed image to which
coeffBuffer belongs. This is the same as the index of the
- transform in the transforms array that was passed to TJTransformer.transform().transform - a TJTransform instance that specifies the
+ transform in the transforms array that was passed to TJTransformer.transform().transform - a TJTransform instance that specifies the
parameters and/or cropping region for this transform
java.lang.Exceptiondecompress(byte[], int, int, int, int, int, int, int) instead.
@@ -683,7 +683,7 @@ public int getScaledWidth(int desiredWidth, 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.) -
@@ -711,7 +711,7 @@ public int getScaledHeight(int desiredWidth, 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.) -
x - x offset (in pixels) of the region into which the JPEG image
should be decompressed, relative to the start of dstBuf.y - y offset (in pixels) of the region into which the JPEG image
- should be decompressed, relative to the start of dstBuf.desiredWidth - desired width (in pixels) of the decompressed image.
- If the desired image dimensions are smaller than the dimensions of the
- JPEG image being decompressed, then TurboJPEG will use 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 width of the JPEG image (in other words, the width will not be
- considered when determining the scaled image size.)pitch - bytes per line of the destination image. Normally, this
+ should be decompressed, relative to the start of dstBuf.desiredWidth - desired width (in pixels) of the decompressed image
+ (or image region.) If the desired image dimensions are different than the
+ dimensions of the JPEG image being decompressed, then TurboJPEG will use
+ 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 width of the JPEG image (in other words, the
+ width will not be considered when determining the scaled image size.)pitch - bytes per line of the destination image. Normally, this
should be set to scaledWidth * TJ.pixelSize(pixelFormat) if
the decompressed image is unpadded, but you can use this to, for instance,
pad each line of the decompressed image to a 4-byte boundary or to
@@ -762,13 +762,13 @@ public void decompress(byte[] dstBuf,
scalingFactor.getScaled(jpegWidth)
or by calling getScaledWidth(int, int). Setting this parameter to
0 is the equivalent of setting it to scaledWidth *
- TJ.pixelSize(pixelFormat).desiredHeight - desired height (in pixels) of the decompressed image.
- If the desired image dimensions are smaller than the dimensions of the
- JPEG image being decompressed, then TurboJPEG will use 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.pixelSize(pixelFormat).desiredHeight - desired height (in pixels) of the decompressed image
+ (or image region.) If the desired image dimensions are different than the
+ dimensions of the JPEG image being decompressed, then TurboJPEG will use
+ 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_*
java.lang.Exceptiondecompress(byte[], int, int, int, int, int, int, int) instead.
dstBuf - see
- decompress(byte[], int, int, int, int, int, int, int)
- for descriptiondesiredWidth - see
- decompress(byte[], int, int, int, int, int, int, int)
- for descriptionpitch - see
- decompress(byte[], int, int, int, int, int, int, int)
- for descriptiondesiredHeight - 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_*
+
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.
+ image. The padding of the planes in this image is the same as in the
+ images generated by 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 TJ.getMCUWidth(int) and TJ.getMCUHeight(int)),
+ then an intermediate buffer copy will be performed within TurboJPEG.
dstBuf - buffer that will receive the YUV planar image. Use
@@ -908,25 +899,25 @@ public void decompress(int[] dstBuf,
parameters can be used to specify the region into which the JPEG image
should be decompressed.x - x offset (in pixels) of the region into which the JPEG image
should be decompressed, relative to the start of dstBuf.y - y offset (in pixels) of the region into which the JPEG image
- should be decompressed, relative to the start of dstBuf.desiredWidth - desired width (in pixels) of the decompressed image.
- If the desired image dimensions are smaller than the dimensions of the
- JPEG image being decompressed, then TurboJPEG will use 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 width of the JPEG image (in other words, the width will not be
- considered when determining the scaled image size.)stride - pixels per line of the destination image. Normally, this
+ should be decompressed, relative to the start of dstBuf.desiredWidth - desired width (in pixels) of the decompressed image
+ (or image region.) If the desired image dimensions are different than the
+ dimensions of the JPEG image being decompressed, then TurboJPEG will use
+ 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 width of the JPEG image (in other words, the
+ width will not be considered when determining the scaled image size.)stride - pixels per line of the destination image. Normally, this
should be set to scaledWidth, but you can use this to, for
instance, decompress the JPEG image into a region of a larger image.
NOTE: scaledWidth can be determined by calling
scalingFactor.getScaled(jpegWidth)
or by calling getScaledWidth(int, int). Setting this parameter to
- 0 is the equivalent of setting it to scaledWidth.desiredHeight - desired height (in pixels) of the decompressed image.
- If the desired image dimensions are smaller than the dimensions of the
- JPEG image being decompressed, then TurboJPEG will use 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
+ 0 is the equivalent of setting it to scaledWidth.desiredHeight - desired height (in pixels) of the decompressed image
+ (or image region.) If the desired image dimensions are different than the
+ dimensions of the JPEG image being decompressed, then TurboJPEG will use
+ 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_*
java.lang.Exceptionx - the left boundary of the cropping region. This must be evenly
divisible by the MCU block width (see TJ.getMCUWidth(int))y - the upper boundary of the cropping region. This must be evenly
divisible by the MCU block height (see TJ.getMCUHeight(int))w - the width of the cropping region. Setting this to 0 is the
- equivalent of setting it to the width of the source JPEG image - x.h - the height of the cropping region. Setting this to 0 is the
- equivalent of setting it to the height of the source JPEG image - y.op - one of the transform operations (OP_*)options - the bitwise OR of one or more of the transform options
+ equivalent of setting it to (width of the source JPEG image -
+ x).h - the height of the cropping region. Setting this to 0 is the
+ equivalent of setting it to (height of the source JPEG image -
+ y).op - one of the transform operations (OP_*)options - the bitwise OR of one or more of the transform options
(OPT_*)cf - an instance of an object that implements the TJCustomFilter interface, or null if no custom filter is needed
java.lang.Exception
dstBufs - an array of image buffers. dstbufs[i] will
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 cropped width and height.transforms - an array of TJTransform instances, each of
+ maximum size for each buffer based on the transformed or cropped width and
+ height.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_*
PF_*)
*
- * @return the pixel size (in bytes) of the given pixel format
+ * @return the pixel size (in bytes) for the given pixel format
*/
public static int getPixelSize(int pixelFormat) throws Exception {
if(pixelFormat < 0 || pixelFormat >= NUMPF)
@@ -291,11 +291,11 @@ final public class TJ {
*/
final public static int FLAG_FORCESSE3 = 128;
/**
- * When decompressing, use the fastest chrominance upsampling algorithm
- * available in the underlying codec. The default is to use smooth
- * upsampling, which creates a smooth transition between neighboring
- * chrominance components in order to reduce upsampling artifacts in the
- * decompressed image.
+ * When decompressing an image that was compressed using chrominance
+ * subsampling, use the fastest chrominance upsampling algorithm available in
+ * the underlying codec. The default is to use smooth upsampling, which
+ * creates a smooth transition between neighboring chrominance components in
+ * order to reduce upsampling artifacts in the decompressed image.
*/
final public static int FLAG_FASTUPSAMPLE = 256;
/**
@@ -321,8 +321,7 @@ final public class TJ {
/**
* Returns the maximum size of the buffer (in bytes) required to hold a JPEG
- * image with the given width and height, and level of chrominance
- * subsampling.
+ * image with the given width, height, and level of chrominance subsampling.
*
* @param width the width (in pixels) of the JPEG image
*
@@ -332,8 +331,7 @@ final public class TJ {
* generating the JPEG image (one of {@link TJ TJ.SAMP_*})
*
* @return the maximum size of the buffer (in bytes) required to hold a JPEG
- * image with the given width and height, and level of chrominance
- * subsampling
+ * image with the given width, height, and level of chrominance subsampling
*/
public native static int bufSize(int width, int height, int jpegSubsamp)
throws Exception;
diff --git a/java/org/libjpegturbo/turbojpeg/TJCompressor.java b/java/org/libjpegturbo/turbojpeg/TJCompressor.java
index 9f76b42a..f46eee9c 100644
--- a/java/org/libjpegturbo/turbojpeg/TJCompressor.java
+++ b/java/org/libjpegturbo/turbojpeg/TJCompressor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C)2011-2012 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -59,7 +59,8 @@ public class TJCompressor {
*
* @param height see {@link #setSourceImage} for description
*
- * @param pixelFormat see {@link #setSourceImage} for description
+ * @param pixelFormat pixel format of the source image (one of
+ * {@link TJ TJ.PF_*})
*/
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
int pixelFormat) throws Exception {
@@ -83,7 +84,8 @@ public class TJCompressor {
*
* @param height see {@link #setSourceImage} for description
*
- * @param pixelFormat see {@link #setSourceImage} for description
+ * @param pixelFormat pixel format of the source image (one of
+ * {@link TJ TJ.PF_*})
*/
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
int height, int pixelFormat) throws Exception {
@@ -137,28 +139,9 @@ public class TJCompressor {
}
/**
- * Associate an uncompressed source image with this compressor instance.
- *
- * @param srcImage see
- * {@link #setSourceImage(byte[], int, int, int, int, int, int)} for
- * description
- *
- * @param width see
- * {@link #setSourceImage(byte[], int, int, int, int, int, int)} for
- * description
- *
- * @param pitch see
- * {@link #setSourceImage(byte[], int, int, int, int, int, int)} for
- * description
- *
- * @param height see
- * {@link #setSourceImage(byte[], int, int, int, int, int, int)} for
- * description
- *
- * @param pixelFormat pixel format of the source image (one of
- * {@link TJ TJ.PF_*})
+ * @deprecated Use
+ * {@link #setSourceImage(byte[], int, int, int, int, int, int)} instead.
*/
-
public void setSourceImage(byte[] srcImage, int width, int pitch,
int height, int pixelFormat) throws Exception {
setSourceImage(srcImage, 0, 0, width, pitch, height, pixelFormat);
@@ -197,7 +180,7 @@ 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 and height.
+ * the image width, height, and level of chrominance subsampling.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
*/
@@ -242,7 +225,7 @@ 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 and height.
+ * the image width, height, and level of chrominance subsampling.
*
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
*/
@@ -342,13 +325,13 @@ public class TJCompressor {
* TurboJPEG's underlying codec to produce a planar YUV image that is
* suitable for direct video display. Specifically, if the chrominance
* components are subsampled along the horizontal dimension, then the width
- * of the luminance plane is padded to 2 in the output image (same goes for
- * the height of the luminance plane, if the chrominance components are
- * subsampled along the vertical dimension.) Also, each line of each plane
- * in the output image is padded to 4 bytes. Although this will work with
- * any subsampling option, it is really only useful in combination with
- * {@link TJ#SAMP_420}, which produces an image compatible with the I420 (AKA
- * "YUV420P") format.
+ * of the luminance plane is padded to the nearest multiple of 2 in the
+ * output image (same goes for the height of the luminance plane, if the
+ * chrominance components are subsampled along the vertical dimension.)
+ * Also, each line of each plane in the output image is padded to 4 bytes.
+ * Although this will work with any subsampling option, it is really only
+ * useful in combination with {@link TJ#SAMP_420}, which produces an image
+ * compatible with the I420 (AKA "YUV420P") format.
*
* @param dstBuf buffer that will receive the YUV planar image. Use
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
diff --git a/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java b/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java
index 711225b7..412e6a50 100644
--- a/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java
+++ b/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C)2011 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011, 2013 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -58,12 +58,12 @@ public interface TJCustomFilter {
* component plane to which coeffBuffer belongs
*
* @param componentID ID number of the component plane to which
- * coeffBufferbelongs (Y, Cb, and Cr have, respectively, ID's of
+ * coeffBuffer belongs (Y, U, and V have, respectively, ID's of
* 0, 1, and 2 in typical JPEG images.)
*
* @param transformID ID number of the transformed image to which
* coeffBuffer belongs. This is the same as the index of the
- * transform in the transforms array that was passed to {@link
+ * transform in the transforms array that was passed to {@link
* TJTransformer#transform TJTransformer.transform()}.
*
* @param transform a {@link TJTransform} instance that specifies the
diff --git a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
index 76f4f4fd..4530d41c 100644
--- a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
+++ b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C)2011-2012 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -151,7 +151,7 @@ public class TJDecompressor {
/**
- * Returns the width of the largest scaled down image that the TurboJPEG
+ * Returns the width of the largest scaled-down image that the TurboJPEG
* decompressor can generate without exceeding the desired image width and
* height.
*
@@ -165,7 +165,7 @@ public class TJDecompressor {
* image (in other words, the height will not be considered when determining
* the scaled image size.)
*
- * @return the width of the largest scaled down image that the TurboJPEG
+ * @return the width of the largest scaled-down image that the TurboJPEG
* decompressor can generate without exceeding the desired image width and
* height
*/
@@ -191,7 +191,7 @@ public class TJDecompressor {
}
/**
- * Returns the height of the largest scaled down image that the TurboJPEG
+ * Returns the height of the largest scaled-down image that the TurboJPEG
* decompressor can generate without exceeding the desired image width and
* height.
*
@@ -205,7 +205,7 @@ public class TJDecompressor {
* image (in other words, the height will not be considered when determining
* the scaled image size.)
*
- * @return the height of the largest scaled down image that the TurboJPEG
+ * @return the height of the largest scaled-down image that the TurboJPEG
* decompressor can generate without exceeding the desired image width and
* height
*/
@@ -251,13 +251,13 @@ public class TJDecompressor {
* @param y y offset (in pixels) of the region into which the JPEG image
* should be decompressed, relative to the start of dstBuf.
*
- * @param desiredWidth desired width (in pixels) of the decompressed image.
- * If the desired image dimensions are smaller than the dimensions of the
- * JPEG image being decompressed, then TurboJPEG will use 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 width of the JPEG image (in other words, the width will not be
- * considered when determining the scaled image size.)
+ * @param desiredWidth desired width (in pixels) of the decompressed image
+ * (or image region.) If the desired image dimensions are different than the
+ * dimensions of the JPEG image being decompressed, then TurboJPEG will use
+ * 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 width of the JPEG image (in other words, the
+ * width will not be considered when determining the scaled image size.)
*
* @param pitch bytes per line of the destination image. Normally, this
* should be set to scaledWidth * TJ.pixelSize(pixelFormat) if
@@ -270,13 +270,13 @@ public class TJDecompressor {
* 0 is the equivalent of setting it to scaledWidth *
* TJ.pixelSize(pixelFormat).
*
- * @param desiredHeight desired height (in pixels) of the decompressed image.
- * If the desired image dimensions are smaller than the dimensions of the
- * JPEG image being decompressed, then TurboJPEG will use 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.)
+ * @param desiredHeight desired height (in pixels) of the decompressed image
+ * (or image region.) If the desired image dimensions are different than the
+ * dimensions of the JPEG image being decompressed, then TurboJPEG will use
+ * 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.)
*
* @param pixelFormat pixel format of the decompressed image (one of
* {@link TJ TJ.PF_*})
@@ -296,29 +296,8 @@ public class TJDecompressor {
}
/**
- * Decompress the JPEG source image associated with this decompressor
- * instance and output a decompressed image to the given destination buffer.
- *
- * @param dstBuf see
- * {@link #decompress(byte[], int, int, int, int, int, int, int)}
- * for description
- *
- * @param desiredWidth see
- * {@link #decompress(byte[], int, int, int, int, int, int, int)}
- * for description
- *
- * @param pitch see
- * {@link #decompress(byte[], int, int, int, int, int, int, int)}
- * for description
- *
- * @param desiredHeight see
- * {@link #decompress(byte[], int, int, int, int, int, int, int)}
- * for description
- *
- * @param pixelFormat pixel format of the decompressed image (one of
- * {@link TJ TJ.PF_*})
- *
- * @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
+ * @deprecated Use
+ * {@link #decompress(byte[], int, int, int, int, int, int, int)} instead.
*/
public void decompress(byte[] dstBuf, int desiredWidth, int pitch,
int desiredHeight, int pixelFormat, int flags)
@@ -369,11 +348,11 @@ public class TJDecompressor {
* instance and output a YUV planar image to the given destination buffer.
* 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 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.
+ * 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.
*
* @param dstBuf buffer that will receive the YUV planar image. Use
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
@@ -431,13 +410,13 @@ public class TJDecompressor {
* @param y y offset (in pixels) of the region into which the JPEG image
* should be decompressed, relative to the start of dstBuf.
*
- * @param desiredWidth desired width (in pixels) of the decompressed image.
- * If the desired image dimensions are smaller than the dimensions of the
- * JPEG image being decompressed, then TurboJPEG will use 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 width of the JPEG image (in other words, the width will not be
- * considered when determining the scaled image size.)
+ * @param desiredWidth desired width (in pixels) of the decompressed image
+ * (or image region.) If the desired image dimensions are different than the
+ * dimensions of the JPEG image being decompressed, then TurboJPEG will use
+ * 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 width of the JPEG image (in other words, the
+ * width will not be considered when determining the scaled image size.)
*
* @param stride pixels per line of the destination image. Normally, this
* should be set to scaledWidth, but you can use this to, for
@@ -447,13 +426,13 @@ public class TJDecompressor {
* or by calling {@link #getScaledWidth}. Setting this parameter to
* 0 is the equivalent of setting it to scaledWidth.
*
- * @param desiredHeight desired height (in pixels) of the decompressed image.
- * If the desired image dimensions are smaller than the dimensions of the
- * JPEG image being decompressed, then TurboJPEG will use 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.)
+ * @param desiredHeight desired height (in pixels) of the decompressed image
+ * (or image region.) If the desired image dimensions are different than the
+ * dimensions of the JPEG image being decompressed, then TurboJPEG will use
+ * 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.)
*
* @param pixelFormat pixel format of the decompressed image (one of
* {@link TJ TJ.PF_*})
diff --git a/java/org/libjpegturbo/turbojpeg/TJTransform.java b/java/org/libjpegturbo/turbojpeg/TJTransform.java
index 399cf3a6..cfbc8963 100644
--- a/java/org/libjpegturbo/turbojpeg/TJTransform.java
+++ b/java/org/libjpegturbo/turbojpeg/TJTransform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C)2011 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011, 2013 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -144,10 +144,12 @@ public class TJTransform extends Rectangle {
* divisible by the MCU block height (see {@link TJ#getMCUHeight})
*
* @param w the width of the cropping region. Setting this to 0 is the
- * equivalent of setting it to the width of the source JPEG image - x.
+ * equivalent of setting it to (width of the source JPEG image -
+ * x).
*
* @param h the height of the cropping region. Setting this to 0 is the
- * equivalent of setting it to the height of the source JPEG image - y.
+ * equivalent of setting it to (height of the source JPEG image -
+ * y).
*
* @param op one of the transform operations (OP_*)
*
diff --git a/java/org/libjpegturbo/turbojpeg/TJTransformer.java b/java/org/libjpegturbo/turbojpeg/TJTransformer.java
index 6c074839..72c87cd3 100644
--- a/java/org/libjpegturbo/turbojpeg/TJTransformer.java
+++ b/java/org/libjpegturbo/turbojpeg/TJTransformer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C)2011 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011, 2013 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -73,17 +73,18 @@ public class TJTransformer extends TJDecompressor {
* JPEG image structure to another without altering the values of the
* coefficients. While this is typically faster than decompressing the
* image, transforming it, and re-compressing it, lossless transforms are not
- * free. Each lossless transform requires reading and Huffman decoding all
- * of the coefficients in the source image, regardless of the size of the
- * destination image. Thus, this method provides a means of generating
- * multiple transformed images from the same source or of applying multiple
- * transformations simultaneously, in order to eliminate the need to read the
- * source coefficients multiple times.
+ * free. Each lossless transform requires reading and performing Huffman
+ * decoding on all of the coefficients in the source image, regardless of the
+ * size of the destination image. Thus, this method provides a means of
+ * generating multiple transformed images from the same source or of applying
+ * multiple transformations simultaneously, in order to eliminate the need to
+ * read the source coefficients multiple times.
*
* @param dstBufs an array of image buffers. dstbufs[i] will
* 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 cropped width and height.
+ * maximum size for each buffer based on the transformed or cropped width and
+ * height.
*
* @param transforms an array of {@link TJTransform} instances, each of
* which specifies the transform parameters and/or cropping region for the