SwiftJPEG icon

SwiftJPEG v1.10 User Guide
22-Feb-2005

Hipposoft logo

Reading this guide

This guide makes extensive use of alpha-blended transparent PNG images as well as cascading style sheets features for both presentation and section numbering. On user agents that do not support CSS, it should still be easy to read but note that some of the presentation will suffer, printing may not work as well as with a capable CSS browser and some section numbers will be absent. If you want to find out more about how the section numbering works, read about ‘generated content’ here.

More information on this issue can be found in the appendix “About this document”. Before using SwiftJPEG, please also read the Disclaimer.

Contents

Main contents

  1. Reading this guide
  2. Contents

    1. Main contents
    2. Appendices

  3. Introduction
  4. Why use it?
  5. Starting SwiftJPEG
  6. Viewing images and the File List
  7. The Display window
  8. Menus

    1. Main menu
    2. Picture menu

  9. The Zoom box
  10. Limitations with zooming
  11. Full Screen mode
  12. The Choices dialogue box

    1. Display section
    2. Desktop actions section
    3. Full Screen actions section
    4. Full Screen behaviour section
    5. Full Screen fade-in and Full Screen fade-out sections
    6. Miscellaneous section
    7. Buttons

  13. Using SwiftJPEG on RISC OS 3.1 and RISC OS 3.5

    1. RISC OS 3.5
    2. RISC OS 3.1
    3. Where do I put the modules?
    4. Other issues for older operating systems

  14. Using SwiftJPEG's Full Screen mode and ViewFinder

Appendices

  1. Contacting the author
  2. Thanks
  3. Technical notes

    1. Use of Alt+Break
    2. Troubleshooting - stripy images and ColourTrans aborts

  4. Development history
  5. About this document
  6. Disclaimer

Introduction

SwiftJPEG is a viewer for JPEG images. These are a particular kind of image common on the World Wide Web and used by most digital cameras.

The application runs on RISC OS 3.1 through to RISC OS 5. To run on RISC OS versions 3.5 and earlier you have to load some support modules (described later). RISC OS 3.6 and later need no additional software.

Why use it?

SwiftJPEG provides a fast and convenient way to view JPEG images without using a lot of the computer's memory. On a RISC OS 3.1 machine with the relevant modules loaded, SwiftJPEG provides a chance to view images that would normally be far too large to fit in memory using the conventional mechanism of decompressing the image using something like ChangeFSI.

On RISC OS 3.6 upwards, the Draw and Paint applications can both read JPEGs directly. Draw keeps the image as a JPEG, but Paint decompresses the image completely, which means a large JPEG can require a very large amount of RAM to be viewed. Neither application is designed purely as a viewer for images; both are designed as editors for other kinds of material. SwiftJPEG fills this gap.

Starting SwiftJPEG

To start SwiftJPEG, double-click on the application. It can be run directly from a read-only medium such as a CD-ROM or archive, though if you want to be able to save Choices settings, you must copy the !SwiftJPEG application directory to a writable location such as a hard disc. SwiftJPEG can also be started by double- clicking on a JPEG file once the Filer has 'seen' SwiftJPEG.

Viewing images and the File List

When SwiftJPEG is running, you can drag JPEG images to the icon bar icon to load them. They do not have to have the correct filetype (&C85) set first. Double- clicking on an image which does have the correct filetype will usually load it too, though if you have any other applications running which can also load JPEG images this way, one of those might catch the image first.

A collection of images can be loaded by either selecting a group in the Filer and dragging that selection to the SwiftJPEG icon bar icon, or by dragging a directory to the icon bar icon. In addition, by default, if you just drag on a single image SwiftJPEG will search the rest of the directory from which the image came for any other files of filetype &C85 and will queue these for viewing too. It'll still load the image you asked it to load first. When you drag on a directory, SwiftJPEG searches the contents for any files of type &C85 and looks in any subdirectories it finds as well, so you can load a complete collections of images very easily. With directories, once SwiftJPEG has queued all the JPEG files available, it will load the first one it found.

All queued files are held in the File List, which is kept for as long as SwiftJPEG runs or until you next try to load one or more new files by dragging them to the icon bar icon or double-clicking on them. You can easily move through the file list to browse through the various queued images. Navigation through the file list is described later.

The Display window

Using the default settings, whenever SwiftJPEG loads a JPEG image it shows it at 1:1 scaling in the Display window on the RISC OS Desktop:

Display window

Clicking with SELECT (the left mouse button) on the icon bar icon will bring the window to the front of the stack, in case it has been hidden by other windows. If you close the window, the JPEG image is removed from memory but can easily be reloaded using the main menu (see later). If you click on the window with SELECT or ADJUST (the right mouse button), it will gain input focus and the following keys can be used:

If you press MENU (the middle mouse button) the main menu opens. This can also be opened by clicking MENU over the icon bar icon. Dragging with SELECT from within the Display window to a Filer window saves a copy of the image using the same leaf name as the original. This is really useful if you are previewing a set of images, only wishing to keep some of them. You can have a Filer window open for the directory of the images you want to keep, flick through the original images with the arrow keys or main menu (see below), and drag directly from the Display window to the Filer window to save copies of those that you like.

Menus

Main menu

The main menu is shown on the right. Main menu It contains the following options:

  1. Info

    Move the pointer to the right to display some information about the version of SwiftJPEG in use.

  2. Zoom

    Move the pointer right to open a small window that lets you zoom in or out of the current image. The window is described in more detail later.

  3. Picture

    Move the pointer right to display the picture menu (see below). Greyed out if no image is loaded.

  4. Full Screen...

    Shows the currently loaded image in Full Screen mode. A large amount of SwiftJPEG's functionality is wrapped up in Full Screen mode, which provides a flexible set of slideshow and viewing options described in full in their own section later.

  5. Next image

    Go forwards in the File List to the next image relative to the one currently being viewed, or recently loaded. Greyed out if there is no next image to load; this is usually because you have reached the last valid item in the File List.

  6. Reload image

    Reload the most recently loaded image. Greyed out if no images have yet been loaded, or if there is no valid item available to be loaded.

  7. Previous image

    Go backwards in the File List to the previous image relative to the one currently being viewed, or recently loaded. Greyed out if there is no previous image to load; this is usually because you have reached the first valid item in the File List.

  8. Choices...

    Open the Choices dialogue box. This is explained in more detail later.

  9. Quit

    Shut down SwiftJPEG. This option is only available when the main menu is opened from the icon bar icon.

