www.riscos.com Technical Support:
RISC OS 3 User Guide
RISC OS 3.7 User Guide
23 - ChangeFSI
ChangeFSI is a useful program for converting and displaying image files of various formats. These images can then be converted into sprites or JPEGs for viewing with RISC OS applications such as !Paint and !Draw.
ChangeFSI stands for 'Change Floyd Steinberg Integer' (ChangeFSI performs Floyd Steinberg error diffusion dithering).
You should make sure that your conversion and subsequent use of an image does not infringe on any copyright that the image may be under.
ChangeFSI can read image data, scale the data to improve an image, change the x and y size, sharpen an image and write the result using error diffusion dithering in one step (so it provides the best possible quality). All operations are carried out with 32-bit fixed-point numbers (three per pixel in the case of a colour picture).
||ChangeFSI is in the Utilities directory on your hard disc or network. To start the application, double-click on the !ChangeFSI icon.|
- Display the directory that contains the file for the image to be processed.
- Choose whether to save the image as a sprite or JPEG file.
- Change to a desktop screen display mode that you wish to view and store the image in, if you're exporting to a sprite.
- Drag the image file's icon onto the ChangeFSI application on the icon bar.
ChangeFSI automatically converts the file to give the best possible screen image for any display mode. For example, if you choose a 32-thousand colour mode ChangeFSI will produce an image with 32 thousand colours; if you only choose a 16-colour display mode ChangeFSI will produce a 16-colour image - if the colours are nearer to the greys than the colours in the 16-colour palette, it may be that the image is displayed in monochrome on a 16-colour display, but this doesn't mean that the colour information has been lost (unless you save the image as a sprite in that mode).
ChangeFSI then attempts to convert the file to give a RISC OS sprite, or a JPEG file, displaying the result.
Note: ChangeFSI may not retain transparent sprite pixels during processing. Transparent pixels can be changed to a colour, depending on the screen mode (e.g. transparent pixels in a 16-colour sprite become white in a 256-colour sprite).
ChangeFSI can convert many types of images to a sprite or JPEG file. These include the PC graphics formats TIFF, PCX (though not 1 bpp images, which may be converted to blank white sprites), PIC and IMG, the Amiga format IFF, the Compuserv GIF format and the JPEG format. See the later section Image file conversion for a full list.
ChangeFSI can also convert sprites or JPEGs from one display resolution into another. Be careful, though: every time you recompress a JPEG file it loses some information. Process a file first, and only save it as a JPEG once, right at the end.
There are some JPEG files available which don't conform to the standard convention. Although some of these files are accepted by !ChangeFSI, others will not be. If you find this to be the case try setting the file's type to JPEG (C85) before giving it to !ChangeFSI.
The information in this chapter gives an overview of how ChangeFSI works from the desktop. Additional information in the form of text files is held within the application. If you want to read these files, shift double-click on !ChangeFSI to open the application directory, then open its Documents directory and double-click on one of the text files.
Files and what's in them:
- CmdBasUse: Syntax for using ChangeFSI from the command line, and for calling it from BASIC programs.
- DesktopUse: Instructions for using ChangeFSI from the desktop.
- Formats: Details of formats that ChangeFSI can use as input or output.
- JPEGInfo: Standard information about JPEG processing (taken from the Independent JPEG Group's JPEG software).
- Theory: Theoretical explanation of how ChangeFSI works, likely only to be of interest to advanced users.
- 256sprites: Information for programmers about creating, recognising and displaying a sprite with a 256-entry palette.
A couple of hints on memory usage
If you are short on memory, Drag the Next slot (in the Tasks display window) down to 320k. If you are converting wide images (e.g. PhotoCD images up to 3072 pixels wide) increase the Next slot to 500k or more.
Icon bar menu options
This section tells you how to use ChangeFSI's menu options.
The Scaling options set which scale factor you wish to apply to your image. You can also transform, rotate or mirror the image.
- Scale 1:1 1:1 gives a full-sized image (the same dimensions as the original). The other Scale options set different preset scaling ratios.
- Custom gives you finer control over the size of the output image. You can either set your own scaling ratio by filling in all four boxes, or you can set the size in pixels by filling in the left x and y boxes only, leaving the right boxes blank.
- Scale to fill scales the image so that it covers the entire screen area at the current display resolution; this may distort the aspect ratio.
- Ignore source pixel size ignores any source information about the pixel size. This can be useful if you have images that use a non-standard pixel size. The pixels are all considered to be square.
- Ignore pixel aspect ignores all the size information in the source file. Both source and output pixels are considered to be square.
- Lock picture aspect prevents the Scale to fill and Custom options from stretching the image horizontally or vertically. The output image will fit within the size you specified; it may be smaller than you asked in one direction only, to avoid changing its aspect ratio.
- Rotate can shift an image through 90° (+90 is anticlockwise).
- Mirror performs left/right and up/down mirror operations on an image.
- If you select Rotate and Mirror, the rotation is performed first.
The Processing options control the image processing used in the conversion and display of the image. You'll notice that all of these options are 'off' by default; you will not normally need to change these settings.
- Expand dynamic range will expand the range of colours in the image. This normally brightens the image. It expands the dynamic range of a picture to full scale.
- Histogram equalisation will most often result in a worse picture but it can be used to recover detail from an otherwise useless image. Alternatively you can use it to look at information locked in a small part of the input scale.
- Disable dithering will disable Floyd-Steinberg dithering. This will usually result in an inferior image.
- Invert input will result in your colour images having their colours inverted. Black and white images are also inverted.
- Brighten picture will produce a picture that is slightly brighter than it should be. Useful if you have dark pictures. This option only works with monochrome pictures.
- Black correction is useful if you want to print the image on a laser printer. You should use a number between zero and 128, though values between 32 and 64 usually give the best result; experiment. Images treated in this way will give a poor result when viewed on screen. This only works for 1bpp (black and white) output.
- Gamma correction is used to correct the image quality as displayed on your monitor. Low values of gamma (0 to 1) make colours darker and high values (above 1) make them lighter. Gamma correction is most often used to correct images that have been scanned in with a scanner. Different monitors may need different Gamma Corrections. A standard value is 2.2 (TV industry standard).
- Pre-sharpening is used to sharpen the edges of objects in the image. Values between 10 and 20 can be used to sharpen an image. Values between 20 and 30 can be used to compensate for the blurring introduced by the dithering process.
For example, a value of 24 will counteract the general dither blurring. A value of 20 is noticeably sharp. All values from 1 to 99 can be selected.
- Smoothing does the reverse of sharpening; it smoothes the edges of objects in the image. You can use values between 1 and 23, with low values giving the most smoothing. Values between 1 (the default) and 3 can be used to blur an image. Values between 3 and 10+ can be used to reduce noise in an image.
The Output options control output to JPEG, or the screen mode in which sprites are created.
Sprite Output options
To output an image in sprite format, choose Sprite Output from the icon bar menu and set up the output options
- Colour gives an image in colour.
- Monochrome gives an image in shades of grey.
- Special allows the use of special file suffixes. These are the same as the
<mode> parameter described in the on-line documentation file
- Use current mode outputs the image for display in the current desktop Display manager mode.
- Old mode allows you to output the image for display in an old-type screen mode.
Enter a backward-compatible screen mode number. We don't recommend that you use this method (it is overridden if you set a colour mode and then use the Monochrome button).
- Mode number is only useful in old-type screen modes. It's an information box (you can't enter anything into it). When Use current mode is selected, the mode number generated with new style screen displays has no significance.
- Colours: The two rows of 2, 4, 16, 256, 32K and 16M buttons set the number of colours in the output image. The top row beside the square box chooses a square pixel mode, and the lower row beside the oblong box chooses a non-square (90 x 45dpi) screen mode. For monochrome output the 2, 4, 16 and 256 buttons set 2, 4, 8 and 16 greys respectively, and you cannot use the 32K and 16M buttons.
JPEG Output options
To output an image in JPEG format, choose JPEG Output from the icon bar menu and set up the output options:
- Colour gives an image in colour.
- Monochrome produces a monochrome image.
- Quality can take any value from 0 to 100 and is passed to the JPEG compression code. The default value is 75, but you can change this using Save choices. The default value gives a sensible compromise between quality and compression.
This option reprocesses the file according to any new options you may have set.
This option speeds up the processing of the image by blanking the screen during processing. If there is no benefit to be had from doing this, the option will be greyed out.
This option will save any changes you have made to the ChangeFSI options so that you can use these options as your default options next time you run ChangeFSI.
This quits the application, removing it from the icon bar.
Image menu options
||Once your image has been produced you can press Menu over the image to display a menu of information about the input and output images.|
The most important option is to save your processed image using the standard RISC OS Save as window.
- Image Info gives the information about the output file.
- Source Info gives the information about the source file.
- Range Info gives you information about the dynamic range of the image.
- Zoom allows you to change the magnification of the image. This is not the same as scaling the source image.
- Save image allows you to save the image as a Sprite file or JPEG file (this depends on the setting in the previous section Output Options).
- Reprocess allows you to process the image again using any options you have changed on the main menu.
Image file conversion
ChangeFSI will convert any of the following image formats into the sprite or JPEG format. You can choose the type of RISC OS sprite that is created by setting the Output Options. If no special output mode is chosen, ChangeFSI produces a sprite that is compatible with the current display mode.
Image types and how to recognise them:
- RISC OS sprites: file type FF9
- ArVis 15-bit HIP + LOP sprites: file type FF9, and file is beneath a HIP directory, and a similar LOP file exists
- Watford digitiser pictures, 512x256, 64 greys -: file type DFA
- and triple red, green, blue separations: directory of type DFA files named RED, GREEN and BLUE
- ProArtisan compressed pictures, 640x256, 256 colours: file type DE2
- JPEG 'JFIF' files: file type C85, or 'JFIF' in file
- Kodak PhotoCD images: file type BE8, or file's name ends /PCD
- TimeStep satellite images, 800x800, 256 greys: file type 7A0
- PC TGA images: file type 69D, or file's name ends with TGA or VDA
- MTV 24-bit PIC images: file type 699, or file is beneath a PIC directory
- QRT 24-bit RAW images: file type 698, or file's name is RAW
- ZSoft .PCX files: file type 697, or &0A,&00|02|03|04|05,&01 at start of file, or file is beneath a PCX directory, or file's name ends /PCX
- Degas PI1, PI2, PI3 images: file type 691
- !Translator Clear format files: file type 690
- CCIR 601 4:2:2 images: file type 601
- !RayShade 'RGB' images: file type 371
- TimeStep satellite images, 128x256, 256 greys -: file type 300
- and triple red, green, blue separations: directory of type 300 files named RED, GREEN and BLUE
- Wild Vision Hawk V12, 512x512, 256 greys: file type 006
- AIM/Wild Vision Hawk V10, 256x256, 256 greys: file type 004
- Wild Vision/Hawk V9, 256x256, 24 bit triple image: directory of type 004 files named RED, GREEN and BLUE
- Wild Vision Hawk V9, 51x2256, 12-bit colour: 'MercSoft' or 'SnapShot' at start of file
- Wild Vision Hawk V9 Mk II, 16-bit colour: 'MercSof1' at start of file
- Pineapple 16 bit per pixel images: 'FSIfile' at start of file
- FITS astronomical format images: 'SIMPLE ' at start of file
- Irlam Instruments YUV 411 files: 'IRLAM YUV 411' at start of file
- Irlam Instruments 24-bit files: 'Irlam' at start of file
- Windows 3 .BMP files: 'BM' at start of file; or 'RIFF' at start of file, and 'RDIBdata' and 'BM' in file
- Compuserve's GIF files up to 8 bit per pixel: 'GIF8' at start of file
- .PIC 8 bit per pixel files: 'AV_VO' at start of file
- Sun 'pixrect' raster files: &956AA659 at start of file
- GEM .IMG images: &08000100 at start of file, or file is beneath an IMG directory, or file's name ends /IMG
- Apollo GPR 16-colour images: &01000100 at start of file
- RIX Softworks ColoRIX 8 bit per pixel files: 'RIX3' at start of file
- TIFF pictures: 'II*null' or 'MMnull*' at start of file
- UNIX rle format files: &CC52 at start of file
- Portable Bit Map (pbm) binary encoded formats: 'P4', 'P5' or 'P6' at start of file
- ChangeFSI packed portable bitmaps: 'P15' at start of file
- PocketBook I and II PIC format files: 'PIC' at start of file
- Electronic Art's IFF ILBM pictures: 'FORM' at start of file and 'ILBM' in file
- MILLIPEDE PRISMA, 768x576, 8-bit colour images: 'MILLIPEDE' in file
- MacPaint files, 576x720, 1 bit per pixel: 'PNTG' in file
- MacPICT2 v2 8 and 24/32 bit per pixel: &00,&11,&02,&FF,&0C,&00,&FF,&FE in file
- RT 24-bit run length coded IMAGE files: file is beneath an IMAGE directory
- PC EGA .DSP images, 640x350, 16 colours: file is beneath a DSP directory, or file's name ends /DSP
- Kodak RGB images, 24 bits per pixel: file's name ends /RGB
Note: If you get a 'Number to big' error message while trying to display a TIFF file, or 'Division by zero' with an IFF file, then try setting the 'Ignore source pixel size' and/or 'Ignore pixel size' options. Also try setting these options if the proportions of an image (for example from an IMG file) are not what you expect.
RISC OS 3.7 User Guide - 22 JAN 1997
This edition Copyright © 3QD Developments Ltd 2015
Last Edit: Tue,03 Nov 2015