                JPEG.                  
                                       
  What are JPEG files?                 
  JPEG files are files which contain   
compressed images. Under certain       
circumstances, extremely high levels of
compression can be achieved. The high  
levels of compression are achieved at  
the expense of a slight distortion of  
the image. What comes out isn't exactly
the same as what went in. This can     
occasionally be seen as slight colour  
ripples in plain coloured areas. For   
many images, such slight distortions   
are hardly noticeable, and may be much 
less than the quantisation errors      
inherent in a scanned image. The JPEG  
compression mechanism can't be used for
other types of data (e.g. programs)    
because the distortion does corrupt the
data.                                  
   One problem with the official JPEG  
"standard" is that it leaves some      
important information undefined. A     
handful of different incompatible      
formats are possible, all conforming to
the official standard. Fortunately, all
the JPEG files you are likely to meet  
on the Archimedes will conform to the  
popular "JFIF" format of JPEG file, as 
proposed by The Independent JPEG Group.
     Programs                          
   There are now several programs      
available on the Archimedes which can  
read and/or write JPEG files.          
ChangeFSI: This comes included with    
RiscOs 3. Unfortunately it is very     
awkward to use and is best avoided if  
you can get hold of any of the other   
programs. If it runs out of memory, it 
just dissapears without reporting what 
the error was, leaving huge temporary  
files in your Wimp$Scrap directory.    
John Kortink's Creator and Translator: 
These shareware programs (10 for the  
pair) are excellent.The latest versions
will read and write JPEG files. Creator
is the only one of these programs which
will make a JPEG file directly from a  
sprite, all the others require a GIFF  
or PBM source file. (Actually Creator  
makes a suitable PBM file for you in   
Wimp$Scrap, then deletes it afterwards.
Jpeg: A PD program by Keith Sloan. It  
converts images from GIF ot PBM to JPEG
and back. Therefore, to use this, you  
would need a way of handling GIF and/  
or PBM files. I couldn't persuade it to
read PBM files correctly.              
JView: A PD program by Frank Lyonnet.  
This reads JPEG files but does not yet 
write them. It's big advantage is that 
unlike ALL the other programs mentioned
here, it does not create a huge        
temporary file in Wimp$Scrap, so it    
could be used on a machine without a   
hard disk.                             
MakeJPEG: A PD program by Dave Thomas. 
Unfortunately, this program refuses to 
work at all on my machine. If it did   
work it would offer much greater       
control over the details of the JPEG   
processing than any of the other       
programs.                              
      Compression Ratios :             
   The best compression ratios are     
achieved when the original image       
contains genuine 24-bit information,   
such as the output from some scanners  
and ray-tracing programs. It doesn't   
work nearly so well with 8-bit colour  
images and is worst of all with images 
that contain large areas of a single   
colour. I took an image which I had    
created with a ray tracer, and then    
compressed it in various ways. Here are
the results.                           
                                       
With 24-bit colour:-                   
Original Targa format              960k
SPARK compressed Targa file        386k
JPEG file from the 24-bit image     41k
                                       
With 8-bit colour:-                    
256 colour mode 21 sprite          320k
SPARK compressed sprite            111k
8-bit GIF format file              109k
JPEG file from the 8-bit image      77k
What can you use it for? It's very good
for exchanging large 24-bit images.    
For example, you could just about fit  
a 2400 by 3000 pixel image (that's A4  
at 300dpi, 22Mb uncompressed) onto a   
single floppy disk. There is a strong  
possibility that JFIF might become an  
industry standard, making it possible  
to send such images to a bureax to be  
printed. If you can afford to hold your
images in conventional formats, then it
is better not to use JPEG for image    
storage, due to the slight distortion. 
However, JPEG might be suitable if you 
find it uneconomical to store the      
originals, and can tollerate the       
distortion. Many of the JPEG images    
available from PD libraries are very   
large when decompressed, and therefore 
only suitable for machines with hard   
disks.                                 
             by Mike Williams.         
**

