| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2010.04.27 03:38 "Re: [CRITICAL] libtiff 3.9.3 incorrectly writes out TIFFTAG_REFERENCEBLACKWHITE tags", by Lee HowardPlease file a bug report on Bugzilla so your work does not get lost. Thanks, Lee. Edward Lam wrote: > Hi, > > I'm currently trying to upgrade from libtiff 3.7.0 to libtiff 3.9.3 and > found a serious problem in its handling of TIFFTAG_REFERENCEBLACKWHITE. > The problem was unintentionally fixed in libtiff 4.0 due to Adam Goode's > patch (http://www.asmail.be/msg0054714754.html). > > I haven't analyzed it too much yet but applying Adam's patch to 3.9.3 > causes my libtiff usage to work again. When we create an TIFF image, we > have code which sets the black/white points as follows: > ... > float points[6]; > ... > // set black/white points. > points[0] = points[2] = points[4] = black; > points[1] = points[3] = points[5] = white; > TIFFSetField(myTiff, TIFFTAG_REFERENCEBLACKWHITE, &points); > ... > This causes the TIFF file to be generated with: > ... > ReferenceBlackWhite (532) LONG (4) 6<0 1132396544 0 1132396544 0 1132396544> > ... > The correct tag should be: > ... > ReferenceBlackWhite (532) RATIONAL (5) 6<0 255 0 255 0 255> > ... > > Any ideas? > > Thanks, > -Edward > _______________________________________________ > Tiff mailing list: Tiff@lists.maptools.org > http://lists.maptools.org/mailman/listinfo/tiff > http://www.remotesensing.org/libtiff/ > > |
|||||||