2019.12.09 20:19 "[Tiff] help writing RGB TIFF", by Paul Hemmer

2019.12.09 21:12 "Re: [Tiff] help writing RGB TIFF", by Paul Hemmer

Hi Yakov -

I'm using PLANARCONFIG_CONTIG which == 1

I did try using PLANARCONFIG_SEPARATE (2) just to see, and yes, the behavior was funky

-Paul

________________________________
From: Yakov Galka <ybungalobill@gmail.com>
Sent: Monday, December 9, 2019 4:07 PM

To: Paul Hemmer <paulhemmer@hotmail.com>
Cc: Tiff List <tiff@lists.osgeo.org>
Subject: Re: [Tiff] help writing RGB TIFF

On Mon, Dec 9, 2019 at 12:19 PM Paul Hemmer <paulhemmer@hotmail.com<mailto:paulhemmer@hotmail.com>> wrote:

TIFFSetField(tiff_handle, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)

You seem to be using a planar configuration here. TIFF spec has this to say about it:

PlanarConfiguration=2 is not currently in widespread use and it is not for general interchange. It is used as an extension and TIFFreaders are not required to support it. recom-mended Baseline

Which translates into "expect funky behavior by other software when using this feature".

I recommend you convert your planar data into interleaved format, which is really straightforward to do, and save that into "chunky" (aka non-planar) TIFF, which is the baseline default.

http://stannum.co.il/<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fstannum.co.il%2F&data=02%7C01%7C%7Ca4178bf36554420b036008d77cebd26e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637115224595809756&sdata=R%2BCFofHwfK2dPJ%2F1ovDOiI0dveZhue39sBrUSTc0M9w%3D&reserved=0>