Picture menu

The picture menu is accessed through the main menu and is shown below:

Main and Picture menus

The two options are:

  1. Info

    Move the pointer right to open the Picture Information dialogue box. This gives a description of various attributes that the image has, such as its size and the date stamp on the file:

    Picture Information dialogue

    The first four lines give the image pathname, size in bytes, and height and width in pixels. These are always filled in.

    The next three lines (camera make, model and picture date) come from information contained within the JPEG itself. Some JPEG images, but not all, contain this extra detail. It is particularly common in images from digital cameras. ‘Picture date’ usually tells you when a photograph was taken. Since it is contained within the image itself, the picture date is independent of the date stamp on the file, which is an external property maintained by the file system on which the picture lies. You can make copies of the file, for example, and they will be stamped with the date on which they were copied, without affecting the internal record of when the image was created. If any of the three fields are not present in the JPEG image or are in a format which is not understood, ‘Unknown’ is shown.

    The last entry in the dialogue box gives the date stamp on the file itself. This lets you know when the image was stored on disc, or copied, but is not necessarily a reflection of when the image was originally created. The information is always filled in.

  2. Save

    Move the pointer right to open the Save Copy dialogue box. This is a standard RISC OS save box; drag the icon to a Filer window to save a copy of the file, typing in a new filename if you want one, or type in a complete pathname and press Return or click on the OK button to save the picture.

    Save As dialogue

    If you just want to make a copy of an image in a new directory, you can drag straight from the Display window to a Filer window to save a copy using the same leafname as the original image.


The Zoom box

The zoom box is accessed from the main menu:

Main and Zoom menus

The three radio buttons provide options as follows:

At the bottom is a slightly cryptic option button, “Only < 1:1”. This restricts the scale factor used for the “fit” or “fill” options so that an image is only ever shrunk down to fit on screen, but never scaled up. When JPEG images are scaled up, they become blocky (you can more easily see the individual pixels that make up the image).

You may not like this blocky effect, but may still want to be able to see the whole image without having to scroll around. If so, turn on this option. Now, small images will not be zoomed in to fit or fill the available viewing area, but large images will still be zoomed out so that you can see the whole picture.

Limitations with zooming

  Dithering at 1:1 zoom
Above: 1:1 zooming

Dithering at 6:1 zoom
Above: 6:1 zooming

Dithering at 1:3 zoom
Above: 1:3 zooming

The zooming done by the OS JPEG plotting routines is fast but not high quality. If the screen mode for the Desktop supports less than 16M colours and in particular 256 colours or less, you will see that images scaled up above their normal size look very “speckled”. This is because the OS does something called dithering to make an image look better in a lower number of available colours on screen, but this relies on pixels being small and hard to individually make out. The first picture on the left shows a section of sky from a digital photograph dithered down to 256 colours - it looks fairly smooth.

When an image is scaled up, the OS scales the dithered pixels too, so they become very easy to see. It would be better if the OS scaled the pixels from the JPEG image first, then dithered the result as if it were one much larger image, but at the time of writing it does not do this. The second picture on the left shows a zoomed section of the same sky picture from above.

When the OS routines zoom out of (scale down) an image they just stop plotting rows or columns as required to make the image fit with the requested scale factor. No attempt to spread errors from neighbouring rows or columns is made. This can create a “stepped” look to sloping edges and have an odd effect for patterned parts of images, such as chequered fabrics or metal gratings. If you are in a mode with less than 16M colours, then again the dithering issue crops up. This time, dithering pixels that were being used to simulate more colours than are really available get removed as rows or columns don't get plotted. Images will often take on a mottled appearance, as shown in the third image on the left.

Again, it would be better if the OS scaled down the original image, then dithered the result, but this is not how things work at the time of writing.Ultimately, if you are in a display mode with 16M or 32K colours available, scaling works reasonably well. In 256 colours or less, the display quality will be fairly poor, particularly if an image is scaled down (zoomed out) - you may be best off sticking to 1:1 scaling.

Full Screen mode

SwiftJPEG includes a way of viewing images full screen, without the Desktop visible. It can be told to operate a slideshow, waiting for a predefined number of seconds before advancing automatically to the next image. You can set up fades on RISC OS 3.5 or later; the drawing of the JPEG is hidden, then the image is faded smoothly in from black or ‘flashed in’ from white. It can be faded or ‘flashed’ back out again too; both actions are independently configurable with a range of different fade speeds available.

Some points to note:

The keys defined for Full Screen mode are as follows:

Key Zoom up Key Zoom down
1 1:1 6 1:1
2 2:1 7 1:2
3 3:1 8 1:3
4 4:1 9 1:4
5 5:1 0 1:5

Various overlaid items are briefly shown in the bottom left hand corner of the screen in response to some key presses. They indicate that a particular change has been made, as follows:

Normal zoom    Normal zoom (1:1)
Zoomed in    Zoomed in (>1 : 1)
Zoomed out    Zoomed out (1 : >1)
Fit to screen    Fit to screen (no cropping)
Fill screen    Fill screen (cropping if necessary)
Slideshow paused    Slideshow paused

You cannot scroll around an image in Full Screen mode, to view parts of it that have been cropped off the edges of the screen due to a particular zoom setting. That's what the Desktop is there for!

Many features of Full Screen mode as described above can be changed using the Choices dialogue box, described in the next section.

The Choices dialogue box

Accessed from the main menu, the Choices dialogue box provides an extensive array of options that modify SwiftJPEG's behaviour. To help make those options less bewildering, the dialogue box is separated into several groups as shown below:

Choices dialogue

Display section

On the left hand side of this section is a way to control dithering - dithering is a way of showing images with lots of colours in screen modes with fewer colours. For example, if the screen mode only has red and yellow colours available, orange can be simulated by making a pattern of alternating red and yellow pixels. If the pixels are small, the effect is quite successful. The RISC OS JPEG routines provide three dithering settings - a high quality mode, which gives good results but is quite slow; a medium quality mode, which produces average to poor results but is quite fast; and no dithering, which gives the fastest display but low quality output.

