Viewing Images

At its heart, JPEGView is a simple image viewer, designed to provide a high-quality screen image in as little time and with as little fuss as possible.  Opening images for viewing is as simple as with most any other Macintosh application: select the Open menu item from the File menu (or type O), choose your image file in the dialog box, and let JPEGView do the rest.  Closing an image just requires clicking in the close box or choosing Close from the File menu (W).  For its basic operations, JPEGView works just as youÕd expect.

Beyond these simple operations, however, JPEGView supports a rich variety of features which allow even easier navigation through your image files.  This chapter describes how these features work in greater detail, under JPEGViewÕs normal, or ÒdefaultÓ settings.  Like many Macintosh applications, the exact way JPEGView works can be changed by altering the settings presented in the Preferences dialog box, available under the Preferences item in the File menu.  For a precise description of how these changes affect JPEGViewÕs operation, see the chapter on Preferences Settings.


Opening images, with and without previews

When you choose Open from the File menu, what you get back is not the usual dialog youÕre used to.  Fortunately, all the basic features are still there, allowing you to select a file to open in the usual manner.  But JPEGView offers you two important additions: the ÒShow PreviewÓ checkbox and the ÒScan for Image FilesÓ button. 

If youÕve used QuickTime applications before, you have undoubtedly encountered the ÒShow PreviewÓ option in your Open dialogs.  The principle is simple: in certain types of files which QuickTime understands, a preview (a.k.a. thumbnail) image can be stored along with the original image data.  This preview image is simply a small (usually about 80 pixels square) representation of the full image contained in the file.  This allows you to see in advance what you will get once you open the image file, before having to actually open it and wait through the full decompression of the image inside.

To turn the previewing feature on, simply check the ÒShow PreviewÓ box beneath the file list.  In response, the Open dialog will expand horizontally to include a new Preview area, where these small preview images will be displayed.  Once you have done this, you can view the preview stored in an image file with just a single click on the name of the file in the list.  If the file you select contains a preview image, it will be read from disk and displayed in the Preview area after a second or so.

If the ÒShow PreviewÓ box is checked and you highlight an image file which has no preview, the ÒCreateÓ button beneath the Preview area will become active, allowing you to automatically create a preview for that image inside the Open dialog.  Occasionally when you select an image file, the ÒCreateÓ button will change to an ÒUpdateÓ button and become active; this simply means that the preview stored with the image isnÕt up-to-date.  To remedy the situation, click on the button to create an updated preview.

Finally, if you do not wish to see previews anymore Ñ they can be slow at times, especially from slower disks like floppies and CD-ROMs Ñ you can always uncheck the ÒShow PreviewÓ box, which will return the Open dialog to its normal, skinnier size.  QuickTime handles the job of remembering whether you checked this box the last time you used it, so that the next time you run a QuickTime application (including JPEGView), this option will be left as you last set it.


The JPEGView JFIF Preview extension

Preview images are very nice, but unfortunately not all previews are created equally.  JPEGView, together with QuickTime, provides support for viewing preview images for almost all image types automatically, without any special mechanisms.  However, there is one limitation, and one exception to this feature.

The limitation is that although JPEGView can create previews when saving any of its supported image formats, QuickTime only knows how to create previews for PICT images; this means that the ÒCreateÓ button under the Preview area will always be dimmed when a non-PICT image is selected.

The exception to free preview images is the JFIF file format, which has a preview format all its own.  In order to display these special previews, you will need to install the JPEGView JFIF Preview extension, which ships with this release of JPEGView.

To install the JPEGView JFIF Preview extension on your Macintosh, simply drag its icon on top of your System Folder icon, or manually place it in the Extensions folder within your System Folder.  You will need to restart your computer to get QuickTime to notice the new extension, after which you should be able to see JFIF previews effortlessly, even from within applications other than JPEGView.

It is important to realize two quirks about the way this extension works.  First, you will notice that the ÒCreateÓ button under the preview is always dimmed; this is simply because the JPEGView JFIF Preview extension was not designed to allow you to create previews from within the open dialog.  To create JFIF previews, you need to open the image and save it back again with the preview option checked in the Save dialog.  This technique works equally well with other non-PICT images; see Saving Images for a full description of this procedure.

The second quirk relating to the JPEGView JFIF Preview extension is that it will not display an icon at the bottom of your screen during startup.  However, donÕt worry Ñ as long as itÕs in your Extensions folder, you can be fairly certain that it has, in fact, loaded successfully.


How to see images that donÕt appear in the file list

Sometimes you may receive a file that JPEGView doesnÕt immediately recognize as a valid image file.  This is especially true if you have copied an image from a BBS or from another type of machine.  In order to draw up the list of files as quickly as possible, JPEGView initially checks only the FinderÕs file type information.  Although this works quickly, it is possible (and sometimes inevitable) that the FinderÕs information about a file is incorrect.  For example, when you double click on such an image, the Finder doesnÕt know what to do with it, or which application it should use to open the file with.

