From 7a8c53e4bd7a0dbe442f4643f7e92f5355f69a68 Mon Sep 17 00:00:00 2001 From: DRC Date: Fri, 19 Jun 2015 16:07:14 +0000 Subject: [PATCH] Clarify that the TurboJPEG API functions/methods do not modify the source buffer. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1567 632fc199-4ca6-4c93-a231-07263d6284db --- doc/html/group___turbo_j_p_e_g.html | 24 ++++++------- .../libjpegturbo/turbojpeg/TJCompressor.html | 7 ++-- .../turbojpeg/TJDecompressor.html | 10 +++--- .../libjpegturbo/turbojpeg/TJTransformer.html | 4 +-- .../libjpegturbo/turbojpeg/TJCompressor.java | 9 ++--- .../turbojpeg/TJDecompressor.java | 12 +++---- .../libjpegturbo/turbojpeg/TJTransformer.java | 6 ++-- turbojpeg.h | 34 +++++++++++-------- 8 files changed, 56 insertions(+), 50 deletions(-) diff --git a/doc/html/group___turbo_j_p_e_g.html b/doc/html/group___turbo_j_p_e_g.html index 7188c7d6..233fe6c0 100644 --- a/doc/html/group___turbo_j_p_e_g.html +++ b/doc/html/group___turbo_j_p_e_g.html @@ -1000,7 +1000,7 @@ Variables
Parameters
- + @@ -1098,7 +1098,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG compressor or transformer instance
srcBufpointer to an image buffer containing RGB, grayscale, or CMYK pixels to be compressed
srcBufpointer to an image buffer containing RGB, grayscale, or CMYK pixels to be compressed. This buffer is not modified.
widthwidth (in pixels) of the source image
pitchbytes per line in the source image. Normally, this should be width * tjPixelSize[pixelFormat] if the image is unpadded, or TJPAD(width * tjPixelSize[pixelFormat]) if each line of the image is padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. You can also be clever and use this parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to width * tjPixelSize[pixelFormat].
heightheight (in pixels) of the source image
- + @@ -1195,7 +1195,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG compressor or transformer instance
srcBufpointer to an image buffer containing a YUV planar image to be compressed. The size of this buffer should match the value returned by tjBufSizeYUV2() for the given image width, height, padding, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be stored sequentially in the source buffer (refer to YUV Image Format Notes.)
srcBufpointer to an image buffer containing a YUV planar image to be compressed. The size of this buffer should match the value returned by tjBufSizeYUV2() for the given image width, height, padding, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be stored sequentially in the source buffer (refer to YUV Image Format Notes.) This buffer is not modified.
widthwidth (in pixels) of the source image. If the width is not an even multiple of the MCU block width (see tjMCUWidth), then an intermediate buffer copy will be performed within TurboJPEG.
padthe line padding used in the source image. For instance, if each line in each plane of the YUV image is padded to the nearest multiple of 4 bytes, then pad should be set to 4.
heightheight (in pixels) of the source image. If the height is not an even multiple of the MCU block height (see tjMCUHeight), then an intermediate buffer copy will be performed within TurboJPEG.
- + @@ -1293,7 +1293,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG compressor or transformer instance
srcPlanesan array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if compressing a grayscale image) that contain a YUV image to be compressed. These planes can be contiguous or non-contiguous in memory. The size of each plane should match the value returned by tjPlaneSizeYUV() for the given image width, height, strides, and level of chrominance subsampling. Refer to YUV Image Format Notes for more details.
srcPlanesan array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if compressing a grayscale image) that contain a YUV image to be compressed. These planes can be contiguous or non-contiguous in memory. The size of each plane should match the value returned by tjPlaneSizeYUV() for the given image width, height, strides, and level of chrominance subsampling. Refer to YUV Image Format Notes for more details. These image planes are not modified.
widthwidth (in pixels) of the source image. If the width is not an even multiple of the MCU block width (see tjMCUWidth), then an intermediate buffer copy will be performed within TurboJPEG.
stridesan array of integers, each specifying the number of bytes per line in the corresponding plane of the YUV source image. Setting the stride for any plane to 0 is the same as setting it to the plane width (see YUV Image Format Notes.) If strides is NULL, then the strides for all planes will be set to their respective plane widths. You can adjust the strides in order to specify an arbitrary amount of line padding in each plane or to create a JPEG image from a subregion of a larger YUV planar image.
heightheight (in pixels) of the source image. If the height is not an even multiple of the MCU block height (see tjMCUHeight), then an intermediate buffer copy will be performed within TurboJPEG.
- + @@ -1386,7 +1386,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG decompressor or transformer instance
srcBufpointer to an image buffer containing a YUV planar image to be decoded. The size of this buffer should match the value returned by tjBufSizeYUV2() for the given image width, height, padding, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be stored sequentially in the source buffer (refer to YUV Image Format Notes.)
srcBufpointer to an image buffer containing a YUV planar image to be decoded. The size of this buffer should match the value returned by tjBufSizeYUV2() for the given image width, height, padding, and level of chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be stored sequentially in the source buffer (refer to YUV Image Format Notes.) This buffer is not modified.
padUse this parameter to specify that the width of each line in each plane of the YUV source image is padded to the nearest multiple of this number of bytes (must be a power of 2.)
subsampthe level of chrominance subsampling used in the YUV source image (see Chrominance subsampling options.)
dstBufpointer to an image buffer that will receive the decoded image. This buffer should normally be pitch * height bytes in size, but the dstBuf pointer can also be used to decode into a specific region of a larger buffer.
- + @@ -1472,7 +1472,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG decompressor or transformer instance
srcPlanesan array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if decoding a grayscale image) that contain a YUV image to be decoded. These planes can be contiguous or non-contiguous in memory. The size of each plane should match the value returned by tjPlaneSizeYUV() for the given image width, height, strides, and level of chrominance subsampling. Refer to YUV Image Format Notes for more details.
srcPlanesan array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if decoding a grayscale image) that contain a YUV image to be decoded. These planes can be contiguous or non-contiguous in memory. The size of each plane should match the value returned by tjPlaneSizeYUV() for the given image width, height, strides, and level of chrominance subsampling. Refer to YUV Image Format Notes for more details. These image planes are not modified.
stridesan array of integers, each specifying the number of bytes per line in the corresponding plane of the YUV source image. Setting the stride for any plane to 0 is the same as setting it to the plane width (see YUV Image Format Notes.) If strides is NULL, then the strides for all planes will be set to their respective plane widths. You can adjust the strides in order to specify an arbitrary amount of line padding in each plane or to decode a subregion of a larger YUV planar image.
subsampthe level of chrominance subsampling used in the YUV source image (see Chrominance subsampling options.)
dstBufpointer to an image buffer that will receive the decoded image. This buffer should normally be pitch * height bytes in size, but the dstBuf pointer can also be used to decode into a specific region of a larger buffer.
- + @@ -1545,7 +1545,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG decompressor or transformer instance
jpegBufpointer to a buffer containing the JPEG image to decompress
jpegBufpointer to a buffer containing the JPEG image to decompress. This buffer is not modified.
jpegSizesize of the JPEG image (in bytes)
dstBufpointer to an image buffer that will receive the decompressed image. This buffer should normally be pitch * scaledHeight bytes in size, where scaledHeight can be determined by calling TJSCALED() with the JPEG image height and one of the scaling factors returned by tjGetScalingFactors(). The dstBuf pointer may also be used to decompress into a specific region of a larger buffer.
widthdesired width (in pixels) of the destination image. If this is different than the width 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 width. If width is set to 0, then only the height will be considered when determining the scaled image size.
- + @@ -1623,7 +1623,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG decompressor or transformer instance
jpegBufpointer to a buffer containing a JPEG image
jpegBufpointer to a buffer containing a JPEG image. This buffer is not modified.
jpegSizesize of the JPEG image (in bytes)
widthpointer to an integer variable that will receive the width (in pixels) of the JPEG image
heightpointer to an integer variable that will receive the height (in pixels) of the JPEG image
- + @@ -1702,7 +1702,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG decompressor or transformer instance
jpegBufpointer to a buffer containing the JPEG image to decompress
jpegBufpointer to a buffer containing the JPEG image to decompress. This buffer is not modified.
jpegSizesize of the JPEG image (in bytes)
dstBufpointer to an image buffer that will receive the YUV image. Use tjBufSizeYUV2() to determine the appropriate size for this buffer based on the image width, height, padding, and level of subsampling. The Y, U (Cb), and V (Cr) image planes will be stored sequentially in the buffer (refer to YUV Image Format Notes.)
widthdesired width (in pixels) of the YUV image. If this is different than the width 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 width. If width is set to 0, then only the height will be considered when determining the scaled image size. If the scaled width is not an even multiple of the MCU block width (see tjMCUWidth), then an intermediate buffer copy will be performed within TurboJPEG.
- + @@ -1818,7 +1818,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG decompressor or transformer instance
jpegBufpointer to a buffer containing the JPEG image to decompress
jpegBufpointer to a buffer containing the JPEG image to decompress. This buffer is not modified.
jpegSizesize of the JPEG image (in bytes)
dstPlanesan array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if decompressing a grayscale image) that will receive the YUV image. These planes can be contiguous or non-contiguous in memory. Use tjPlaneSizeYUV() to determine the appropriate size for each plane based on the scaled image width, scaled image height, strides, and level of chrominance subsampling. Refer to YUV Image Format Notes for more details.
widthdesired width (in pixels) of the YUV image. If this is different than the width 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 width. If width is set to 0, then only the height will be considered when determining the scaled image size. If the scaled width is not an even multiple of the MCU block width (see tjMCUWidth), then an intermediate buffer copy will be performed within TurboJPEG.
- + @@ -1911,7 +1911,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG compressor or transformer instance
srcBufpointer to an image buffer containing RGB or grayscale pixels to be encoded
srcBufpointer to an image buffer containing RGB or grayscale pixels to be encoded. This buffer is not modified.
widthwidth (in pixels) of the source image
pitchbytes per line in the source image. Normally, this should be width * tjPixelSize[pixelFormat] if the image is unpadded, or TJPAD(width * tjPixelSize[pixelFormat]) if each line of the image is padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. You can also be clever and use this parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to width * tjPixelSize[pixelFormat].
heightheight (in pixels) of the source image
- + @@ -2264,7 +2264,7 @@ If you choose option 1, *jpegSize should be set to the size of your
Parameters
handlea handle to a TurboJPEG compressor or transformer instance
srcBufpointer to an image buffer containing RGB or grayscale pixels to be encoded
srcBufpointer to an image buffer containing RGB or grayscale pixels to be encoded. This buffer is not modified.
widthwidth (in pixels) of the source image
pitchbytes per line in the source image. Normally, this should be width * tjPixelSize[pixelFormat] if the image is unpadded, or TJPAD(width * tjPixelSize[pixelFormat]) if each line of the image is padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. You can also be clever and use this parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to width * tjPixelSize[pixelFormat].
heightheight (in pixels) of the source image
- +
handlea handle to a TurboJPEG transformer instance
jpegBufpointer to a buffer containing the JPEG source image to transform
jpegBufpointer to a buffer containing the JPEG source image to transform. This buffer is not modified.
jpegSizesize of the JPEG source image (in bytes)
nthe number of transformed JPEG images to generate
dstBufspointer to an array of n image buffers. 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 buffer to accommodate the size of the JPEG image. Thus, you can choose to:
    diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html index 93872531..b7fa3db4 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html @@ -474,7 +474,7 @@ public TJCompressor(byte[] srcImage,
    Associate an uncompressed RGB, grayscale, or CMYK source image with this compressor instance.
    Parameters:
    srcImage - image buffer containing RGB, grayscale, or CMYK pixels to - be compressed or encoded
    x - x offset (in pixels) of the region in the source image from which + be compressed or encoded. This buffer is not modified.
    x - x offset (in pixels) of the region in the source image from which the JPEG or YUV image should be compressed/encoded
    y - y offset (in pixels) of the region in the source image from which the JPEG or YUV image should be compressed/encoded
    width - width (in pixels) of the region in the source image from which the JPEG or YUV image should be compressed/encoded
    pitch - bytes per line of the source image. Normally, this should be @@ -525,7 +525,7 @@ public void setSourceImage(byte[] srcImage,
    Associate an uncompressed RGB or grayscale source image with this compressor instance.
    Parameters:
    srcImage - a BufferedImage instance containing RGB or - grayscale pixels to be compressed or encoded
    x - x offset (in pixels) of the region in the source image from which + grayscale pixels to be compressed or encoded. This image is not modified.
    x - x offset (in pixels) of the region in the source image from which the JPEG or YUV image should be compressed/encoded
    y - y offset (in pixels) of the region in the source image from which the JPEG or YUV image should be compressed/encoded
    width - width (in pixels) of the region in the source image from which the JPEG or YUV image should be compressed/encoded (0 = use the @@ -546,7 +546,8 @@ public void setSourceImage(byte[] srcImage, throws java.lang.Exception
    Associate an uncompressed YUV planar source image with this compressor instance.
    -
    Parameters:
    srcImage - YUV planar image to be compressed
    +
    Parameters:
    srcImage - YUV planar image to be compressed. This image is not + modified.
    Throws:
    java.lang.Exception
    diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html index faf9b6e9..dc1dcbdc 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html @@ -546,7 +546,7 @@ extends java.lang.Object
    Create a TurboJPEG decompressor instance and associate the JPEG source image stored in jpegImage with the newly created instance.
    Parameters:
    jpegImage - JPEG image buffer (size of the JPEG image is assumed to - be the length of the array)
    + be the length of the array.) This buffer is not modified.
    Throws:
    java.lang.Exception
    @@ -563,7 +563,7 @@ extends java.lang.Object
    Create a TurboJPEG decompressor instance and associate the JPEG source image of length imageSize bytes stored in jpegImage with the newly created instance.
    -
    Parameters:
    jpegImage - JPEG image buffer
    imageSize - size of the JPEG image (in bytes)
    +
    Parameters:
    jpegImage - JPEG image buffer. This buffer is not modified.
    imageSize - size of the JPEG image (in bytes)
    Throws:
    java.lang.Exception
    @@ -580,7 +580,7 @@ extends java.lang.Object source image stored in yuvImage with the newly created instance.
    Parameters:
    yuvImage - YUVImage instance containing a YUV planar - image to be decoded
    + image to be decoded. This image is not modified.
    Throws:
    java.lang.Exception
    @@ -605,7 +605,7 @@ extends java.lang.Object
    Associate the JPEG image of length imageSize bytes stored in jpegImage with this decompressor instance. This image will be used as the source image for subsequent decompress operations.
    -
    Parameters:
    jpegImage - JPEG image buffer
    imageSize - size of the JPEG image (in bytes)
    +
    Parameters:
    jpegImage - JPEG image buffer. This buffer is not modified.
    imageSize - size of the JPEG image (in bytes)
    Throws:
    java.lang.Exception
    @@ -637,7 +637,7 @@ public void setJPEGImage(byte[] jpegImage, instance. Subsequent decompress operations will decode this image into an RGB or grayscale destination image.
    Parameters:
    srcImage - YUVImage instance containing a YUV planar image to - be decoded
    + be decoded. This image is not modified.
    Throws:
    java.lang.Exception
    diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html index 333f3eb3..32c92bb8 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html @@ -245,7 +245,7 @@ extends Create a TurboJPEG lossless transformer instance and associate the JPEG image stored in jpegImage with the newly created instance.
    Parameters:
    jpegImage - JPEG image buffer (size of the JPEG image is assumed to - be the length of the array)
    + be the length of the array.) This buffer is not modified.
    Throws:
    java.lang.Exception
    @@ -262,7 +262,7 @@ extends
    Create a TurboJPEG lossless transformer instance and associate the JPEG image of length imageSize bytes stored in jpegImage with the newly created instance. -
    Parameters:
    jpegImage - JPEG image buffer
    imageSize - size of the JPEG image (in bytes)
    +
    Parameters:
    jpegImage - JPEG image buffer. This buffer is not modified.
    imageSize - size of the JPEG image (in bytes)
    Throws:
    java.lang.Exception
    diff --git a/java/org/libjpegturbo/turbojpeg/TJCompressor.java b/java/org/libjpegturbo/turbojpeg/TJCompressor.java index a780d15a..6ec581a5 100644 --- a/java/org/libjpegturbo/turbojpeg/TJCompressor.java +++ b/java/org/libjpegturbo/turbojpeg/TJCompressor.java @@ -1,5 +1,5 @@ /* - * Copyright (C)2011-2014 D. R. Commander. All Rights Reserved. + * Copyright (C)2011-2015 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: @@ -111,7 +111,7 @@ public class TJCompressor { * compressor instance. * * @param srcImage image buffer containing RGB, grayscale, or CMYK pixels to - * be compressed or encoded + * be compressed or encoded. This buffer is not modified. * * @param x x offset (in pixels) of the region in the source image from which * the JPEG or YUV image should be compressed/encoded @@ -174,7 +174,7 @@ public class TJCompressor { * compressor instance. * * @param srcImage a BufferedImage instance containing RGB or - * grayscale pixels to be compressed or encoded + * grayscale pixels to be compressed or encoded. This image is not modified. * * @param x x offset (in pixels) of the region in the source image from which * the JPEG or YUV image should be compressed/encoded @@ -259,7 +259,8 @@ public class TJCompressor { * Associate an uncompressed YUV planar source image with this compressor * instance. * - * @param srcImage YUV planar image to be compressed + * @param srcImage YUV planar image to be compressed. This image is not + * modified. */ public void setSourceImage(YUVImage srcImage) throws Exception { if (handle == 0) init(); diff --git a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java index 876ff8f0..7ec557f9 100644 --- a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java +++ b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java @@ -1,5 +1,5 @@ /* - * Copyright (C)2011-2014 D. R. Commander. All Rights Reserved. + * Copyright (C)2011-2015 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: @@ -51,7 +51,7 @@ public class TJDecompressor { * image stored in jpegImage with the newly created instance. * * @param jpegImage JPEG image buffer (size of the JPEG image is assumed to - * be the length of the array) + * be the length of the array.) This buffer is not modified. */ public TJDecompressor(byte[] jpegImage) throws Exception { init(); @@ -63,7 +63,7 @@ public class TJDecompressor { * image of length imageSize bytes stored in * jpegImage with the newly created instance. * - * @param jpegImage JPEG image buffer + * @param jpegImage JPEG image buffer. This buffer is not modified. * * @param imageSize size of the JPEG image (in bytes) */ @@ -78,7 +78,7 @@ public class TJDecompressor { * instance. * * @param yuvImage {@link YUVImage} instance containing a YUV planar - * image to be decoded + * image to be decoded. This image is not modified. */ public TJDecompressor(YUVImage yuvImage) throws Exception { init(); @@ -90,7 +90,7 @@ public class TJDecompressor { * jpegImage with this decompressor instance. This image will * be used as the source image for subsequent decompress operations. * - * @param jpegImage JPEG image buffer + * @param jpegImage JPEG image buffer. This buffer is not modified. * * @param imageSize size of the JPEG image (in bytes) */ @@ -118,7 +118,7 @@ public class TJDecompressor { * RGB or grayscale destination image. * * @param srcImage {@link YUVImage} instance containing a YUV planar image to - * be decoded + * be decoded. This image is not modified. */ public void setSourceImage(YUVImage srcImage) throws Exception { if (srcImage == null) diff --git a/java/org/libjpegturbo/turbojpeg/TJTransformer.java b/java/org/libjpegturbo/turbojpeg/TJTransformer.java index cf773fae..2e173445 100644 --- a/java/org/libjpegturbo/turbojpeg/TJTransformer.java +++ b/java/org/libjpegturbo/turbojpeg/TJTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright (C)2011, 2013-2014 D. R. Commander. All Rights Reserved. + * Copyright (C)2011, 2013-2015 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: @@ -45,7 +45,7 @@ public class TJTransformer extends TJDecompressor { * image stored in jpegImage with the newly created instance. * * @param jpegImage JPEG image buffer (size of the JPEG image is assumed to - * be the length of the array) + * be the length of the array.) This buffer is not modified. */ public TJTransformer(byte[] jpegImage) throws Exception { init(); @@ -57,7 +57,7 @@ public class TJTransformer extends TJDecompressor { * image of length imageSize bytes stored in * jpegImage with the newly created instance. * - * @param jpegImage JPEG image buffer + * @param jpegImage JPEG image buffer. This buffer is not modified. * * @param imageSize size of the JPEG image (in bytes) */ diff --git a/turbojpeg.h b/turbojpeg.h index 1ada65a2..1f394fa2 100644 --- a/turbojpeg.h +++ b/turbojpeg.h @@ -1,5 +1,5 @@ /* - * Copyright (C)2009-2014 D. R. Commander. All Rights Reserved. + * Copyright (C)2009-2015 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: @@ -619,7 +619,7 @@ DLLEXPORT tjhandle DLLCALL tjInitCompress(void); * @param handle a handle to a TurboJPEG compressor or transformer instance * * @param srcBuf pointer to an image buffer containing RGB, grayscale, or - * CMYK pixels to be compressed + * CMYK pixels to be compressed. This buffer is not modified. * * @param width width (in pixels) of the source image * @@ -687,7 +687,7 @@ DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, unsigned char *srcBuf, * #tjBufSizeYUV2() for the given image width, height, padding, and level of * chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be * stored sequentially in the source buffer (refer to @ref YUVnotes - * "YUV Image Format Notes".) + * "YUV Image Format Notes".) This buffer is not modified. * * @param width width (in pixels) of the source image. If the width is not an * even multiple of the MCU block width (see #tjMCUWidth), then an intermediate @@ -752,7 +752,7 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf, * memory. The size of each plane should match the value returned by * #tjPlaneSizeYUV() for the given image width, height, strides, and level of * chrominance subsampling. Refer to @ref YUVnotes "YUV Image Format Notes" - * for more details. + * for more details. These image planes are not modified. * * @param width width (in pixels) of the source image. If the width is not an * even multiple of the MCU block width (see #tjMCUWidth), then an intermediate @@ -762,7 +762,7 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf, * line in the corresponding plane of the YUV source image. Setting the stride * for any plane to 0 is the same as setting it to the plane width (see * @ref YUVnotes "YUV Image Format Notes".) If strides is NULL, then - * the strides for all planes will be set to their respective plane widths. + * the strides for all planes will be set to their respective plane widths. * You can adjust the strides in order to specify an arbitrary amount of line * padding in each plane or to create a JPEG image from a subregion of a larger * YUV planar image. @@ -921,12 +921,12 @@ DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp); * Encode an RGB or grayscale image into a YUV planar image. This function * uses the accelerated color conversion routines in the underlying * codec but does not execute any of the other steps in the JPEG compression - * process. + * process. * * @param handle a handle to a TurboJPEG compressor or transformer instance * * @param srcBuf pointer to an image buffer containing RGB or grayscale pixels - * to be encoded + * to be encoded. This buffer is not modified. * * @param width width (in pixels) of the source image * @@ -979,7 +979,7 @@ DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle, * @param handle a handle to a TurboJPEG compressor or transformer instance * * @param srcBuf pointer to an image buffer containing RGB or grayscale pixels - * to be encoded + * to be encoded. This buffer is not modified. * * @param width width (in pixels) of the source image * @@ -1042,7 +1042,8 @@ DLLEXPORT tjhandle DLLCALL tjInitDecompress(void); * * @param handle a handle to a TurboJPEG decompressor or transformer instance * - * @param jpegBuf pointer to a buffer containing a JPEG image + * @param jpegBuf pointer to a buffer containing a JPEG image. This buffer is + * not modified. * * @param jpegSize size of the JPEG image (in bytes) * @@ -1085,7 +1086,8 @@ DLLEXPORT tjscalingfactor* DLLCALL tjGetScalingFactors(int *numscalingfactors); * * @param handle a handle to a TurboJPEG decompressor or transformer instance * - * @param jpegBuf pointer to a buffer containing the JPEG image to decompress + * @param jpegBuf pointer to a buffer containing the JPEG image to decompress. + * This buffer is not modified. * * @param jpegSize size of the JPEG image (in bytes) * @@ -1141,7 +1143,8 @@ DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle, * * @param handle a handle to a TurboJPEG decompressor or transformer instance * - * @param jpegBuf pointer to a buffer containing the JPEG image to decompress + * @param jpegBuf pointer to a buffer containing the JPEG image to decompress. + * This buffer is not modified. * * @param jpegSize size of the JPEG image (in bytes) * @@ -1191,7 +1194,8 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle, * * @param handle a handle to a TurboJPEG decompressor or transformer instance * - * @param jpegBuf pointer to a buffer containing the JPEG image to decompress + * @param jpegBuf pointer to a buffer containing the JPEG image to decompress. + * This buffer is not modified. * * @param jpegSize size of the JPEG image (in bytes) * @@ -1253,7 +1257,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle, * #tjBufSizeYUV2() for the given image width, height, padding, and level of * chrominance subsampling. The Y, U (Cb), and V (Cr) image planes should be * stored sequentially in the source buffer (refer to @ref YUVnotes - * "YUV Image Format Notes".) + * "YUV Image Format Notes".) This buffer is not modified. * * @param pad Use this parameter to specify that the width of each line in each * plane of the YUV source image is padded to the nearest multiple of this @@ -1306,7 +1310,7 @@ DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, unsigned char *srcBuf, * The size of each plane should match the value returned by #tjPlaneSizeYUV() * for the given image width, height, strides, and level of chrominance * subsampling. Refer to @ref YUVnotes "YUV Image Format Notes" for more - * details. + * details. These image planes are not modified. * * @param strides an array of integers, each specifying the number of bytes per * line in the corresponding plane of the YUV source image. Setting the stride @@ -1374,7 +1378,7 @@ DLLEXPORT tjhandle DLLCALL tjInitTransform(void); * @param handle a handle to a TurboJPEG transformer instance * * @param jpegBuf pointer to a buffer containing the JPEG source image to - * transform + * transform. This buffer is not modified. * * @param jpegSize size of the JPEG source image (in bytes) *