Dithering menu

If you are using a 32K or 16M colour screen mode, these options will have little or no visible effect; in 256 colours or less the settings will have a very obvious impact. Note that on RISC OS 3.1 it is not possible to use dithering in 16 colours or less as the OS routines do not work properly in such cases; SwiftJPEG automatically turns off dithering in such cases, and will turn it back on if you return to a 256 colour mode.

On the right of the Display section is the Full Screen mode selector. This is how you tell SwiftJPEG the way in which it should choose the screen mode for full screen display. The best choice will depend on your machine's capabilities, the kind of images you are viewing, and the reason why you are viewing them:

Full Screen menu

Finally, you can type in a mode number (RISC OS 3.1 upwards) or mode selector string (RISC OS 3.5 upwards only) if you want to specify an exact mode to use. This is most commonly used when using image double banking - more on this later.

Desktop actions section

Desktop actions section Here you control how images are handled in the Desktop. The “Ignore image errors” option suppresses errors that occur when trying to load a picture in the Desktop. It can be useful if you are browsing through a group of pictures and don't want to be interrupted by error boxes if one or two of them cannot be shown for some reason. Normally this setting is disabled, so you get told about problematic images. The default zoom setting for the Desktop is chosen here too:

Zoom Setting dialogue

The options are all analogous to the Zoom box shown from the main menu. You can select a fixed zoom setting, fit the picture to the screen without cropping, fill the screen, cropping if necessary, and set an override which will only shrink, but never enlarge images (“Only scale down” is analogous to the Zoom box “Only < 1:1” option).

Full Screen actions section

This section works in exactly the same way as the “Desktop actions” section, but applies to images shown in Full Screen mode. By default the ignore errors option is on.

Full Screen behaviour section

Full Screen behaviour section Here, further aspects of SwiftJPEG's behaviour in Full Screen mode may be modified.

A timer can be given for slideshows. Zero waits for a key press before moving onto the next image. Non-zero values give the number of seconds for which to wait before moving to another image automatically. The slideshow advances forwards through the images, or runs backwards if you press a key to view a previous image during the show - so you can have the slideshow advance forwards or backwards through the images as you see fit.

With “Always show images in Full Screen mode” you can choose if images, when loaded, are automatically shown full screen rather than in the Desktop. You can also choose if only the contents of directories are automatically shown full screen with “Always show directories in Full Screen mode”. This lets you view individual images casually in the Desktop, but easily start a slideshow by dragging on a directory full of pictures.

Using “Close Display window after Full Screen view” you control whether or not the image most recently shown in Full Screen mode stays loaded and visible in the Display window, or is closed, when you return to the Desktop.

Finally, you can try to use screen banking to store the next image by turning on “Use screen banks to cache next image”. To explain this: RISC OS supports the idea of having more than one copy of your screen display. One copy can be redrawn whilst the monitor is displaying another, so the action of redrawing is hidden. Normally, you see RISC OS plotting the JPEG with SwiftJPEG (it ‘rolls’ up the screen). Using screen banks, the plot is hidden and the switch from one image to another is virtually instantaneous.

SwiftJPEG also uses the time while you're looking at a ‘current’ image to load and draw the next one in the screen bank you can't see. Thus, you don't have to wait around when you want to move to that next image - it's instantly available. SwiftJPEG always assumes that if you just went to a 'next' image, it should load the next one after that too, or if you went to a ‘previous’ image, it should load the one just before that as well. However, if you change direction - say you were viewing images forwards, then asked to go backwards, or vice versa - there will be a delay, as the wrong image was cached in the screen bank, so SwiftJPEG has to throw it away and plot the correct one.

There has to be enough video RAM available to store two copies of your screen mode for banking to work, and the screen mode cannot change between banks. If you ask SwiftJPEG to find the best fit mode to the picture, banking can't work as the screen mode may change between images. If you ask SwiftJPEG to use the most colourful or biggest mode, on some machines banking might work but usually it won't - your machine's video RAM is probably already almost full with just one copy of the highest resolution or most colourful mode that it is capable of displaying. This is where the ability to specify your own fixed screen mode comes in handy - if your machine can do one bank at 800x600 at 16M colours, say, it'll be able to do two banks at 800x600 in 32K colours.

Some extension graphics cards don't support screen banking - some versions of the Viewfinder firmware do not, for example. Screen banking is also less useful on machines with more limited graphics hardware as you might have to make heavy sacrifices on image quality to be able to fit two screen banks into your machine's available screen RAM. This is why it is turned off by default - image quality is prioritised over speed of display. That said, if SwiftJPEG cannot use screen banking, it just falls back to its normal way of displaying images. There are no ill effects from trying to use banking but not being able to, so if you like the fast switching effect, you can leave it turned on.

Full Screen fade-in and Full Screen fade-out sections

Full Screen fade-in and fade-out sections These sections are only available on RISC OS 3.5 upwards. On earlier versions, they will be greyed out. When a fade-in option is selected, the JPEG image is plotted with the screen set to black, then (for “Fade from black”) ‘faded in’ to normal brightness, or (for “Flash from white”), from a full white screen to a normal brightness. If you set a fade-out option, then when you move to another image or exit Full Screen mode, the display will be faded back to black (for “Fade to black”), or (for “Flash to white”) to bright white then quickly back to black. These options are most useful if you are creating some kind of slideshow and want to have smooth transitions between images.

The sliders in each section let you control the speed of fading - to fade in or out faster drag the slider down to the left; for a more gentle fade in or out, drag the slider towards the right.

SwiftJPEG uses the same mechanism for fading as the application “Gamma” by Rob Davison, rdavison@xtra.co.nz. If the Gamma application is loaded before SwiftJPEG then SwiftJPEG takes note of any settings made in that application and applies them to the fades. So if you've made everything appear in red-on-black or some other odd setting, this will be accurately reflected in the fade... The !Gamma application is available from, at the time of writing, the AcornSearch FTP archive:

http://www.geocities.com/SiliconValley/7320/softw.htm
http://www.geocities.com/SiliconValley/7320/archives/gamma.zip

Miscellaneous section

Miscellaneous section The number of images that are skipped when pressing the up or down arrow keys is selected in this section of the Choices window. This affects both the Desktop and Full Screen mode. Four other options are available:

