[comp.sys.mac] Mac II Color Graphics Standard?

thomas@eleazar.Dartmouth.EDU (Thomas Summerall) (01/05/88)

Is there a standard way to move color/gray scale images from one graphics
program to another on the Mac II?  I was used to the macpaint format
standard on my old 512ke, so when I moved up to the Mac II I was surprised
to find that almost every color/gray scale program I have seen seems to
store its images using radically different formats.  These include PixelPaint,
the Paris color demo which shows ray-traced images, ImageStudio, etc...

I haven't been able to get a copy of Inside Mac vol 5 yet, so I am unfamiliar
with different formats.  (I don't even know what a clut is, but from my appleII
programming experience I assume it stands for Color LookUp Table...)

Is there a standard?  Can an image be ported from one program to another in
screen-sized chunks using an FKEY similar to the one which saved B&W mac
screens to disk, except do it in a standard format?  Is there such a thing as
a color PICT that any type of color image could be translated to?

So Many Questions...So Little Documentation...

Thanks in advance...

==============================================================================
thomas@dartvax * thomas%u2.dartmouth.edu@RELAY.CS.NET  |  Thomas Summerall '88
                                                       |  H.B. 3445
"And all that the Lorax left here in this mess,        |  Dartmouth College
 Was a small pile of rocks, with one word: UNLESS"     |  Hanover, NH    03755
                                        -Dr. Seuss '25 |
==============================================================================

fry@huma1.HARVARD.EDU (David Fry) (01/06/88)

In article <7863@eleazar.Dartmouth.EDU> thomas@eleazar.Dartmouth.EDU (Thomas Summerall) writes:
>Is there a standard way to move color/gray scale images from one graphics
>program to another on the Mac II?  I was used to the macpaint format
>standard on my old 512ke, so when I moved up to the Mac II I was surprised
>to find that almost every color/gray scale program I have seen seems to
>store its images using radically different formats.  These include PixelPaint,
>the Paris color demo which shows ray-traced images, ImageStudio, etc...
>
>I haven't been able to get a copy of Inside Mac vol 5 yet, so I am unfamiliar
>with different formats.  (I don't even know what a clut is, but from my appleII
>programming experience I assume it stands for Color LookUp Table...)
>
>Is there a standard?  Can an image be ported from one program to another in
>screen-sized chunks using an FKEY similar to the one which saved B&W mac
>screens to disk, except do it in a standard format?  Is there such a thing as
>a color PICT that any type of color image could be translated to?
>
>So Many Questions...So Little Documentation...

There is a new PICT standard, called PICT2, that is fully
described in Inside Mac Volume 5 and is adequate for storing
any grayscale or color picture.  Almost all graphics programs
already support or will support PICT2, which is a superset of the
original PICT and will display as B/W in programs (like
MacDraw) that don't understand PICT2 or are running on a Mac
SE.

There are several FKEYs now, most notably one made by the
author of Pixel Paint, that will save the screen in a PICT2
file.

Programs that don't use PICT2 as their primary file type are
probably saving extra information, such as cluts, or are
interested in better compression schemes.  But PICT2 files are
already compressed, albeit not highly but efficiently, and all
necessary clut information is already contained within and
merely needs to be extracted properly.

David Fry				fry@huma1.harvard.EDU
Department of Mathematics		fry@harvma1.bitnet
Harvard University			...!harvard!huma1!fry
Cambridge, MA  02138		

olson@endor.harvard.edu (Eric K. Olson) (01/06/88)

Unfortunately, there are many formats for color and/or grayscale information
generated on a Mac II:

	The most general way to move PICT 2 (Mac II PICT) data is via the
clipboard.  This allows any program that opens multi-bit windows to pass
color pictures in and out of itself.  It doesn't require any special file
type, so it is supported most easily.

	A PICT file contains the same information as a clipboard PICT, but
stored in the data fork of a file.  Pixelpaint supports this format.  Some
older Mac software (MacDraw) can also generate this type of file, but not
in color.

	A GrayView file contains the same information as a PICT file and a
clipboard PICT, but stored in a PICT #0 resource in the resource fork of the
file.  This is the format of a Mac II StartUpScreen, as well as a DeskPicture
for use with the DeskPict INIT.  If the file contains an original Mac-screen
size bitmap (uncompressed) in the data fork, that bitmap will be used as the
StartUpScreen on a non-Mac-II.

	The drawback of all the PICT formats is that they cannot be generated
easily on a non-Mac-II, and if PICT 2 data is displayed on a non-Mac-II, it
will be displayed as black & white, with white being > 50% luminance (the
same display you would get if you displayed them on a Mac II set to 2 color
mode).  For this reason, there are formats which can hold grayscale information
useable by non-Mac-II's, also:

	TIFF is a "standard" scanner format, which can hold either a huge
bitmap containing 100% black and 100% white pixels (data from scanners is
usually in this format-- but sometimes in greyscale), or a grayscale picture,
a PixMap (multi-bit-per-pixel BitMap) containing pixels varying in intensity
(usually 16 or 256 gray levels per pixel).  It can also represent color
information, but without a lookup table (gray data doesn't need a lookup
table as much), usually 2 bits each for red, green, and blue.  TIFF is an
extensible format, so software written a while ago sometimes cannot deal
with newer TIFF file (for instance, grayscale TIFF is newer than scanner TIFF).

	ThunderScan GrayMap format can represent up to 64 gray levels per
pixel.  I find it useful for backwards compatibility.  ImageStudio can read
this format.  Thunderscan can include a grayscale map (pixel value to 
intensity lookup table, also called a transfer function).

	RIFF (Raster Image File Format) is the native format for ImageStudio.
It can store grayscale information up to 256 grays per pixel, and can store
color information with a color lookup table (although I know of nothing that
will read a color RIFF file).

	Since ThunderScan and ImageStudio both run on Non-Mac-II's, GrayMap
and RIFF files are somewhat more universal than anything using a PICT format.
TIFF is quite universal (even when moving to IBM-PC's, although byte-ordering
may become a problem if the importing application isn't careful), but
can contain so many different kinds of information you never quite know
what you'll get.

Hope this helps.

-Eric
                      (defun maybe (x) (maybe (not x)))
Eric K. Olson     olson@endor.harvard.edu     harvard!endor!olson     D0760
   (Name)                (ArpaNet)                 (UseNet)        (AppleLink)