So how do you get JPEGView to recognize these other files?  This is where the ÒScan For Image FilesÓ button comes into play.  Clicking on this button does two things: first, it checks all the files in the folder you are currently viewing for valid images.  In order to make sure the Finder isnÕt lying, JPEGView actually opens each file and peeks inside at the contents.  This works well, but be forewarned: if there are a lot of files, it can take some time!

After it has finished checking all the files, JPEGView then goes through the list and fixes the FinderÕs information about these files.  This means that in the future, the files that were found will appear in the Open dialog without any further intervention on your part.  Plus, when you double click on these ÒfixedÓ files in the Finder, JPEGView will automatically load and open them for you.  (If you have the folder visible on the desktop, you will see the icons for these files change to JPEGView icons after several seconds.)

Unfortunately, certain graphics formats do not lend themselves well to automatic identification in this manner.  Specifically, it is impossible to guarantee successful identification of MacPaint and Startup Screen files, apart from what the Finder says about them.  For this reason, JPEGView requires that the FinderÕs information properly identify such files; incorrectly-typed files in these formats will give you an error if you attempt to open them.

If you think that you might have a MacPaint or Startup Screen image with the wrong Finder file type, drag and drop its document icon onto the MacPaint AutoTyper or the Startup Screen AutoTyper application as appropriate.  This will force the Finder information to properly identify the file, and may allow JPEGView to open it successfully.  For more information about the AutoTypers, see the chapter on File Formats and File Types.

Under certain circumstances, it is possible that the FinderÕs file type information cannot be changed.  For example, if your incorrectly identified files are all on CD-ROM, there is no way to modify the information contained on the disc.  To allow you to view such files, JPEGView supports an Import option, also available under the File menu (or by holding down the Shift key as you type O).  This will give you a dialog identical to the Open dialog, only showing every file available, regardless of what the Finder has to say about it.  Of course, JPEGView can still only open image files it knows about, but at least importing them means that they are all visible to you.


What happens to the images when theyÕre opened

Once youÕve chosen an image file in the Open dialog, JPEGView loads the file into memory and immediately attempts to verify that the file does in fact represent a valid image (remember that the Finder isnÕt always correct!)  If the image passes this test, but its Finder information was incorrect, JPEGView will quietly fix this for you, to help keep everything in order.

At this point, JPEGView also checks the size of the image you opened, comparing it to the size of your preferred monitor.  If the image is too large to fit vertically on your screen, JPEGView will ask you if you wish to open the image in a full screen window.  The advantage of full screen windows is that they have no title bar and hide the menu bar, giving you a little extra height in which to view the image.  The Special Effects chapter describes how JPEGViewÕs full screen windows work more comprehensively.

If the image you have opened is a high-color image (with thousands or millions of colors) and your screen is only capable of displaying 256 or 16 colors, JPEGView will then perform two-pass color reduction on the image to find the best set of colors for display.  Because this process requires JPEGView to decompress the image, a progress window is displayed to let you know how far along JPEGView is.  For more information on exactly what two-pass color reduction is and how it helps image quality, see the chapter on Colors and Color Reduction.

Once everything is ready, a new window is opened on your desktop, and the image is decompressed.  During the decompression process, the bottom right-hand corner of the imageÕs window will display a progress message, keeping you informed of how far along JPEGView is in decompressing the image data.  Additionally, JPEGView indicates when it is performing a scaling or dithering operation by changing the progress message from ÒDecompressingÉÓ to read ÒScalingÉÓ or ÒDitheringÉÓ as appropriate.

An important distinction between JPEGView and nearly every other image viewer available is the fact that JPEGView automatically shrinks large images so that they fit on your screen without any distortion.  This is important not only because it allows you to always see the full image at one glance but also because you can easily select the area of interest when you do decide to zoom in and look at the details.  It also means that you donÕt lose the extra area taken up by scroll bars, which is an important consideration for those with monitors smaller than 14Ó.

The amount of time it takes to decompress a given image can vary widely, from under a second for a small uncompressed image to over three minutes for a huge JPEG-compressed image.  JPEGView has been designed to give you nearly optimal speed for all compression methods.  If the wait becomes too tedious, however, you always have the option to abort the drawing procedure by pressing either the Esc key on your keyboard, or by typing a period while holding down the   key.  When you abort the drawing in this manner, JPEGView will fill in the remaining area with a pattern of XÕs, to let you know why it wasnÕt drawn.


Fast and slow window updating

Memory requirements for most image viewers are stiff, usually on the order of several megabytes for even reasonably sized JPEG files.  This is because they require you to give them enough memory to decompress the whole image at once and store it offscreen for future use.  While this may be simple and fast for scrolling around, if you try opening more than a couple of decent sized images you may be wondering why 20 megabytes of RAM doesnÕt seem like so much anymore.

Once again, JPEGView takes a different approach.  Internally, the workings of JPEGViewÕs memory management are a little complicated, but on the surface all you see is that some windows will redraw themselves immediately, while others need to have their images decompressed before display.  This is known as fast updating and slow updating, respectively.  HereÕs how it all works:

