diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-07 07:53:20 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-07 08:01:03 +0300 |
commit | 263371dc4e217ab38ee30fcb210e3c342c6c60ec (patch) | |
tree | 046c7c69b3b712721a96b514e52026917a4f11aa /source/blender/imbuf | |
parent | 243891104fce627ced86d39e83d4e2efc1fe58e2 (diff) |
Cleanup: spelling in comments, additional white space
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf_types.h | 3 | ||||
-rw-r--r-- | source/blender/imbuf/intern/IMB_filetype.h | 9 | ||||
-rw-r--r-- | source/blender/imbuf/intern/tiff.c | 22 |
3 files changed, 16 insertions, 18 deletions
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index a2459023e8e..1b32bef0a98 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -41,8 +41,7 @@ typedef struct DDSData { /** * \ingroup imbuf - * This is the abstraction of an image. ImBuf is the basic type used for all - * imbuf operations. + * This is the abstraction of an image. ImBuf is the basic type used for all imbuf operations. * * Also; add new variables to the end to save pain! */ diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index 6e505746643..9a0a6998fab 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -240,11 +240,10 @@ void imb_loadtiletiff( /** * Saves a TIFF file. * - * #ImBuf structures with 1, 3 or 4 bytes per pixel (GRAY, RGB, RGBA - * respectively) are accepted, and interpreted correctly. Note that the TIFF - * convention is to use pre-multiplied alpha, which can be achieved within - * Blender by setting "Premul" alpha handling. Other alpha conventions are - * not strictly correct, but are permitted anyhow. + * #ImBuf structures with 1, 3 or 4 bytes per pixel (GRAY, RGB, RGBA respectively) + * are accepted, and interpreted correctly. Note that the TIFF convention is to use + * pre-multiplied alpha, which can be achieved within Blender by setting `premul` alpha handling. + * Other alpha conventions are not strictly correct, but are permitted anyhow. * * \param ibuf: Image buffer. * \param filepath: Name of the TIFF file to create. diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 1372aa31713..2f13ef409e3 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -8,15 +8,15 @@ * Provides TIFF file loading and saving for Blender, via libtiff. * * The task of loading is complicated somewhat by the fact that Blender has - * already loaded the file into a memory buffer. libtiff is not well + * already loaded the file into a memory buffer. libtiff is not well * configured to handle files in memory, so a client wrapper is written to - * surround the memory and turn it into a virtual file. Currently, reading - * of TIFF files is done using libtiff's RGBAImage support. This is a + * surround the memory and turn it into a virtual file. Currently, reading + * of TIFF files is done using libtiff's RGBAImage support. This is a * high-level routine that loads all images as 32-bit RGBA, handling all the * required conversions between many different TIFF types internally. * * Saving supports RGB, RGBA and BW (gray-scale) images correctly, with - * 8 bits per channel in all cases. The "deflate" compression algorithm is + * 8 bits per channel in all cases. The "deflate" compression algorithm is * used to compress images. */ @@ -151,8 +151,8 @@ static tsize_t imb_tiff_ReadProc(thandle_t handle, tdata_t data, tsize_t n) /** * Writes data to an in-memory TIFF file. * - * NOTE: The current Blender implementation should not need this function. It - * is simply a stub. + * NOTE: The current Blender implementation should not need this function. + * It is simply a stub. */ static tsize_t imb_tiff_WriteProc(thandle_t handle, tdata_t data, tsize_t n) { @@ -176,7 +176,7 @@ static tsize_t imb_tiff_WriteProc(thandle_t handle, tdata_t data, tsize_t n) * error). * * \return Resulting offset location within the file, measured in bytes from - * the beginning of the file. (-1) indicates an error. + * the beginning of the file. (-1) indicates an error. */ static toff_t imb_tiff_SeekProc(thandle_t handle, toff_t ofs, int whence) { @@ -215,8 +215,8 @@ static toff_t imb_tiff_SeekProc(thandle_t handle, toff_t ofs, int whence) * Closes (virtually) an in-memory TIFF file. * * NOTE: All this function actually does is sets the data pointer within the - * TIFF file to NULL. That should trigger assertion errors if attempts - * are made to access the file after that point. However, no such + * TIFF file to NULL. That should trigger assertion errors if attempts + * are made to access the file after that point. However, no such * attempts should ever be made (in theory). * * \param handle: Handle of the TIFF file (pointer to #ImbTIFFMemFile). @@ -734,7 +734,7 @@ bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags) int x, y, from_i, to_i, i; int compress_mode = COMPRESSION_NONE; - /* check for a valid number of bytes per pixel. Like the PNG writer, + /* check for a valid number of bytes per pixel. Like the PNG writer, * the TIFF writer supports 1, 3 or 4 bytes per pixel, corresponding * to gray, RGB, RGBA respectively. */ samplesperpixel = (uint16_t)((ibuf->planes + 7) >> 3); @@ -838,7 +838,7 @@ bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags) TIFFSetField(image, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); } - /* copy pixel data. While copying, we flip the image vertically. */ + /* copy pixel data. While copying, we flip the image vertically. */ const int channels_in_float = ibuf->channels ? ibuf->channels : 4; for (x = 0; x < ibuf->x; x++) { for (y = 0; y < ibuf->y; y++) { |