The How and Why of Floating Windows

In the past few years it has become quite fashionable Ñ especially in imaging applications Ñ to support a new type of window whose behavior breaks all the rules of how windows were originally supposed to operate on the Macintosh: the floating window (sometimes called a ÒwindoidÓ).  Floating windows always appear in front of standard windows, so that you can always see what information they convey; yet their presence in the foreground does not prevent operations from affecting the active standard window behind them.  For the purposes of everything but visibility, they are effectively nonexistent.

The onscreen appearance of a floating window is similar to that of a standard window, except for the floating windowÕs title bar, which is smaller and highlighted in a different manner.  In general, floating windows use the terminology show and hide, rather than the more familiar open and close.  This is reflected in the menu items relating to them: for instance, you can make the Statistics floating window visible by choosing the menu item labeled Show Statistics from the Windows menu; similarly, you can hide a floating window by choosing the Hide Statistics menu item from the same menu (it is in fact the same menu item, with the name changed as appropriate).

When you make a floating window visible, one of the first things youÕll notice is that title bar of the topmost standard window is still highlighted, despite the existence of the floating window above it.  This serves to remind you that the standard window is still really the ÒactiveÓ window and that all actions chosen from the menus will apply to the standard window and not to any of the floating windows.  An important first example is that choosing Close from the File menu (or typing W) closes the active standard window, not the floating window.  To hide (close) a floating window, you either choose Hide Window (where Window stands for the name of the floating window) from the Windows menu, or click in the floating windowÕs close box.

Another important fact about floating windows is that they can never be manipulated such that they end up behind a standard window.  That is, clicking in a standard window will bring the it in front of all other standard windows, but it will still appear behind any floating windows that are visible.  Along the same lines, you can also click and drag to make a selection in the topmost standard window, without affecting the floating windows.  At first, all this may seem a little disconcerting, but give it time and you will soon realize how useful floating windows can be.

Finally, the position and visibility of each floating window is saved and remembered whenever you quit JPEGView, and is restored when JPEGView starts again.  This means that you can position your floating windows and choose which ones to show, knowing that they will be visible in the same positions next time you run JPEGView.

JPEGView currently supports three floating windows: the Statistics floating window, which displays information about the active image window; the Comments floating window, which is used to hold any comments extracted from the image in the active window; and the Colors floating window, which shows the current color selection on whichever monitor it is displayed.  The slide show controls window is also a floating window; a description of its operation can be found in the Slide Show chapter.


The Statistics floating window

JPEGViewÕs Statistics floating window displays a host of useful information about the image currently displayed in the active window.  To see this information, make the Statistics floating window visible by selecting Show Statistics from the Windows menu (0).  Once visible, this floating window gives you a frequently updated list of many important bits of information about the currently active image and about how it is being displayed.  Below is a summary of what each field describes and what you might find displayed there.

If the list of data presented seems a little too extensive for your purposes, you can shrink it down to a one-line summary by clicking in the zoom box on the right side of the title bar.  The format of the summary is:

My Image:  size format, width x height x colors

where My Image is taken from the File Name field, size is taken from the Image Length field, format is taken from the Image Format field, width and height are taken from the Image Size field, and colors is taken from the Image Colors field.  More details about what the values in each field mean are given below.

Also, if you are running on a drag-aware system (System 7.5, or an earlier System 7 release with the Macintosh Drag and Drop extension installed), you can take advantage of the drag-and-drop functionality to drag the statistics information as text into another application.


Statistics for the original image

File Name:  This is simply the name of the original file from which the image was read.

Image Size:  This tells you the width and height of the original image in pixels, before any scaling performed by JPEGView.  For cropped images, this field tells you the size of the cropped region, with the original size given in parentheses immediately afterwards.

Image Colors:  This is the number of colors described by the image data, given in the same way youÕre used to seeing it in the Monitors Control Panel, i.e., ÒThousandsÓ means 32,768 and ÒMillionsÓ means 16.7 million.

Image Status:  This field tells you the ÒstatusÓ of the image, which can be a combination of:
    ¥ Aborted: the drawing of the image was interrupted (using the Esc key or the . combination).
    ¥ Banded: the image was compressed using QuickTime under low memory conditions.  This means that the full image actually consists of several smaller images, each of which is a horizontal strip of the full image.
    ¥ Corrupt: the compressed image data was found to be damaged in some form or another.  Portions of the image may still be decipherable.
    ¥ Cropped: the image is actually only part of a larger image; the full image can be recovered using the Uncrop Image function, described in the Special Effects chapter.

