Picture Utilities


Picture Utilities: (2/22/97) This link is to a 780K MacBinary/sit compressed folder that includes five new classes for the decompression and display of compressed images in JPEG/JFIF, GIF, PICT, Photoshop (2.5/3.0), QuickDraw, MacPaint, SGI, .rgb, or the new QuickTime Image File format. Also included is a simple "LRF Viewer" application to display a single image in a modal window. A replacement QT 2.5 Interfaces folder of XDEFs from Pictorius is included in this compression. It replaces the QT Interfaces folder presently in your Prograph Extensions folder.

You must have QuickTime 2.5 installed to use these classes or to run the application. I do no checking, so running with an older QT will crash. QuickTime 2.5 can be obtained from the Apple web site and is included in System 7.6.

These materials are still under development.


GWorld class: This is a utility class to manage a GWorld in a reasonably simple manner. Its main user methods are New GWorld, Set New GWorld, Set Old GWorld, Dispose GWorld, Get PixMap, and Unlock PixMap. In some ways this duplicates the Offscreen class, but with different and what I think are newer toolbox calls.

Big Picture File and Linked Picture File classes: Both of these are daughter classes of Picture File which must also be included in your project. Their only method is Link Picture, but it does different things in the two classes. The Big Picture File version defines the GraphicsImportComponent and does nothing else. It is designed to use with full screen images where the drawing time is less important than the memory a large PixMap would take. The Linked Picture File version is more like the operation of the Picture File class. It's designed for drawing an image into a view of a document. The Link Picture method in this class decodes the picture into a PixMap in a GWorld then disposes of the GraphicsImportComponent. It transfers the GWorld and the FSSpec and full path name of the file to attributes in a Linked Picture Item class. As written this class does not support scroll bars or grow boxes in the view but does respond correctly to these objects on the containing window.

Big Picture Item class: This class overshadows the Draw Content and Dispose methods of its parent Picture Item class so that the picture will be redrawn correctly. Each redraw is a new decompression of the complete image, but does not read from the disk file. It is reasonably quick on a Power Mac.

Linked Picture Item class: This class also overshadows the Draw Content and Dispose methods of its parent Picture Item class, but is more complicated since it redraws from a saved PixMap in an offscreen GWorld. The redraws for this class are of course much quicker since no decoding is necessary. This class also overshadows Get Value and Set Value methods and differs from Picture Item in that only the FSSpec and full path names are returned in a packed string format. There are probably better ways to pack this information, but this was reasonably easy and serves my purposes.

Application LRF Viewer: This is a simple application to show the usage of the Big Picture classes. It's a very minimal viewer, but is capable of decoding lots of different formats with equal ease. It displays in a window with a size box and the image expands and contracts to fill as much of the box as possible without distortion.


Known Problems: At present, these classes do not handle or respond to the attributes frame, origin, size, clipping region, etc. correctly and as a result do not currently support borders, scroll bars, etc. I havn't even thought about printing. I'm open to pointers and suggestions.


Back to my Home Page ..................... © 1996-1999 L.R. Fortney