Minor TurboJPEG doc tweaks

- When transforming, the worst-case JPEG buffer size depends on the
  subsampling level used in the destination image, since a grayscale
  transform might have been applied.

- Parentheses Police
This commit is contained in:
DRC
2024-09-05 21:57:16 -04:00
parent 2e40a6875d
commit 6d9591703f
9 changed files with 12 additions and 12 deletions

View File

@@ -2065,13 +2065,13 @@ DLLEXPORT int tj3DecodeYUV8(tjhandle handle, const unsigned char *srcBuf,
* you, or
* -# pre-allocate the buffer to a "worst case" size determined by calling
* #tj3JPEGBufSize() with the transformed or cropped width and height and the
* level of subsampling used in the source image. Under normal circumstances,
* this should ensure that the buffer never has to be re-allocated. (Setting
* #TJPARAM_NOREALLOC guarantees that it won't be.) Note, however, that there
* are some rare cases (such as transforming images with a large amount of
* embedded Exif or ICC profile data) in which the transformed JPEG image will
* be larger than the worst-case size, and #TJPARAM_NOREALLOC cannot be used in
* those cases.
* level of subsampling used in the destination image. Under normal
* circumstances, this should ensure that the buffer never has to be
* re-allocated. (Setting #TJPARAM_NOREALLOC guarantees that it won't be.)
* Note, however, that there are some rare cases (such as transforming images
* with a large amount of embedded Exif or ICC profile data) in which the
* transformed JPEG image will be larger than the worst-case size, and
* #TJPARAM_NOREALLOC cannot be used in those cases.
* .
* If you choose option 1, then `dstSizes[i]` should be set to the size of your
* pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC,