2018.05.11 01:43 "[Tiff] LZ4 compression", by fx HAYAKAWA MICHIO

2018.05.23 12:18 "Re: [Tiff] ] Not able to write TIFF_LONG8 field_type tags", by Bhaskar Reddy

Thank you Roger for your response.

I agree that those tags should be read-only but I would like to handle those tags for my personal project.

switch (standard_tag) {
case TIFFTAG_STRIPOFFSETS:
case TIFFTAG_TILEOFFSETS:
td->td_stripoffset = (uint64) va_arg(ap, uint64*);
break;
case TIFFTAG_STRIPBYTECOUNTS:
case TIFFTAG_TILEBYTECOUNTS:
td->td_stripbytecount=(uint64) va_arg(ap, uint64*);
break;
                      .
                      .
                      .
                 }

But I am getting following error when executed with above code.

"*TIFFWriteDirectoryTagLongLong8Array: Out of memory*." *** Error in `filepath': double free or corruption (out): 0x000000000062abc0 ***

Thank you,
Bhaskar.

On Wed, May 23, 2018, 4:57 AM <rleigh@codelibre.net> wrote:

> On 2018-05-23 08:21, Bhaskar Reddy wrote:
> > Hi everyone,
> >
> > I am unable to write following tags to Tiff image
> >
> > TIFFSetField(tif, TIFFTAG_STRIPOFFSETS,value)
> > TIFFSetField(tif, TIFFTAG_TILEOFFSETS ,value)
> >
> > TIFFSetField(tif, TIFFTAG_STRIPBYTECOUNTS ,value)
> >
> > TIFFSetField(tif, TIFFTAG_TILEBYTECOUNTS ,value)
> >
> > as
> >
> > __TIFFVSETFIELD _function in tif_dir.c has no switch cases
>

> I assume this is intentional, because the contents of these fields are > automatically maintained by libtiff and updated by

> TIFFWriteDirectorySec(), TIFFFlush(), etc. Why do you need to manually > adjust them? Can't you treat them as read-only properties?

>
> I've never needed to mess with them when writing out a BigTIFF. Simply

> using TIFFWrite*Tile() and related functions will keep these lists of > counts and offsets up to date.