CompuServe Thread

#Make Foreign PICT

4 messages in this thread
#41602From: alan cimaMar 10, 1991 5:58 AM
I watched the thread on making a pict file on an SGI and the associated difficulty. I am wondering about a simpler scheme – I need to transfer 8 bit deep bit maps from a sun to the mac. could i do it once manually using studio8 etc and get the resource and data file streams how the mac would want them and then from then on just copy that file over with my new 8 bit deep map in the place where i found it in the original file? of course sleasy – but will it work? Read action !
#41606From: Ed LudwigMar 10, 1991 7:08 AM
alan, Making a PICT file which only consists of one 8-bit pixmap would not really be that difficult. In this regard, PICT is not any more difficult to export to than TIFF (as a matter of fact, TIFF is much nastier!). Just write out a 512 byte header, the low-order word of your total pic size, your picture rectangle. Then write out the static header stuff for the PICT 2 format and finish it off by writing the opcode for pixmap data (according to IM 5) and then the pixmap dat itself. Not too bad. Just be aware of your byte swapping. If you want to pack your data, the PackBits algorithm is mindlessly simple and is supported by the pixmap opcode. The algorithm is in a technote somewhere. Good Luck, Ed Ludwig, Abbott Systems Read action !
#41676From: Dave BrosiusMar 11, 1991 12:50 AM
I'd think it would be just easier to create an 8bit pixmap and hand blit the sun data into it. Then openpicture/copybits/closepicture and add it as a resource. Read action !
#41700From: Ed LudwigMar 11, 1991 7:54 AM
Dave, "I'd think it would be just easier to create an 8bit pixmap and hand blit the sun data into it. Then openpicture/copybits/closepicture and add it as a resource." If he can create the PICT on the Mac, that's the way to go without a doubt. However, I was under the impression (probably erroneous) that he had to use the Sun to create the PICT. Ed Ludwig, Abbott Systems Read action !