topix@gpu.utcs.utoronto.ca (R. Munroe) (11/25/90)
I'm writing an app that, among other things, converts between PICT, TIFF, Wavefront rla, Silicon Graphics rgb, Alias rle, NeoVisuals gen, and GIF image formats. Most of these formats are, or support, 24 bits deep. My app reads and displays all the above formats - on everything from a Plus to a IIfx - without losing data (I use two buffers - one that keeps the image intact and one, for display only, that stores the pixels in whatever depth the machine can handle). Most of the formats are simply run-length encoded and are no problem to read. My biggest headache, however, is PICT files. Since I want my app to run on all Mac levels, I am currently doing my own PICT decoding. This way I can read a 32-bit PICT on a Plus, SE, or Classic, and convert it, without loss of data, into any of the other 24-bit formats. But, as you know, writing a PICT decoder is a massive undertaking, because of the dozens of opcodes. I'm polling this newsgroup to see what the preferred method of supporting PICT files is (with the intention of both displaying and converting them into different formats): 1) Do what I am currently doing - decode PICT files without using any Toolbox routines. 2) Require Color QD and 32-bit Color QD to be present on a 1-bit Mac - solely for the purpose of being able to read a 32-bit PICT with the appropriate Toolbox calls (I've been told this method works - I haven't actually tried it). 3) Give in and require the user to have a Mac II with 32-bit Color QD to run my app. I've seen other apps display 32-bit PICTs on a 1-bit Mac (PhotoShop, for example). I think that's a nice way to do things since I don't want Plus, SE, and Classic owners to be left out in the cold. Any ideas as to how other programs read PICT files? E-mail me with any responses and, if the results are interesting, I'll summarize. Thanks. Bob Munroe topix@utcs.utoronto.ca
francis@magrathea.uchicago.edu (Francis Stracke) (11/26/90)
In IM V (pg V-86), it says that a version 2 picture can be displayed on a Mac with 128K or larger ROMs, even without CQD, provided you're running System 4.1 or later; those systems provide a patch to parse the new pictures, converting CQD color commands to "a suitable black-and-white representation". While I can't claim to have tried it, this would seem to say you can just use the Toolbox and depend on being able to draw your PICTs, no matter what. (Of course, if somebody is trying to run under a *really* old System, too bad; but that old a System is going to give many other problems besides. :-) | Francis Stracke | My opinions are my own. I don't steal them.| | Department of Mathematics |=============================================| | University of Chicago | Until you stalk and overrun, | | francis@zaphod.uchicago.edu | you can't devour anyone. -- Hobbes |