2015.01.07 19:21 "Re: [Tiff] tools to validate a TIFF?", by Scott Ribe

2015.01.09 03:55 "Re: [Tiff] Libtiff JPEG sampling factors error should be warning", by Lee Howard

I would agree that in a situation like that - where the image can be read - a warning (rather than an error) is appropriate.

Thanks,

Lee.

On 01/08/2015 07:21 PM, Bob Friesenhahn wrote: > I received this [somewhat edited] email off-list. Is the consensus

> that libtiff should issue a warning rather than an error for this case > (like libjpeg apparently does) so that the image still can be read?

>
> """
> This image has a problem reading using libtiff

> "https://app.box.com/s/8lfqekv98dc615ezrld6". This image > fails with the following message: Improper JPEG sampling factors 2,2.

> This error is raised on line 1104 of tif_jpeg.c (I > used this file for the line number:

> https://github.com/vadz/libtiff/blob/master/libtiff/tif_jpeg.c > [github.com]). When I

> change the code to only raise a warning when the sampling factor is > incorrect it will create a correct image. I noticed

> that libjpeg will also raise a warning if the data is incorrect. I got > this when I changed the h_samp_factor values. Is

> changing the error to a warning a correct patch or do you know a > better way to solve this? Or should this image be

> threated as corrupt?"""
>
> Bob