home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / magazines / progs / spectrum2 / !Spectrum2 / Articles / Regulars / Prog / Jpeg < prev    next >
Encoding:
Text File  |  1994-09-11  |  4.0 KB  |  97 lines

  1. {fon:homFF0000}
  2. What are JPEG files?
  3. {fon:tri}
  4.  
  5.   JPEG files are files which contain compressed images. Under certain
  6. circumstances, extremely high levels of compression can be achieved.
  7. The high levels of compression are achieved at the expense of a
  8. slight distortion of the image. What comes out isn't exactly the same
  9. as what went in. This can occasionally be seen as slight colour
  10. ripples in plain coloured areas. For many images, such slight
  11. distortions are hardly noticeable, and may be much less than the
  12. quantization errors inherent in a scanned image. The JPEG compression
  13. mechanism can't be used for other types of data (e.g. programs)
  14. because the distortion does corrupt the data.
  15.  
  16.   One problem with the official JPEG "standard" is that it leaves
  17. some important information undefined. A number of different
  18. incompatible formats are possible, all conforming to the official
  19. standard. Fortunately, all the JPEG files you are likely to meet on
  20. the Archimedes conform to the popular "JFIF" format of JPEG file, as
  21. proposed by The Independent JPEG Group.
  22.  
  23. Programs
  24.  
  25.   There are now several programs available on the Archimedes which
  26. can read and/or write JPEG files.
  27.  
  28. ChangeFSI: This comes included with RiscOs 3. Unfortunately it is
  29. very awkward to use and is best avoided if you can get hold of any of
  30. the other programs. If it runs out of memory, it just dissapears
  31. without reporting what the error was, leaving huge temporary files in
  32. your Wimp$Scrap directory.
  33.  
  34. John Kortink's Creator and Translator: These shareware programs (£10
  35. registration for the pair) are excellent. The latest versions will
  36. read and write JPEG files. Creator is the only one of these programs
  37. which will make a JPEG file directly from a sprite, all the others
  38. require a GIFF or PBM source file. (Actually Creator makes a suitable
  39. PBM file for you in Wimp$Scrap, then deletes it afterwards).
  40.  
  41. Jpeg: A PD program by Keith Sloan. It converts images from GIF to
  42. PBM to JPEG, and back. Therefore, to use this, you would need a way
  43. of handling GIF and/or PBM files. I couldn't persuade it to read
  44. PBM files correctly.
  45.  
  46. JView: A PD program by Frank Lyonnet. This reads JPEG files but does
  47. not yet write them. It's big advantage is that unlike ALL the other
  48. programs mentioned here, it does not create a huge temporary file in
  49. Wimp$Scrap, so it could be used on a machine without a hard disk.
  50.  
  51. MakeJPEG: A PD program by Dave Thomas. Unfortunately, this
  52. program refuses to work at all on my machine. If it did work it
  53. would offer much greater control over the details of the JPEG
  54. processing than any of the other programs.
  55.  
  56. Compression Ratios
  57.  
  58.   The best compression ratios are achieved when the original image
  59. contains genuine 24-bit colour information, such as the output from
  60. some scanners and ray-tracing programs. It doesn't work nearly so
  61. well with 8-bit colour images and is worst of all with images that
  62. contain large areas of a single colour.  I took an image which I had
  63. created with a ray tracer, and compressed in in various ways. Here
  64. are the results
  65.  
  66. With 24-bit colour:-
  67.  
  68. Original Targa format  960k
  69. SPARK compressed Targa file  386k
  70. JPEG file from the 24-bit image  41k
  71.  
  72. With 8-bit colour:-
  73.  
  74. 256 colour mode 21 sprite  320k
  75. SPARK compressed sprite  111k
  76. 8-bit GIF format file  109k
  77. JPEG file from the 8-bit image 77k
  78.  
  79. What can you use it for?
  80.  
  81.   It's very good for exchanging large 24-bit images. For example, you
  82. could just about fit a 2400 by 3000 pixel image (that's A4 at 300dpi,
  83. 22Mb uncompressed) onto a single floppy disk. There is a reasonable
  84. possibility that JFIF might become an industry standard, making it
  85. possible to send such images to a bureau to be printed.
  86.  
  87.   If you can afford to hold your images in conventional formats, then
  88. it's better not to use JPEG for image storage, due to the slight
  89. distortion. However, JPEG might be suitable if you find it
  90. uneconomical to store the originals, and can tolerate the
  91. distortion.  Many of the JPEG images available from PD libraries are
  92. very large when decompressed, and therefore only suitable for
  93. machines with hard disks.
  94.  
  95. {spr:l03}
  96. {end}
  97.