Java doc: TJ.pixelSize --> TJ.getPixelSize()

TJ.pixelSize isn't actually a thing.  Oops.
This commit is contained in:
DRC
2023-01-23 09:32:57 -06:00
parent af1b4c8df4
commit edbb7e6d43
4 changed files with 34 additions and 26 deletions

View File

@@ -487,13 +487,15 @@ public TJCompressor(byte[] srcImage,
the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the source image from which the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the source image from which
the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from
which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pitch</code> - bytes per row in the source image. Normally this should be which the JPEG or YUV image should be compressed/encoded</dd><dd><code>pitch</code> - bytes per row in the source image. Normally this should be
<code>width * TJ.pixelSize(pixelFormat)</code>, if the source image is <code>width *
unpadded. However, you can use this parameter to, for instance, specify </code><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a><code>(pixelFormat)</code>,
that the rows in the source image are padded to the nearest multiple of 4 if the source image is unpadded. However, you can use this parameter to,
bytes or to compress/encode a JPEG or YUV image from a region of a larger for instance, specify that the rows in the source image are padded to the
source image. You can also be clever and use this parameter to skip rows, nearest multiple of 4 bytes or to compress/encode a JPEG or YUV image from
etc. Setting this parameter to 0 is the equivalent of setting it to a region of a larger source image. You can also be clever and use this
<code>width * TJ.pixelSize(pixelFormat)</code>.</dd><dd><code>height</code> - height (in pixels) of the region in the source image from parameter to skip rows, etc. Setting this parameter to 0 is the
equivalent of setting it to <code>width *
</code><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a><code>(pixelFormat)</code>.</dd><dd><code>height</code> - height (in pixels) of the region in the source image from
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>

View File

@@ -837,17 +837,19 @@ public&nbsp;void&nbsp;setJPEGImage(byte[]&nbsp;jpegImage,
it to the width of the JPEG image. (In other words, the width will not be it to the width of the JPEG image. (In other words, the width will not be
considered when determining the scaled image size.) This parameter is considered when determining the scaled image size.) This parameter is
ignored if the source image is a YUV image.</dd><dd><code>pitch</code> - bytes per row in the destination image. Normally this should ignored if the source image is a YUV image.</dd><dd><code>pitch</code> - bytes per row in the destination image. Normally this should
be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>, if the be set to <code>scaledWidth *
destination image will be unpadded. However, you can use this to, for </code><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a><code>(pixelFormat)</code>,
instance, pad each row of the destination image to the nearest multiple of if the destination image will be unpadded. However, you can use this to,
4 bytes or to decompress/decode the source image into a region of a larger for instance, pad each row of the destination image to the nearest
image. NOTE: if the source image is a JPEG image, then multiple of 4 bytes or to decompress/decode the source image into a region
of a larger image. NOTE: if the source image is a JPEG image, then
<code>scaledWidth</code> can be determined by calling <code>scaledWidth</code> can be determined by calling
<code>scalingFactor.</code><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a><code>(jpegWidth)</code> <code>scalingFactor.</code><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)"><code>getScaled</code></a><code>(jpegWidth)</code>
or by calling <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)"><code>getScaledWidth(int, int)</code></a>. If the source image is a YUV or by calling <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)"><code>getScaledWidth(int, int)</code></a>. If the source image is a YUV
image, then <code>scaledWidth</code> is the width of the YUV image. image, then <code>scaledWidth</code> is the width of the YUV image.
Setting this parameter to 0 is the equivalent of setting it to Setting this parameter to 0 is the equivalent of setting it to
<code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.</dd><dd><code>desiredHeight</code> - If the source image is a JPEG image, then this <code>scaledWidth *
</code><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#getPixelSize(int)"><code>TJ.getPixelSize</code></a><code>(pixelFormat)</code>.</dd><dd><code>desiredHeight</code> - If the source image is a JPEG image, then this
specifies the desired height (in pixels) of the decompressed image (or specifies the desired height (in pixels) of the decompressed image (or
image region.) If the desired destination image dimensions are different image region.) If the desired destination image dimensions are different
than the source image dimensions, then TurboJPEG will use scaling in the than the source image dimensions, then TurboJPEG will use scaling in the