Buttons

Buttons The four buttons at the bottom of the window work as follows:

  1. Save

    Permanently save the choices inside the !SwiftJPEG application directory and close the window.

  2. Default

    Restore the values shown in the window to default settings. You can then accept the defaults with the “Save” or “OK” buttons, or discard them with the “Cancel” button.

  3. Cancel

    Throws away any changes you may have made in the Choices dialogue box and closes the window.

  4. OK

    Accepts the settings in the Choices dialogue box and closes the window. The settings are not saved permanently - quitting and restarting SwiftJPEG would lose them. To store changes permanently, use the “Save” button.

Using SwiftJPEG on RISC OS 3.1 and RISC OS 3.5

The RISC OS module “SpriteExtend” was extended in RISC OS 3.6 and upwards to provide the JPEG plotting routines upon which SwiftJPEG relies. To use SwiftJPEG on an earlier version of the operating system it is necessary to either load a later version of the module, or alternative support modules that provide the same facilities.

RISC OS 3.5

There are two fairly simple choices:

  1. Use a new version of the SpriteExtend module. Version 0.99 is in fairly common circulation as it was distributed on the Acorn FTP site for a while, and so is still available in the FTP site archive (see link below). Later versions may also work.

    http://acorn.riscos.com/riscos/releases/spriteextend.arc

    This is a simple and self-contained approach that works well.

  2. Use the JPEGRender and JPEGMsgs modules. These provide the JPEG plotting facilities for RISC OS 3.1 or 3.5. They were distributed with the Acorn web browser Browse, so if you can get hold of those copies, do so - version 1.02 of JPEGRender in particular. In fact v1.02 is a little better than SpriteExtend 0.99, and you won't be replacing a core system module just for the JPEG features with this approach. An older version of the modules can be found in a universal !Boot archive from the same site as SpriteExtend:

    http://acorn.riscos.com/riscos/releases/UniBoot/
    http://acorn.riscos.com/riscos/releases/UniBoot/uniboot.zip

    The modules are in “!Boot.Resources.!System.310.Modules”. These older versions aren't quite as good - no better than SpriteExtend 0.99, so the odd image that might work with the newer modules won't work with these - but still do the job by and large.

RISC OS 3.1

The choices are slightly different for this early version of the operating system.

  1. Again, use the JPEGRender and JPEGMsgs modules. These are easily the best approach for RISC OS 3.1, though dithering will not work in 16 colour modes or less.

  2. You could alternatively try to load a new version of the SpriteExtend module, such as v0.99 originally from the Acorn FTP site. However, this version of the module assumes an operating system feature called Dynamic Areas is available; RISC OS 3.1 does not have this feature. To make the JPEG plotting routines work, you need to use Justin Fletcher's Dummy Dynamic Areas (DDA, or ‘Dummy’) module, version 1.07 or later. This is a patch which provides the relevant features, though you cannot use a RAM disc (RAMFS) when it is loaded. Some JPEGs that might work with JPEGRender may fail with this approach, but on the plus side the DDA module keeps all of its working data in the RAM disc area, whereas JPEGRender dumps it in the RMA. RISC OS 3.1 users are normally all too aware of the module area filling up or becoming too fragmented, so you may prefer to try this alternative method for that reason alone.

    ftp://arcade.demon.co.uk/data/075000/077100/077108

Where do I put the modules?

On either operating system version you will need to put the modules in “!System.310.Modules” (new !System structure) or “!System.Modules” (old !System structure). The filenames are “JPEGRender” for the JPEGRender module, “JPEGMsgs” for the JPEGMsgs module, “Dummy” for the Dummy Dynamic Areas module and “SprExtend” for SpriteExtend.

Other issues for older operating systems

Note that on RISC OS 3.1 SwiftJPEG uses the system sprite area to store the File List. A side effect of this is that only one copy of SwiftJPEG can run at a time on RISC OS 3.1 - RISC OS 3.5 upwards does not have this restriction. You may notice a sprite called “sjpg_filelst” in the system sprite area; this is where the File List gets stored. Don't tamper with this sprite! SwiftJPEG will delete it on exit.

Using SwiftJPEG's Full Screen mode and ViewFinder

Note that on RISC OS 3.1 SwiftJPEG uses the system sprite area to store the File List. A side effect of this is that only one copy of SwiftJPEG can run at a time on RISC OS 3.1 - RISC OS 3.5 upwards does not have this restriction. You may notice a sprite called “sjpg_filelst” in the system sprite area; this is where the File List gets stored. Don't tamper with this sprite! SwiftJPEG will delete it on exit. 12. Using SwiftJPEG's Full Screen mode and ViewFinder If you are using SwiftJPEG with the ViewFinder graphics card in the Desktop, things should work as for any other Desktop application. However, if you want to perform Full Screen mode operations, please note that the level of integration that ViewFinder provides with the OS is insufficient for SwiftJPEG to be able to determine best available screen modes. It will tend to select only modes that were available under RISC OS. When returning to the Desktop, SwiftJPEG will have correctly read the previous mode information, but will not be able to restore it unless it could be displayed without your ViewFinder card present; you will be left in the last selected Full Screen mode.

It is possible to specify ViewFinder-only resolution, colour depth and frame rate combinations using the mode string in the "Full screen mode" menu in the General Choices window. Unfortunately, the operating system will claim that these modes are not available when SwiftJPEG checks for the string's validity, so you must only directly specify screen modes that would work without your ViewFinder card being present.

If you ask SwiftJPEG to enter modes of 4 or 2 colours, it will do so, but under certain ViewFinder card types no usable display will be produced as some do not support 2 or 4 colour modes. If your previous Desktop mode was suitable for ViewFinder only, you will then end up stuck in the 2 or 4 colour mode when you go back to the Desktop. You'll need to use the command line to restore a usable display (e.g. F12, “WimpMode X800 Y600 C256 F60”).

If ViewFinder in future presents a deeper integration with RISC OS, these problems should go away by themselves. It should be noted that this lack of integration is not a bug in ViewFinder - it's simply not implemented, and if it were added in future, it would be added as a feature addition rather than a bug fix. In the mean time, the best bet is usually to select a resolution and colour depth you think would be most appropriate for the batch of JPEGs you wish to view, put the Desktop into that mode, and select “Use current mode” in the “Full Screen mode” menu in the Choices window.

