AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.08.07 01:12 "[Tiff] Custom tags", by Ashley Dreier
2003.08.07 06:11 "[Tiff] Custom tags", by Andrey Kiselev
2003.08.07 23:59 "[Tiff] Custom tags", by Ashley Dreier
2003.08.07 16:40 "[Tiff] Custom tags", by Andrey Kiselev
2003.08.11 05:09 "[Tiff] Custom tags", by Ashley Dreier
2003.08.11 02:40 "[Tiff] Corection [was: ld.so.1, TIFFmalloc not found]", by Pushkar Pradhan
2003.08.10 04:43 "[Tiff] ld.so.1, TIFFmalloc not found", by Pushkar Pradhan
2003.08.10 05:39 "[Tiff] ld.so.1, TIFFmalloc not found", by Tom Kacvinsky
2003.08.10 05:53 "[Tiff] ld.so.1, TIFFmalloc not found", by Pushkar Pradhan
2003.08.10 13:17 "[Tiff] ld.so.1, TIFFmalloc not found", by Tom Kacvinsky
2003.08.10 16:00 "[Tiff] Corection [was: ld.so.1, TIFFmalloc not found]", by Tom Kacvinsky
2003.08.12 07:48 "[Tiff] Custom tags", by Andrey Kiselev
2003.08.07 06:36 "[Tiff] Custom tags", by Ashley Dreier

2003.08.07 06:36 "[Tiff] Custom tags", by Ashley Dreier

Hi again.

Further to my previous email, I find that things work okay for TIFF_ASCII tags (as in I can read/modify/write them). Still having the same problem for other custom tags though which are either TIFF_SHORT or TIFF_LONG. Looks like it's perhaps a pointer addressing/casting problem somewhere.

The TIFFFieldInfo contains something like the following:

static const TIFFFieldInfo myFieldInfo[] = {
     { TIFFTAG_NAME, 4, 4, TIFF_ASCII, FIELD_CUSTOM, FALSE, FALSE, "Name" },
    { TIFFTAG_SEQUENCENUMBER,1, 1, TIFF_LONG, FIELD_CUSTOM, FALSE, TRUE, "SequenceNumber" }
};

To read them, I use:
        void *data;
        short count;

        if (!TIFFGetField(tif, TIFFTAG_NAME, &data))
            printf("Unable to get TIFFTAG_NAME\n");
        else
            printf("NAME = %s\n", (char *) data;

        if (!TIFFGetField(tif, TIFFTAG_SEQUENCENUMBER, &count, &data))
            warning(": Unable to get TIFFTAG_SEQUENCENUMBER\n");
        else
        {
            printf("SEQUENCENUMBER = ");
            for (i = 0; i < count; i++)
                printf("%d ", ((long *) data)[0]);
            printf("\n");
        }

Once I specify the FieldInfo structure for the TIFF_LONG tag, then calling TIFFRewriteDirectory() causes a segfault, even without trying to read/modify any of the custom tags. Hence it sounds like an internal TIFF library error.

Any thoughts would be much appreciated.

Regards,

        Ash.

On Thu, 07 Aug 2003 11:12:53 +1000

> _______________________________________________
> Tiff mailing list
> Tiff@remotesensing.org
> http://remotesensing.org/mailman/listinfo/tiff
>

--
Ashley J. Dreier. Email: Ashley.Dreier@csiro.au

CSIRO Manufacturing and Infrastructure Tech, Phone: +61 3 9662 7799
Locked Bag No. 9,                            Fax:   +61 3 9662 7851

Preston, Vic, 3072, Australia.
URL: http://www.msa.cmst.csiro.au/cmst/automation/staff/ajd