From: Mats B. <ma...@pr...> - 2002-01-26 08:46:45
|
Jack Jansen wrote: > > On Wednesday, January 23, 2002, at 06:20 PM, Mats Bengtsson wrote: > > > > > Update, > > > > Got CW 6 tiff project from Jack, used the archive from his site (3.3?) > > added #include <fcntl.h> in tiffcomp.h, made it into a shared lib, > > replaced tiff.shlb, but only blue and black shows correctly. > > The first one (3.5.7), shows red and white correctly, very funny... > > This beats me, anyone... > > Note that the I/O component of libtiff is pretty finicky. As the > library was distributed (I got it about 8 years ago, I think) it > used raw MacOS File Manager calls. The library as it is in my > distribution (if I remember correctly) uses the Unix I/O file > for libtiff and then uses either GUSI for unix-style > open/close/read/write I/O or whatever MSL gives you. But for > Python I did a workaround at some point to use stdio for I/O, > because there were some problems with the other two I/O methods. > In 3.5.7 that I use, and in your version, IO is handled in tif_apple.c, but in 3.5.7 its Carbonized, and there are some API changes, but its hard to believ that this has anything to do with it (?). > So to make a long story short: the first thing I would check is > I/O. Maybe it's doing text I/O? > > Hmm, thinking a bit further: every time my images show up with > funny colors on the mac it turns out I haven't set foreground > and background colors to white and black before doing the > bitblit(), so that's also worth checking. > -- There are no CopyBits in tifflib. Perhaps its made in the Img lib, but there it uses the X emulation stuff, so its probably ok. I got suspicious about endian things, so I changed some if the defines that handles this (HOST_BIGENDIAN, FILLORDER_MSB2LSB) but no change as far as I could find. Mats |