Various doc tweaks

- "Optimized baseline entropy coding" = "Huffman table optimization"

  "Optimized baseline entropy coding" was meant to emphasize that the
  feature is only useful when generating baseline (single-scan lossy
  8-bit-per-sample Huffman-coded) JPEG images, because it is
  automatically enabled when generating Huffman-coded progressive
  (multi-scan), 12-bit-per-sample, and lossless JPEG images.  However,
  Huffman table optimization isn't actually an integral part of those
  non-baseline modes.  You can forego Huffman table optimization with
  12-bit data precision if you supply your own Huffman tables.  The spec
  doesn't require it with progressive or lossless mode, either, although
  our implementation does.  Furthermore, "baseline" describes more than
  just the type of entropy coding used.  It was incorrect to say that
  optimized "baseline" entropy coding is automatically enabled for
  Huffman-coded progressive, 12-bit-per-sample, and lossless JPEG
  images, since those are clearly not baseline images.

- "Progressive entropy coding" = "Progressive JPEG"

  "Progressive" describes more than just the type of entropy coding
  used.  (In fact, both Huffman-coded and arithmetic-coded images can be
  progressive.)

- Mention that TJPARAM_OPTIMIZE/TJ.PARAM_OPTIMIZE can be used with
  lossless transformation as well.

- General wordsmithing

- Formatting tweaks
This commit is contained in:
DRC
2024-08-14 09:21:54 -04:00
parent b4336c3afb
commit 0c23b0ad60
20 changed files with 1016 additions and 870 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C)2011-2015, 2018, 2022-2023 D. R. Commander.
* Copyright (C)2011-2015, 2018, 2022-2024 D. R. Commander.
* All Rights Reserved.
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
*
@@ -380,9 +380,9 @@ public class TJDecompressor implements Closeable {
* source image associated with this decompressor instance and output an
* 8-bit-per-sample packed-pixel grayscale, RGB, or CMYK image to the given
* destination buffer.
* <p>
* NOTE: The destination image is fully recoverable if this method throws a
* non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING} is
*
* <p>NOTE: The destination image is fully recoverable if this method throws
* a non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING} is
* set.)
*
* @param dstBuf buffer that will receive the packed-pixel
@@ -413,7 +413,7 @@ public class TJDecompressor implements Closeable {
* {@link TJ#getPixelSize TJ.getPixelSize}(pixelFormat)</code>.) However,
* you can also use this parameter to specify the row alignment/padding of
* the destination image, to skip rows, or to decompress/decode into a
* specific region of a larger image. NOTE: if the source image is a lossy
* specific region of a larger image. NOTE: If the source image is a lossy
* JPEG image, then <code>destinationWidth</code> is either the scaled JPEG
* width (see {@link #setScalingFactor setScalingFactor()},
* {@link TJScalingFactor#getScaled TJScalingFactor.getScaled()}, and
@@ -515,9 +515,9 @@ public class TJDecompressor implements Closeable {
* Decompress the 12-bit-per-sample JPEG source image associated with this
* decompressor instance and output a 12-bit-per-sample packed-pixel
* grayscale, RGB, or CMYK image to the given destination buffer.
* <p>
* NOTE: The destination image is fully recoverable if this method throws a
* non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING} is
*
* <p>NOTE: The destination image is fully recoverable if this method throws
* a non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING} is
* set.)
*
* @param dstBuf buffer that will receive the packed-pixel
@@ -549,7 +549,7 @@ public class TJDecompressor implements Closeable {
* {@link TJ#getPixelSize TJ.getPixelSize}(pixelFormat)</code>.) However,
* you can also use this parameter to specify the row alignment/padding of
* the destination image, to skip rows, or to decompress into a specific
* region of a larger image. NOTE: if the source image is a lossy JPEG
* region of a larger image. NOTE: If the source image is a lossy JPEG
* image, then <code>destinationWidth</code> is either the scaled JPEG width
* (see {@link #setScalingFactor setScalingFactor()},
* {@link TJScalingFactor#getScaled TJScalingFactor.getScaled()}, and
@@ -603,9 +603,9 @@ public class TJDecompressor implements Closeable {
* with this decompressor instance and output a 16-bit-per-sample
* packed-pixel grayscale, RGB, or CMYK image to the given destination
* buffer.
* <p>
* NOTE: The destination image is fully recoverable if this method throws a
* non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING} is
*
* <p>NOTE: The destination image is fully recoverable if this method throws
* a non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING} is
* set.)
*
* @param dstBuf buffer that will receive the packed-pixel
@@ -678,9 +678,9 @@ public class TJDecompressor implements Closeable {
* decompression but leaves out the color conversion step, so a planar YUV
* image is generated instead of a packed-pixel image. This method cannot be
* used to decompress JPEG source images with the CMYK or YCCK colorspace.
* <p>
* NOTE: The planar YUV destination image is fully recoverable if this method
* throws a non-fatal {@link TJException} (unless
*
* <p>NOTE: The planar YUV destination image is fully recoverable if this
* method throws a non-fatal {@link TJException} (unless
* {@link TJ#PARAM_STOPONWARNING} is set.)
*
* @param dstImage {@link YUVImage} instance that will receive the planar YUV
@@ -836,9 +836,9 @@ public class TJDecompressor implements Closeable {
* source image associated with this decompressor instance and output an
* 8-bit-per-sample packed-pixel grayscale, RGB, or CMYK image to the given
* destination buffer.
* <p>
* NOTE: The destination image is fully recoverable if this method throws a
* non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING}
*
* <p>NOTE: The destination image is fully recoverable if this method throws
* a non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING}
* is set.)
*
* @param dstBuf buffer that will receive the packed-pixel
@@ -866,7 +866,7 @@ public class TJDecompressor implements Closeable {
* should be set to <code>destinationWidth</code>. (Setting this parameter
* to 0 is the equivalent of setting it to <code>destinationWidth</code>.)
* However, you can also use this parameter to skip rows or to
* decompress/decode into a specific region of a larger image. NOTE: if the
* decompress/decode into a specific region of a larger image. NOTE: If the
* source image is a lossy JPEG image, then <code>destinationWidth</code> is
* either the scaled JPEG width (see {@link #setScalingFactor
* setScalingFactor()}, {@link TJScalingFactor#getScaled
@@ -921,9 +921,9 @@ public class TJDecompressor implements Closeable {
* source image associated with this decompressor instance and output an
* 8-bit-per-sample packed-pixel decompressed/decoded image to the given
* <code>BufferedImage</code> instance.
* <p>
* NOTE: The destination image is fully recoverable if this method throws a
* non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING}
*
* <p>NOTE: The destination image is fully recoverable if this method throws
* a non-fatal {@link TJException} (unless {@link TJ#PARAM_STOPONWARNING}
* is set.)
*
* @param dstImage a <code>BufferedImage</code> instance that will receive