These comments refer to using SwiftJPEG v1.10 with ViewFinder firmware version 1.47. At the time of writing, I have not tested with earlier or later versions of either.

Contacting the author

Snail mail:

Andrew Hodgkinson
52 Beaulands Close
Cambridge
CB4 1JA

E-mail:

On the web - SwiftJPEG:

http://homepage.ntlworld.com/ahodgkin/swiftjpeg/

If the NTL Web space isn't updated or available, try my e-mail address instead. This should stay correct even if the Web site moves.

On the web - personal:

http://www.ampcast.com/pond
http://nines.rowing.org.uk/

Thanks

Hipposoft would like to thank (in no particular order!):

Graeme Barnett and Neil Coffey for feedback relating to SwiftJPEG in the early stages, and particularly Stuart Halliday and Stephen Borrill for various suggestions and bits of info; and everyone else who's e- mailed me about various things since then, including Stuart Bell who made me realise I shouldn't completely drop the Junior manual format in favour of HTML (nearly ten years on, I've finally crossed into the world of PDF!), and was instrumental in getting SpriteExtend released for RISC OS 3.5 users.

John Sullivan and Ben Blaukopf for help on user interface and some programming issues, and for ideas on improving the HTML manual.

Chris Cox of Acorn for a very positive response to my request for a distribution of the JPEG-aware SpriteExtend for RISC OS 3.5 machines, and Charles Whyte of ART, to whom the request eventually got transferred (unfortunately it required a full software license and I couldn't afford the fee); and of course Tim Caspell who later pursuaded ART to do the public release on the Acorn FTP site!

Ragnar Hafstað and Dick Alstein for !BasCrunch v1.02, which was used to compress the original BASIC source.

André Timmermans for pinning down the Select 2 / 4.32 JPEG_Info call bug.

Terry Blunt, Bernard Veasey, Richard Hallas, Paul Sprangers, Daniel Ellis, Chris Walker and Stefan Bellon for putting up with beta versions and providing invaluable suggestions, requests and bug reports.

Many others for feedback, feature requests and beta testing.

Technical notes

Use of Alt+Break

If you use Full Screen mode with bank switching enabled and often kill applications using Alt+Break, you should read this technical note.

A small ARM code routine is installed whilst a JPEG is plotting, which sits looking for key presses whilst the machine is otherwise busy doing the image plot. This allows key presses to be recognised in Full Screen mode when an in-the-invisible-bank banked image plot is happening; you see an hourglass appear until the plot completes, then the key press gets acted upon. Because SwiftJPEG is a Wimp application the period for which the handler is installed must be minimised - Alt+Break could kill the application with the handler still present, and crash the machine. This does mean that for large images (in terms of file size) which may take some time to load, there is still a period when a banked image is loading but is not yet plotting when key presses may be ignored. So if key presses seem to be unresponsive when using image banking, check and see whether this is just because you have large image files that your machine is taking a while to load (you should find that with image double-banking turned off, keys are very responsive once the JPEG image has finished plotting).

Caveat - never use Alt+Break to kill SwiftJPEG when it is running in Full Screen mode unless you are sure that it is not in the middle of plotting an image off-screen. If you use Alt+Break whilst a banked JPEG plot is in progress, the interrupt will happen immediately after the plotting SWI completes but before the handler gets removed. If you choose to kill SwiftJPEG, your machine will crash. It is perhaps a shortcoming of RISC OS that utilities like this require implementation within modules rather than applications to run safely.

Troubleshooting - stripy images and ColourTrans aborts

If you find certain JPEGs do not plot properly - they are stripy - then they've probably been rotated, using a flag in the image header. SpriteExtend 0.99 and JPEGRender up to 1.02 do not handle this properly. However, a patch is available that fixes the problem. Search on Google Groups (http://groups.google.com/) for details.

Some people reported aborts in ColourTrans with RISC OS 3.1 under Virtual A5000. I have tested JPEGMsgs 0.01/JPEGRender 1.00, JPEGMsgs 0.01/JPEGRender 1.02, and SpriteExtend 0.99/DDA 1.08 beta with the ROM ColourTrans and all worked. I then soft-loaded ColourTrans 1.57 as well; now only the newer JPEGMsgs 0.01/JPEGRender 1.02 combination worked - both the older JPEGRender and SpriteExtend failed with an abort. If you see aborts, check to see if your ColourTrans module has been updated, for example by other installed software.

Development history

Version 1.10 (11-Sep-2004)

Incorporating changes from 1.10 beta versions, plus a rewritten PDF manual, slight rearrangement of the Choices window template and change to the !Run file to load SpriteExtend 0.99 as well as JPEGMsgs/JPEGRender/Dummy. Version is feature complete according to informal specification of new features based on feature requests and ongoing beta testing.

Version 1.10-B5 (June 2004) Known problems

Menus aren't all closed when a new image is loaded. Since it doesn't seem to be possible to close a specific single menu, this does mean that the main menu, if open, ends up "behind" the display window if a new image is loaded using, say, the cursor keys. It's the lesser of two evils as it allows Director menus and similar to stay open.

Version 1.10-B5 (June 2004) New features

Position of mouse pointer is restored as well as the screen mode when exiting full screen view (this might be considered a bug fix).

The Zoom window for a loaded image now carries three radio buttons, which when the window is first opened after loading a new image will reflect the zoom settings for the Desktop as specified in the Choices window. You can modify the zoom setting for just the loaded image using the radio buttons and the zoom values if you wish, and an "Only < 1:1" option button - which means "don't automatically scale up above 1:1" - is present and used for the "Fit to area" and "Fill area" choices. This all matches similar options available in the Choices window. When you reload the image or load a new image, it will revert back to the Choices settings. When the temporary zoom setting is changed, the Display window resizes to fit the new settings, both increasing or decreasing size as required. In earlier versions the window tried to maintain the previous size which wasn't usually what you wanted it to do. Note that any temporary zoom setting in the Desktop is reset to the Choices values if you go into and back out of Full Screen mode.

Double-clicking with Select or Adjust on the Display window enters Full Screen mode, just as if "Full screen" were chosen from the menu. Dragging with Select in the window allows you to save the current image with a default filename (the same leafname as when the image was loaded, or ScrapFile for application-to-application transfer items). This makes it easy to work through a set of images and see if you want to keep them - save the "keepers" into another directory, say, and just drag from the window directly without having to use the menu and Save As dialogue box.

Title bar in "Save as" window change to "Save copy" to highlight that a copy of the image is being saved; SwiftJPEG still reloads the image from its original location and continues to load other images from the group / directory related to the original image location.

Doesn't reload the current image when going into Full Screen mode now.

Input focus is given to the Display window if it is reopened by clicking with Select on the icon bar. An iconiser is told that the window has closed too, as this seems to be the only way to get it to remove the icon if we re-open the window "under its feet". Broadcasting this Message_WindowClosed message seems to be the defined way to do it, but the window isn't closed at all. This is a broken part of the protocol.

The Close icon has been removed from the info windows; whilst I prefer to have it as the windows have no other buttons (unlike Save As), on RISC OS 4 it introduces an iconise icon which if accidentally clicked on can cause problems. Iconising with Shift+Click on the close icon also gives undesirable side effects so it's better to get rid of it.

For pictures with EXIF information - typically those taken by digital cameras - the camera make and model, and the picture's internal record of its creation/modification date, will be extracted where possible and shown in the picture information window. The date stamp for the actual physical file itself is also shown (the two usually differ because the picture has been copied out of the camera onto some filesystem some time after it was originally taken). In Full Screen mode, the information overlay now shows the picture's creation/modification date if it is available, else it shows the date stamp for the file.

Pressing "I" when the Display window has input focus now opens the picture information window (as a menu) next to the pointer.

Version 1.10-B5 (June 2004) Bugs fixed

Fade in/fade out when used with screen banking appeared to not work, as you had to wait for an image to plot whilst faded out. This was actually waiting for the *next cached bank* image to load, because the fade in was done after, rather than before, the cache call. Moving the point where the fading is done gives a much more pleasing result with the fade in and out appearing to move from one image to the next instantly and the hourglass shown when key presses are made during plotting is now visible rather than hidden by the gamma fadeout.

Information overlay in Full Screen mode didn't appear reliably when screen banking was used - if the relevant key was pressed during the plot of the off-screen image, it would fail because of a mistyped key number in the key handler.

Checking of mouse buttons could be overridden by OS_Byte values in a key scan loop in Full Screen mode; the right and middle mouse buttons would operate erratically as a result, depending on whether OS_Byte or a MOUSE call caught the button change. Now MOUSE overrides OS_Byte.

Since the split between ignoring errors in the desktop or in Full Screen mode was introduced, occasionally a load error from Full Screen mode might be seen even if the relevant 'ignore' setting was turned on. The related code has been tidied up and this bug fixed in passing.

When an image was loaded from a directory and the directory contents cached, subdirectories would be included. This could lead to "not found" errors if stepping through to such an item. Subdirectories are no longer stored when storing directory contents based on loading a single image.

If the dithering method was changed in the Choices window, the display window didn't redraw fully. It now does.

Caret handling was a little eratic; SwiftJPEG endeavours to restore one level of previous caret position, but for various reasons would not do this reliably. Behaviour has been considerably improved.

Bounding box of drag for saving items was set to the drag box, rather than the pointer, due to incorrect flags to Wimp_DragBox. Correct flags are now set.

Typing error meant application to application transfers would fail with a "Mistake at line..." report. One other instance of same class of error found and fixed which would only show up when a particular out of memory report should have been raised.

Close icon removed from save box and button sizes reduced to improve style guide compliance.

The icon bar clicking behaviour has changed, now that it is very easy to get into Full Screen mode with so many key press and clicking options available - Select re-opens the display window as before, if an image is loaded; Menu opens the main menu; and Adjust opens the Choices window.

Double-clicking on a JPEG image to load SwiftJPEG now does include the directory contents as well as just the image, which was the previous behaviour. I can't remember if this was intentional or an oversight, but it's easy to change if you want to - see around line 220 in the uncompressed !Runimage source.

If "Don't scale up" was set, then fixed zoom settings of > 1:1 would be ignored as well as the "fit to area" and "fill to area" scaling. It is now possible to set a >1:1 scaling when "don't go above 1:1" is set, as this flag is only intended to apply to the automatically calculated zoom settings, not the manually specified values.

Version 1.10-B4 (31-Apr-2004) New features

Optional dual bank support, to load the next JPEG into the offscreen bank whilst you look at the current item (if you move forwards, it'll cache the next item; if you start going backwards, it'll cache the previous item; so when changing direction, the cached item has to be discarded and there will be a delay before the next image is shown). This is turned off by default - use the Choices window to change the setting.

F and keypad Enter exit Full Screen mode; now in the Desktop, if the Display window has focus, they enter Full Screen mode too (because of the Wimp's key numbers, Return and Enter both go into FS mode, but only Enter exits it (intentionally - Return is commonly used as a "next image" key). ESCcape closes the display window, if it has input focus. The Display window can be set to grab input focus on loading a picture (indeed, this is now the default); use the Choices window to change the setting.

Up and down arrows in the Desktop or Full Screen mode, for groups of pictures, advance in steps of 10 (by default; you can change this value in the Choices). Images not already marked bad will be included in the count even if they fail.

The space bar behaves the same way as "P" now (pausing in full screen if a timer is set, then when paused, moving to the next image; or if no timer is set, just going to the next image).

Overlays are briefly shown when zooming in Full Screen mode to indicate the zoom type. Two equal sized rectangles with an equals sign between them show 1:1; if the left or right rectangle is larger, the zoom mode is taken from the Desktop scaling and shows a scale up (right hand rectangle is larger) or down (left hand is larger); a rectangle between two horizontal bars depicts the picture scaled to fit within the boundaries of the screen, whilst a rectangle overlapping two horizontal bars depicts a picture scaled to fill the screen, cropping if necessary.

Adjust-click in Choices doesn't close the window now.

New "don't zoom above 1:1" option for people who want to scale to fill the screen only for images too *big* to fit, but don't want to zoom up and get a blocky image. When using the "Z" full-screen mode zoom key, this doesn't apply (i.e. scaling above 1:1 will be allowed if you explicitly ask for it).

Keys 0-9 on the top row or the keypad set zoom factors in Full Screen mode. 1 to 5 set 1:1 through 5:1; 6 to 9 set 1:2 through 1:5; 0 sets 1:1 again.

Information panel in full screen view ("I") is at least 16 characters wide normally, but if a leaf name for a picture is greater than this, it attempts to expand to accommodate at least the leafname. The width may be truncated below this, though, if the pixel width of the screen mode used requires it. The panel now shows the current image number and the total number of images, though if SwiftJPEG later reads thus far unread images and discovers they cannot be shown, the total may decrease.

Double-clicking on an image, or dragging a single image to SwiftJPEG, now doesn't add just that image to the file list. So long as Shift isn't held down (to append the item to an existing list, or to start a new list with just that one picture), the contents of the directory in which the image lies are added. This means you can use the next and previous functions to step through any other images in that directory. If you have "show images in Full Screen mode on loading" switched on, and "ignore errors in Full Screen mode" on too, then dragging a bad image, or a non-JPEG image to SwiftJPEG will result in it looking forwards in the directory and if another viewable item is found that will get shown instead. This is just a (sometimes useful, sometimes not) side effect of loading a directory contents rather than just a single image. This automatic directory loading only happens when you load individual images - if you drag a group to SwiftJPEG, then only the items in that group will be queued.

You can, in the Choices window, tell SwiftJPEG to load *directories* into Full Screen mode on loading, but not individual images. With this set, images are shown automatically in Full Screen mode when you drag a directory to SwiftJPEG, but not single images or image groups. The setting only affects the way in which images are shown when the directory is first dragged to SwiftJPEG.

Holding down Ctrl when loading a single image defeats directory loading (useful in particular if it's a big directory or a slow filesystem).

When loading directory contents for any reason, only files with the JPEG filetype already set are read.

In Full Screen mode with a slideshow timer set, using the left and right arrow keys changes the direction of slideshow playback too. An on-screen indication of the change of direction is shown briefly on screen.

There is now a set of "ignore errors" and zoom options that apply to the Desktop, rather than only being available in Full Screen mode. A default fixed zoom (m:d) ratio can be set, the image can be made to fit the maximum available window visible area in the current screen mode without having to scroll to see part of the image, taking account of the "don't cover icon bar" CMOS setting, or fill the maximum window visible area, with scrolling as necessary according to the maximum visible area's aspect ratio versus the image's aspect ratio. The old Zoom window on the icon bar or Display window menus still works - it will override the Choices and set whatever zoom setting you put into it. Reload the image to reset the zoom to the Choices-specified value.

Version 1.10-B3 (27-Apr-2004) Bugs fixed

Only sets filetype of an image (1) if loading it was completely successful and (2) if it isn't already correctly set (previously, could sometimes try to set a filetype on a non-JPEG and would always re-set existing types).

Gamma fade in/out wouldn't quite reach full or minimum intensity, particularly at fast speeds (had forgotten to put final set-black or set-normal calls in all versions of SwiftJPEG prior to this).

When loading a directory, only queues images of filetype &C85 rather than accepting any filetype.

Version 1.10 B1 (25-Apr-2004)

Many internal changes and bug fixes, particularly for screen mode selection. Much more stable on RISC OS 3.1 if using JPEGMsgs / JPEGRender; uses the system sprite area for file lists and application space for the JPEG, so the 4MB picture size limit imposed by the sprite area maximum size is removed.

Rectangular pixel modes (e.g. wide pixels such as mode 2, or tall pixels such as mode 15) fully supported on all OS versions. "Ignore errors in Full Screen mode" option. Range of Full Screen mode zooms supported - 1:1 or same as Desktop, as before, along with "fit to screen", which scales to fit the current mode without cropping, and "fill screen" which fills the screen, cropping if necessary. Can cycle through these modes in full screen view by pressing "Z". Can now step forwards and backwards through picture lists with either the Main Menu options, or left/right keys in Full Screen mode or in the Desktop (click on the Display window to give it input focus).

Choices window rearranged to a more logical layout given the new options. Version taken to 1.10 from 1.02 to reflect the significant number of internal changes.

Version 1.02 (04-Dec-2002)

RISC OS 3.1 support (does not use dynamic areas internally). Source code indented for clarity. Minor bug fixes in mode selection routines. Avoids setting Wimp palette to fix "pinboard re-caches the backdrop sprite once for every viewed image" problem in Full Screen mode. Does not do strict "is this a JPEG we can handle?" check for RISC OS 4 upwards. On-screen displays in Full Screen mode work for 4 OS unit per pixel modes now (e.g. mode 13). Better behaviour in 16 colours or less. Supports JPEG Render or Sprite Extend modules for JPEG rendering. On- the-fly conversion of EXIF and unidentified images to JFIFs - digital camera output now viewable directly. Help file reformatted to fit in 78 characters wide - seemed like a good idea at the time...

Version 1.01 (24-Oct-2002)

Bug fix - SWI JPEG_Info was being called with R0:0 clear, which according to the PRMs means it should not return size information. In RISC OS versions prior to 4.32 it does, but in 4.32 or later it does not, resulting in a failure to display JPEGs properly. This was reported in newsgroup comp.sys.acorn.apps with André Timmermans finding the bug (thanks).

Changed date format within this !Help file to DD-MMM-YYYY.

Version 1.00 (25-Apr-1996)

As version 1.00ß (below), with additions of the new Dynamic Area for filenames of groups. This allows a 'Next image' menu item, where a group of pictures dragged on can be viewed one by one in the Desktop rather than ending up with the last picture. You can drop in and out of Full Screen views of a group or cycle round all the files repeatedly Full Screen. So revision of Full Screen procedure, error handling and loading mechanisms, plus addition and completion of HTML documentation and rebuilding of the text and Junior manuals was conducted.

As such this version shows some of the most radical internal changes in the version history so far. Unfortunately the WimpSlot had to increase as a result of the added functionality (mostly the new loading procedures - gamma fades have little memory overhead which is why they're still present). It's only gone up to 56K (from 52K), which is the size it was at in earlier versions anyway... There's also a reasonable amount of room left in the extra 4K for small future additions or fixes should they be required. Documentation (and perhaps sources) may well be released 'officially' in separate archives with filenames making the format of their contents obvious...

Version 1.00ß (Unreleased)

Radical revision to Choices arrangements, including support for hardware fade/flash in, and checking for presence of the Compo_ReadGamma SWI to maintain any previous Desktop gamma settings. Dithering and Full Screen options moved to menus, the latter with a specific mode selection added. Problems with reopening Display window solved as far as possible.

A few minor bugs cured and documentation is now in HTML form.

Minor improvements to polling system and way the return to the Desktop screen mode is both handled and prompted - PollIdle now restored (an unstable intermediate between version 0.09 and 1.00 which was not completed and given no version number had to have PollIdle replaced by Poll - less efficient).

Version 0.09 (21-Jan-1996)

Major changes are slideshow time delay and an 'always plot at 1:1' option. A 'Reload image' menu item has been added and there's been 'debouncing' on a few buttons. The Choices I/O mechanism had to be adapted to cope with the new stuff in the Choices window. Memory handling changed (see below). Save/App-app load (see below).

With multiple file loads and auto Full Screen, can now click Adjust to 'pause' the image when slideshow wait isn't zero - that is, the image will stay on screen until a key/button is pressed. A pause symbol is flashed 3 times in the bottom left of the screen to indicate this.

App-to-SwiftJPEG transfer supported through !Scrap; JPEG can be saved out. Allows e.g. UUDecodes from !TTFN to be dropped straight into SwiftJPEG and saved out if liked.

WimpSlot taken down from 56 to 52K, and JPEGs now placed in a Dynamic Area.

Changes to many accompanying texts/manuals, and any files where 'Hipposoft 1995' appears have been altered for '1995,1996'...! Noticed Info window had '1993-1995' in it, this now reads '1995-1996'. Remembered to spellcheck the manual and found quite a few errors... Now corrected.

Version 0.09i

Unreleased intermediary. A couple of additions made over version 0.08 which gave me new ideas for the 'proper' version 0.09. (The 'i' stands for 'internal').

Version 0.08 (12-Dec-1995)

Changed loader routine to be filetype-independent. JPEG (&C85) filetype now only needed for double-click loading. Also added proper error handler; various circumstances will force a quit but most of the time, there is a choice of OK or Cancel buttons. Or just OK, if it's only a message. These changes were suggested by Stephen Borrill.

Added 'Auto Filetype' option, to set the filetype of a non-JPEG filetype JPEG file if it was loaded. Noticed a minor bug in the Choices save routine connected with diagnostics, which was fixed (this would never have lead to incorrect preferences saves though).

Fixed minor bug in window centering routine (!) which manifested itself when I set CMOS RAM to allow windows off-screen in all directions. Single pixel errors when accounting for scroll and title bars also fixed.

Updated manuals and the odd minor change to above History text.

Version 0.07

The original text History file itself was created on the same day as Version 0. 07 was first saved to disc.

On request of Stuart Halliday, the title bar of the display window now holds all or part of the pathname of the JPEG file loaded.

A 'true' ellipsis was tried instead of '...' for display of pathnames to long to fit in either the Picture window or the title bar of the Display window. However, this doesn't look good for system font users, and only lets you see another 2 characters of the pathname. I decided to stick with three full stops.

The REMs at the start of the application's crunched !RunImage (which are inserted manually after the crunching process) have been made a little more informative.

Fixed a rather stunningly silly bug where Adjust-clicking on the close icon would open progressive parent directories, and Shift-Adjust- Clicking would result in a crash as soon as the JPEG tried to subsequently redraw...

Version 0.06

First 'Release' version, distributed to a few people over EMail by specific requests following a mention of the software in an Acorn- related newsgroup.

This was the first version that conformed to the original design specification drawn up prior to starting to build the application.

Versions 0.05 to 0.01

Development versions. A new version number was assigned after a complete, working copy of the software had been established (v0.01 was the version name used for all initial development). None of these versions were released. Fairly major additions were generally made between version numbers.

None of these versions fully implemented the original design specification for the software.

About this document

At the time of writing, no RISC OS browser capable of displaying this document as it was intended, however both NetSurf (free) and Oregano 2 (commercial) make fair attempts. I think NetSurf has the edge on overall presentation.

Of Opera, Firefox and Internet Explorer on the Windows platform, only Opera has enough support for the CSS 2 specification to correctly display the document. I recommend using Opera 7.54 or later, or Firefox 1.0 or later; the level of support in Internet Explorer version 6 is very low. Opera and Firefox are both available for MacOS and Linux as well as Windows. In addtion, Camino ought to be as good as Firefox under MacOS X as both are based on the same core.

When it comes to printing the situation changes. Internet Explorer whilst not without problems does the best job here, largely because Opera seems to lose sections of the document straddling page boundaries (mostly in sidebars, and even though CSS asks it not to split those items in the first place). Firefox doesn't hide things, but seems to have problems with font widths and spacing, at least on the preview. Since Opera is the only browser to properly support generated content in CSS, I have taken steps to help it by forcing page breaks before certain sections; this makes Opera work fairly well, though does mean that you may end up with wasted pages containing only one or two lines of content depending on how your printer's page settings and browser's font sizes interact.

Disclaimer

If you do not agree with the following text, you may not use SwiftJPEG and must delete it immediately.

“The software” or “this software” refers to the !SwiftJPEG application and any related files distributed with it, including this manual in all of its various formats.

This software is supplied “as is”; Hipposoft makes no claims as to its reliability or suitability for any purpose, regardless of any comments made elsewhere. No responsibility can be taken for any failure of the software, or any loss or damage caused directly or indirectly, or not caused, by the software.

Contents of this manual are not guaranteed to be correct, and may change without notice.

This software is Freeware, and must be distributed intact, with all the files present and in the same form as received by the end user. If being distributed in any profit-making way, permission must be granted by Andrew Hodgkinson (Hipposoft) first.

This revision of the Disclaimer and Credits section was made on Thursday the 24th February, 2005 and refers to SwiftJPEG v1.10 and the manual presented herein. It does not refer to versions of SwiftJPEG or the manual made prior to this date unless explicitly indicated.

Creative Commons License This work is licensed under a Creative Commons License. Andrew Hodgkinson 2005

Pond logo Return to the SwiftJPEG information page Valid HTML 4.0! Valid CSS!