TIFF plugin (encode/decode Tiff files)

John M McIntosh johnmci at smalltalkconsulting.com
Sat Oct 28 23:58:51 UTC 2000


I spent the last week building an interface to the libtiff interface. 
Although not fully tested yet, I've exposed the entire interface and 
have it to the point you can read tiff files (strips, tiled, 
scanlines). Also you can write these formats (tiled isn't tested 
yet). It followed neatly on the work that I did to interface to the 
MPEGLib so testing actually took longer than the coding.

This Squeak for the Macintosh plugin allows you to decode or encode 
Forms from/to the TIFF format. Most of the work is done by software 
from:
www.libtiff.org (for tiff)
www.ijg.org (for jpeg compression) (JPEGS can be embedded in TIFFs, 
so this is NOT a general JPEG reader, but maybe one will be 
forthcoming)
www.info-zip.org/pub/infozip/zlib (for zip compression)
Keep in mind your other TIFF reader software might not support zip or 
jpeg compression (sigh). Some code, a very very simple example:
form _ TIFFFile makeFormFrom: 'adobeGirl.tiff'
result _ TIFFFile writeFormAsStrip: form toFile: 'foobar.tiff'.

Since all this code was BUILT for intel machines I'm SURE someone can 
port the plugin to Intel and Linux based distributions. I've still 
some work to do with 1 bit forms for example and the Error handling 
(Error handling at the tiff interface kicks up a debug windows, 
ugly), but it's time to kick the tires, but beware I'll be changing 
things with regard to the error handling in a week or so.

Find the stuff at:

http://www.smalltalkconsulting.com/html/TIFFsource.html


Please note because of the LZW compression issue this plugin does NOT 
contain the LZW compression/decompression. If you require that then 
you would need to compile your own plugin.
-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7  E94A EE69 2D21 46FC 3BE6
===========================================================================





More information about the Squeak-dev mailing list