diff --git a/doc/html/group___turbo_j_p_e_g.html b/doc/html/group___turbo_j_p_e_g.html
index eea39969..75321f91 100644
--- a/doc/html/group___turbo_j_p_e_g.html
+++ b/doc/html/group___turbo_j_p_e_g.html
@@ -3173,7 +3173,7 @@ If you choose option 1, then *jpegSize should be set to the size of
dstBufs[i] will receive a JPEG image that has been transformed using the parameters in transforms[i]. TurboJPEG has the ability to reallocate the JPEG destination buffer to accommodate the size of the transformed JPEG image. Thus, you can choose to:dstBufs[i] to NULL to tell TurboJPEG to allocate the buffer for you, ordstSizes[i] should be set to the size of your pre-allocated buffer. In any case, unless you have set TJPARAM_NOREALLOC, you should always check dstBufs[i] upon return from this function, as it may have changed.dstBufs[i] points to a pre-allocated buffer, then dstSizes[i] should be set to the size of the buffer. Upon return, dstSizes[i] will contain the size of the transformed JPEG image (in bytes.)TJ.PARAM_SUBSAMP.) The
cropping region should be specified relative to the scaled image
dimensions. Unless croppingRegion is TJ.UNCROPPED,
- the JPEG header must be read (see setSourceImage(byte[], int)
+ the JPEG header must be read (see setSourceImage(byte[], int))
prior to calling this method.
TJExceptionTJ.bufSize() to determine the maximum size for each
buffer based on the transformed or cropped width and height and the level
- of subsampling used in the source image.
+ of subsampling used in the destination image.
transforms - an array of TJTransform instances, each of
which specifies the transform parameters and/or cropping region for the
corresponding transformed JPEG imagecroppingRegion is {@link TJ#UNCROPPED},
- * the JPEG header must be read (see {@link #setSourceImage(byte[], int)}
+ * the JPEG header must be read (see {@link #setSourceImage(byte[], int)})
* prior to calling this method.
*/
@SuppressWarnings("checkstyle:HiddenField")
diff --git a/java/org/libjpegturbo/turbojpeg/TJTransformer.java b/java/org/libjpegturbo/turbojpeg/TJTransformer.java
index 4d46b5a1..84bf3dfc 100644
--- a/java/org/libjpegturbo/turbojpeg/TJTransformer.java
+++ b/java/org/libjpegturbo/turbojpeg/TJTransformer.java
@@ -89,7 +89,7 @@ public class TJTransformer extends TJDecompressor {
* transformed using the parameters in transforms[i]. Use
* {@link TJ#bufSize TJ.bufSize()} to determine the maximum size for each
* buffer based on the transformed or cropped width and height and the level
- * of subsampling used in the source image.
+ * of subsampling used in the destination image.
*
* @param transforms an array of {@link TJTransform} instances, each of
* which specifies the transform parameters and/or cropping region for the
diff --git a/turbojpeg.h b/turbojpeg.h
index e9de751f..934e4b05 100644
--- a/turbojpeg.h
+++ b/turbojpeg.h
@@ -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,