# Changes in TIFF v3.8.1

References
Current Version | v3.8.1 (tag Release-v3-8-1)
Previous Version | v3.8.0
Master Download Site | https://download.osgeo.org/libtiff/
Master HTTP Site | http://www.simplesystems.org/libtiff/

This document describes the changes made to the software between the previous and current versions (see above). If you don’t find something listed here, then it was not done in this timeframe, or it was not considered important enough to be mentioned. The following information is located here:

## Major changes

- Bug-fix release.

## Software configuration changes

- libtool related stuff updated from the 2.1a branch.

- Fix `with_default_strip_size` comparison as reported by Norihiko Murase.

## Library changes

- `tif_dirread.c`: Fixed error reporting in `TIFFFetchAnyArray()` function as per bug Remote Sensing bugzilla #1102 [no longer available]

- `tif_jpeg.c`, `tif_pixarlog.c`, `tif_fax3.c`, `tif_zip.c`: Properly restore `setfield`/`getfield` methods in cleanup functions. As per bug Remote Sensing bugzilla #1102 [no longer available]

- `tif_lzw.c`, `tif_pixarlog.c`, `tif_zip.c`: Use `TIFFPredictorCleanup()` in codec cleanup methods. As per bug Remote Sensing bugzilla #1102 [no longer available]

- `tif_predict.c`, `tif_predict.h`: Added new function `TIFFPredictorCleanup()` to restore parent decode/encode/field methods.

- `tif_dirread.c`: Fixed integer overflow condition in `TIFFFetchData()` function. As per bug Remote Sensing bugzilla #1102 [no longer available]

- `tif_ojpeg.c`: Set the `ReferenceBlackWhite` with the `TIFFSetField()` method, not directly. As per bug Remote Sensing bugzilla #1043 [no longer available]

- `tif_write.c`: Small code rearrangement in `TIFFWriteScanline()` to avoid crash as per bug Remote Sensing bugzilla #1081 [no longer available]

- `tif_dirwrite.c`: Properly write `TIFFTAG_DOTRANGE` tag as per bug Remote Sensing bugzilla #1088 [no longer available]

- `tif_print.c`: Properly read `TIFFTAG_PAGENUMBER`, `TIFFTAG_HALFTONEHINTS`, `TIFFTAG_YCBCRSUBSAMPLING` and `TIFFTAG_DOTRANGE` tags as per bug Remote Sensing bugzilla #1088 [no longer available]

- `tif_tile.c`: Fix error reporting in `TIFFCheckTile()` as per bug Remote Sensing bugzilla #1063 [no longer available]

- `tif_color.c`: Avoid overflow in case of wrong input as per bug Remote Sensing bugzilla #1065 [no longer available]

- `tif_dirinfo.c`: Use `TIFF_NOTYPE` instead of 0 when appropriate. As per bug Remote Sensing bugzilla #1033 [no longer available]

- `tif_aux.c`: Fixed type of temporary variable in `_TIFFCheckMalloc()` as per bug Remote Sensing bugzilla #103 [no longer available]

- `tif_aux.c`: Return static array when fetching default `YCbCrCoefficients` (another problem, reported a the Remote Sensing bugzilla #1029 [no longer available] entry).

- `tif_dir.c`: Special handling for `PageNumber`, `HalftoneHints`, `YCbCrSubsampling` and `DotRange` tags as per bugs Remote Sensing bugzilla #1029 [no longer available] Remote Sensing bugzilla #1034 [no longer available]

- `tif_dirread.c`: Use `_TIFFGetExifFieldInfo()` instead of `_TIFFGetFieldInfo()` in `TIFFReadEXIFDirectory()` call as per bug Remote Sensing bugzilla #1026 [no longer available]

- `tif_dirinfo.c`: Change definitions for `TIFFTAG_ICCPROFILE`, `TIFFTAG_PHOTOSHOP`, `TIFFTAG_RICHTIFFIPTC`, `TIFFTAG_XMLPACKET`: readcount should be `uint32` value.

## Tools changes

- `ppm2tiff.c`: Added support for PBM files as per bug Remote Sensing bugzilla #1044 [no longer available]

- `tiff2pdf.c`: Functions `t2p_sample_rgbaa_to_rgb()` and `t2p_sample_rgba_to_rgb()` was used in place of each other, that was resulted in problems with RGBA images with associated alpha. As per bug Remote Sensing bugzilla #1097 [no longer available]

- `tiff2ps.c`: Properly scale all the pages when converting multipage TIFF with /width/height/center options set. As per bug Remote Sensing bugzilla #1080 [no longer available]

- `tiff2pdf.c`: Do not create output file until all option checks will be done. As per bug Remote Sensing bugzilla #1072 [no longer available]

- `bmp2tiff.c`: Added ability to create multipage TIFFs from the list of input files as per bug Remote Sensing bugzilla #1077 [no longer available]

- `tiffgt.c`: Avoid crashing in case of image unsupported by TIFFRGBAImage interface.

- `tiff2pdf.c`: Fixed support for non-YCbCr encoded JPEG compressed TIFF files, per submission from Dan Cobra.

- bmp2tiff, pal2rgb, ppm2tiff, ras2tiff, raw2tiff, sgi2tiff, tiff2bw, tiffcp: Fixed jpeg option processing so `-c jpeg:r:50` works properly as per bug: Remote Sensing bugzilla #1025 [no longer available]

## Contributed software changes

None.