Compression:  This field tells you the type of compression used on the image and, if the information is available, the vendor of the compressor and the quality factor used in the compression.  There are a number of possible values that can be found here:
    ¥ JPEG (QuickTime, Adobe, or I.J.G.) for JPEG images compressed by QuickTime, Adobe, or the Indepedent JPEG GroupÕs software, respectively.
    ¥ GIF/LZW for images compressed using GIFÕs variant of Lempel-Ziv-Welch compression.
    ¥ Modified CCITT RLE for TIFF images compressed using a variant of CCITT Group 3 fax compression.
    ¥ PackBits for MacPaint images or for TIFF images compressed using the PackBits RLE compression.
    ¥ LZW for TIFF images compressed using Lempel-Ziv-Welch compression.
    ¥ LZW with prediction for TIFF images using horizontal prediction together with standard LZW compression.
    ¥ 4-bit or 8-bit RLE for BMP images compressed using MicrosoftÕs RLE compression.
    ¥ Photo CD for images compressed using KodakÕs Photo CD technology.
    ¥ Photo Ñ JPEG for QuickTime PICT images compressed using AppleÕs JPEG compressor.
    ¥ Animation for QuickTime PICT images compressed using the Animation compressor.
    ¥ Graphics for QuickTime PICT images compressed using the Graphics compressor.
    ¥ Compact Video (or Cinepack) for QuickTime PICT images compressed using the Compact Video compressor.
    ¥ Video for QuickTime PICT images compressed using the Video compressor.
    ¥ Uncompressed for uncompressed images.
For QuickTime-compressed PICT images, the quality factor used during compression is given, in the standard range from 0.00 (worst) to 4.00 (best).  For JFIF images, which do not store the original quality factor used in compression, only an estimate of this quality factor can be made from the tables stored in the image.  Currently JPEGView can only estimate the quality of JFIF files created by the Independent JPEG GroupÕs code, which uses a different quality scale than QuickTime, ranging from 0 (worst) to 100 (best).

File Format:  This is the file format that the image was saved in.  Possible values include PICT, JFIF, GIF, TIFF, BMP, MacPaint, and Startup Screen.

Image Length:  This is the length of the image, given in kilobytes.  If the image was compressed, then the savings gained by compression is computed and displayed either as a percentage for small compression gains (e.g., 60% compression, meaning that the compressed image is 60% smaller than the original) or as a ratio for highly compressed images (e.g., 7:1 compression, meaning that the compressed image is 7 times smaller than the original).


Statistics for the displayed image

Displayed Size:  This is the width and height of the image you are actually seeing onscreen.  If the image has been scaled, the scaling factor is given in parentheses as a percentage.  If the horizontal scaling on the image is different from the vertical scaling, the scaling factor is given as two separate percentages, horizontal scaling first.

Displayed Colors:  This is the currently selected color set for the image, as seen in the Colors menu.  Usually, JPEGView dithers images to ensure the highest quality display; if dithering is for some reason turned off, this is indicated as well.

Display Quality:  This is the quality used for drawing the image, if it was drawn on a screen with 256 colors or more.  An explanation of what this quality means is given in the Colors and Color Reduction chapter.  If the image was drawn on a screen with less than 256 colors, this field displays Òn/aÓ (not applicable).

Display Time:  This is amount of time it took for JPEGView to last draw the complete image, given in seconds.  Note that this time is only updated when the image needs to be decompressed while the entire image window is visible on-screen; if the image is copied from an offscreen bitmap, this field is not affected.

Offscreen Bitmap:  If JPEGView has created an offscreen buffer for the current image, its size is displayed here; otherwise, it will read ÒNo bitmap.Ó

Free Memory:  This represents the amount of memory JPEGView has remaining.  Note that, unlike previous versions, this takes into account the extra memory JPEGView sets aside for internal use (about 100k).  Therefore, donÕt be worried if you see Ò0KÓ on this line Ñ more than likely, JPEGView still has a comfortable amount of memory to work in.


The Comments floating window

JPEGViewÕs Comments floating window allows you to view comments extracted from GIF files, JPEG files, and from JPEG-compressed PICT files.  To make the Comments floating window visible, select Show Comments from the Windows menu (or type `).  When the window appears, it will contain the text of the comments, or ÒNo comments foundÓ if the image contained no comments.  The Comments floating window is also automatically resized to display the full text of any comments.

JPEGView also provides a mechanism for automatically hiding and showing the Comments floating window depending on whether the active window has any associated comments.  The Preferences Options chapter explains how this operates in greater detail.  If you leave this option off, you can find out whether the active image contains any comments by looking for a diamond mark next to the Show Comments/Hide Comments menu item.

Finally, like the Statistics floating window, you can drag the text out of the Comments floating window and into another application which supports drag and drop (assuming you are on a drag-aware system).


The Colors floating window

The last of JPEGViewÕs floating windows is the Colors floating window, which displays the current set of available colors on whichever monitor the window is currently residing.  This is most useful on screens with 256 or fewer colors, where the selection of available colors becomes important for improving image quality.  For screens with Thousands or Millions of colors, four smooth bands of red, green, blue, and gray are displayed, ranging from darkest to lightest.

To make the Colors floating window visible, select Show Colors from the Windows menu (\).  To hide it again, choose Hide Colors from the same location.  As an interesting aside, the Colors floating window can be positioned across two or more monitors, in which case it will display the color set for the screen which can display the most colors.