When JPEGView first loads an image, it attempts to create an offscreen copy (called an offscreen bitmap) of what you see on the screen.  It is important to realize that this offscreen bitmap need only be the size of the image you see on the screen, and not the size of the original image.  This means that the amount of memory needed for the bitmap is only dependent on how large your screen is, and not on how large the original image was, which is precisely what most other image viewers require of you.

If it turns out that there isnÕt enough memory available to make an offscreen bitmap for an image, itÕs all right; JPEGView can do without it.  But if there is enough memory, this offscreen bitmap allows JPEGView to redraw obscured portions of that imageÕs window instantly.  This is known as fast updating and can only be achieved if there is an offscreen copy of what you see on the screen available in memory.

Notice that JPEGView does not require this offscreen bitmap.  This is important, because when JPEGView realizes that it needs more memory, it will cheerfully get rid of enough of these offscreen bitmaps to make room for other, more important things.  If you later close other images and free up more memory, JPEGView will quietly re-create these offscreen bitmaps; until then, such images are resigned to using slow updating, which means they have to be decompressed to be displayed again.  When part of such a window needs to be updated, it is filled in with a sparse pattern of dots until JPEGView decides there is time to do the slow update.

Of course, all this happens behind your back, so you never need to worry about it explicitly.  What you actually see is this fast and slow updating.  Fast updating always occurs immediately, whereas slow updating Ñ because at times it can be really slow Ñ is postponed until later, so that if youÕre in a rush and know what you want to do, you do not need to wait for it to happen.  JPEGView determines this by waiting until you leave it alone for five seconds.  Once you do this, it will begin doing all its slow updating one window at a time, from frontmost to backmost, waiting two and a half seconds between each to let you do something else.

ItÕs a simple matter to see the difference between the two types of updates: fast updates immediately replace the obscured portion of the window, while slow updates paint the obscured area with a sparse pattern of dots until a full update is done.  This lets you know that JPEGView is not ignoring the obscured area, only waiting a few seconds before updating it.  Even if a slow update is in progress, you always have the option of stopping the decompression either by pressing the Esc key, or by typing a period while holding down the  key.


Switching between JPEGViewÕs windows

With JPEGViewÕs sparse memory requirements, it is possible to have many images open at once, even with only a megabyte of RAM available.  In order to facilitate movement between these different windows, JPEGView has several useful windowing commands, as well as a slide show option Ñ described later in the Slide Show chapter Ñ which can cycle through all the images in memory.  With the exception of the slide show, all of JPEGViewÕs window navigation commands can be found in the Windows menu.

The most direct way to bring a given imageÕs window to the front (apart from clicking on the window itself) is by selecting it from the Windows menu.  As you open images in JPEGView, their window titles are added to the bottom of the Windows menu for immediate access to every image currently in memory.  Additionally, the first nine windows added to this list are assigned to the keyboard shortcuts 1 through 9, for even faster switching.  You can quickly identify which window is currently active by looking for the entry in the list with a checkmark beside it.

In addition to an entry for each open window, the Windows menu contains the Next Image (+) and Previous Image (Ð) items.  With these two options you can cycle forward and backward through the list of open images.  Finally, the topmost items in the Windows menu control the visibility of JPEGViewÕs three floating windows (sometimes called ÒwindoidsÓ).  Floating windows are a special type of window whose behavior is independent of the other standard windows.  See the chapter The How and Why of Floating Windows for a description of how they work and what information they convey.


Putting things away

Once youÕve mastered the art of window navigation, getting rid of the images seems a rather simple exercise.  As you would expect, the close box on the window, the Close item in the File menu, and the W shortcut all close the active window, releasing any memory used by the associated image.  Further, the convenient Close All Images option (Shift-W) quickly closes up all open image windows Ñ but not the Help window, the options dialogs, or any visible floating windows.  This allows you to keep those windows open and available at all times, even letting you close all the image windows while they are active.

You can also close several open windows at once by holding down the Option key as you click in the close box on one of the windows.  If you option-click the close box of a floating window, JPEGView hides all floating windows; doing the same thing in a standard window closes all open standard windows (this time including the Help window and the options dialogs).


Printing images

In addition to all of this, JPEGView also supports a rather simple method for obtaining a hardcopy print of an image, assuming your printer properly handles printing of color images.  If youÕre not sure whether your printer provides this support, simply try it out and see how the resulting image comes out.  Either youÕll like it or you wonÕt; if you do, youÕre in luck.  If not, cÕest la vie.

Before printing an image, you will likely want to choose Page Setup from the File menu to set the paper direction (portrait or landscape) and other options.  Once set, these options are saved and remembered until you change them again.  From there, you can go ahead and choose Print (P) from the File menu; this will give you some more options, depending on which type of printer you are working with, and then let you start the ball rolling.

JPEGView then puts up its familiar progress dialog, telling you how far along it is in printing the image, and proceeds to dump the image to the printer.  Note that at this time, you have no control over what size the resulting image is printed at.  JPEGView always scales the image to fit the current paper size, with half-inch margins on all four sides.  Thus, printing an image from JPEGView will always give you a single-page printout.