SprToJPEG - JPEG convertor

by George S. Kapogiannopoulos


SprToJPEG generates JPEG files from other files formats and works both in RISC OS 2 and RISC OS 3. The compressed JPEG files can be used with various viewers, such as FYEO2. Previously only Sprite files could be converted to JPEG. With this software other format image files may now be converted directly to JPEG image files.

The Program supports the following input image files:

 Sprites having 256 colours with or without palette.
 New Sprite Format 16 bpp (bits per pixel) 65k colours.
 New Sprite Format 24/32 bpp 16M colours, RGB colour space.
 New Sprite Format 24/32 bpp with CMYK colour space, not yet supported by RISC OS 3.5.
 Supporting baseline non-planar "II" (little-endian) and "MM" (big-endian) TIFF revision 5.0 and 6.0, having no compression or LZW compression TIFF (Tag Image File Format).
 AIM (Archimedes Image Manager) any size grayscale images.
 GIF Images.
 PBMPlus Images, grayscale, true-colour 24-bit.
 Targa Images, grayscale, 8-bit, 16-bit, 24-bit, 32-bit.

Menu Options
The Quality option sets the quality of the compressed JPEG file. This setting should be between 50 and 95. The default of 75 is good enough for almost any image. Higher settings in quality increase the JPEG file size dramatically for hardly any gain in output image quality. Settings around 5 to 10 might be useful in preparing an index of a large image library, for example. (Warning: some JPEG programs may be unable to decode the resulting file.)

The Smooth option smoothes the input image to eliminate dithering noise. Values range from 1 to 100 and indicate the strength of smoothing. Smoothing is often useful when converting GIF files to JPEG. A moderate smoothing factor of 10 to 50 gets rid of dithering patterns in input files, resulting in smaller JPEG files and a better-looking images. Too large a smoothing factor will visibly blur the image. If the smooth option button is off, no smoothing is performed.

The Grayscale option forces the compressed image to be a grayscale one.

The Optimize option optimizes entropy encoding parameters. Without this, default encoding parameters are used. This option usually makes the JPEG file a little smaller. Image quality and speed of decompression are unaffected by Optimize.

Hints & Tips
The program works best on natural images giving a compression ratio 1/5 to 1/10 (see the example Lenna image). Computer generated images like line art drawings or cartoon graphics which have large areas of the same colour are not compressed very efficiently. The latter can be compressed better in GIF format or using !ArcFS or !Spark.

A major advantage of using SprToJPEG is that the resulting compressed file has 24 bits per pixel (about 16 million colours), giving similar results to PhotoDesk or PhotoTouch. As a result Archimedes sprites converted to JPEG files may look better than the original images on machines with improved display hardware (16 bits per pixel, 24 bits per pixel).

The application claims all the free memory in the system when it runs. If the free memory is not enough (usually when the Optimize switch is used) temporary files will be used in the !Scrap directory.

To run the application click on the icon in the RISC User menu system.

Feel free to contact me for bugs, comments or whatever:
Mail:	George Kapogiannopoulos
	Megdoba 18,
	131 22  Nea Liosia,
	Athens,
	Hellas (Greece).

Email:	georgek@iit.nrcps.ariadne-t.gr
	gkapog@di.uoa.ariadne-t.gr


 Copyright RISC User 1995