View File

@@ -127,13 +127,15 @@ public class TJCompressor implements Closeable {
* which the JPEG or YUV image should be compressed/encoded * which the JPEG or YUV image should be compressed/encoded
* *
* @param pitch bytes per row in the source image. Normally this should be * @param pitch bytes per row in the source image. Normally this should be
* <code>width * TJ.pixelSize(pixelFormat)</code>, if the source image is * <code>width *
* unpadded. However, you can use this parameter to, for instance, specify * </code>{@link TJ#getPixelSize TJ.getPixelSize}<code>(pixelFormat)</code>,
* that the rows in the source image are padded to the nearest multiple of 4 * if the source image is unpadded. However, you can use this parameter to,
* bytes or to compress/encode a JPEG or YUV image from a region of a larger * for instance, specify that the rows in the source image are padded to the
* source image. You can also be clever and use this parameter to skip rows, * nearest multiple of 4 bytes or to compress/encode a JPEG or YUV image from
* etc. Setting this parameter to 0 is the equivalent of setting it to * a region of a larger source image. You can also be clever and use this
* <code>width * TJ.pixelSize(pixelFormat)</code>. * parameter to skip rows, etc. Setting this parameter to 0 is the
* equivalent of setting it to <code>width *
* </code>{@link TJ#getPixelSize TJ.getPixelSize}<code>(pixelFormat)</code>.
* *
* @param height height (in pixels) of the region in the source image from * @param height height (in pixels) of the region in the source image from
* which the JPEG or YUV image should be compressed/encoded * which the JPEG or YUV image should be compressed/encoded

View File

@@ -361,17 +361,19 @@ public class TJDecompressor implements Closeable {
* ignored if the source image is a YUV image. * ignored if the source image is a YUV image.
* *
* @param pitch bytes per row in the destination image. Normally this should * @param pitch bytes per row in the destination image. Normally this should
* be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>, if the * be set to <code>scaledWidth *
* destination image will be unpadded. However, you can use this to, for * </code>{@link TJ#getPixelSize TJ.getPixelSize}<code>(pixelFormat)</code>,
* instance, pad each row of the destination image to the nearest multiple of * if the destination image will be unpadded. However, you can use this to,
* 4 bytes or to decompress/decode the source image into a region of a larger * for instance, pad each row of the destination image to the nearest
* image. NOTE: if the source image is a JPEG image, then * multiple of 4 bytes or to decompress/decode the source image into a region
* of a larger image. NOTE: if the source image is a JPEG image, then
* <code>scaledWidth</code> can be determined by calling * <code>scaledWidth</code> can be determined by calling
* <code>scalingFactor.</code>{@link TJScalingFactor#getScaled getScaled}<code>(jpegWidth)</code> * <code>scalingFactor.</code>{@link TJScalingFactor#getScaled getScaled}<code>(jpegWidth)</code>
* or by calling {@link #getScaledWidth}. If the source image is a YUV * or by calling {@link #getScaledWidth}. If the source image is a YUV
* image, then <code>scaledWidth</code> is the width of the YUV image. * image, then <code>scaledWidth</code> is the width of the YUV image.
* Setting this parameter to 0 is the equivalent of setting it to * Setting this parameter to 0 is the equivalent of setting it to
* <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>. * <code>scaledWidth *
* </code>{@link TJ#getPixelSize TJ.getPixelSize}<code>(pixelFormat)</code>.
* *
* @param desiredHeight If the source image is a JPEG image, then this * @param desiredHeight If the source image is a JPEG image, then this
* specifies the desired height (in pixels) of the decompressed image (or * specifies the desired height (in pixels) of the decompressed image (or