home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1996
/
ARCHIVE_96.iso
/
discs
/
utilities
/
utility_04
/
jfif
/
!JFIF
/
readme
< prev
next >
Wrap
Text File
|
1993-06-26
|
7KB
|
149 lines
JFIF
----
A Desktop interface to the CJPEG and DJPEG programs.
By Neil Hoggarth
Introduction
------------
JFIF is a Desktop interface to the CJPEG and DJPEG programs distributed with
the ChangeFSI application on the RISC OS 3.1 support disc. You will need
this version of ChangeFSI to use JFIF.
JPEG is an algorithm for compressing digitized still pictures so that they
take up less space on disc or take less time to transfer over a
communications link. JFIF is a standardized file format for storing JPEG
compressed pictures, which is promoted by a group called the "Independent
JPEG Group", with the aim ensuring that all programs using the format will be
able to inter-operate. CJPEG and DJPEG are programs written by the
Independent JPEG Group to do encoding and decoding (respectively) of JPEG
pictures. These programs are distibuted by Acorn with ChangeFSI and DJPEG is
called by ChangeFSI as part of the process of turning a JFIF file into a
Sprite. However, no way of converting Acorn Sprites into JFIF files is
provided without using the command line.
This application was written in response to an article in Archive Magazine
called "First Steps with JPEG" (Archive 6.9 page 45). The author of the
article describes how to use CJPEG and a shareware program called "!Creator"
to produce JFIF files but bemoans the fact that it cannot be achieved using
ChangeFSI within the Desktop.
This application is a quick hack. It calls ChangeFSI and the CJPEG/DJPEG
programs to do the real work but it provides a Desktop veneer on top of them
to make them easier to use. It can convert sprite files to JFIF files and
JFIF files to sprite files with only a few icon drags.
This application is free software. See the section "Copying" for details.
Use
---
Copy JFIF into the same directory as your working copy of ChangeFSI (make a
working copy if you don't have one). Open the !ChangeFSI application
directory (hold down shift while double clicking) and load the !Boot file
into Edit. Add the following line to the !Boot file and save it.
Set ChangeFSI$Dir <Obey$Dir>
This is necessary because the JTIF program needs to know where to find the
ChangeFSI programs even if the ChangeFSI application hasn't been run.
Double click on JFIF to load it. It will install on the icon bar in the
usual fashion. You convert files by draging them from a filer window to the
icon on the icon bar. Files of type sprite will get converted to JFIF and
files of any other type will be assumed to be JFIF files for conversion to
sprite file format. When you drag an input file to the icon bar the normal
type of "save as" box will appear. Simply edit the filename and drag the
icon of the output file to a filer window. JFIF files produced by this
application are filetyped as "JPEG" (numeric filetype hex C85) for
compatibility with the FYEO application by the "ARM's Tech" group.
The icon bar menu contains four items. "Info" and "Quit" have the usual
meanings. "Options" brings up a dialogue box which allows you to set the
Quality option for the sprite to JFIF conversion (default 75%) and the mode
of the sprite to be produced for JFIF conversions (default 21).
"SaveáOptions" allows you make the current set of options into the default
which will be used next time the program is started.
The Quality option controls how much compression gets applied to the picture
when doing the JPEG encoding. The number ranges from 1 to 100. The lower the
number then the smaller the JFIF file produced (and the worse the picture).
The default produces little visible distortion to most pictures. However the
results obtained with JPEG are always picture dependent. When you are
converting sprites to JFIF files I encourage you to convert the resulting
file back to a sprite and check that you are happy with the results. If not
then try changing the Quality figure and reprocessing the original sprite.
You should retain the original sprite until you are sure that you have a
satisfactory JFIF file.
Note that the JFIF to sprite conversion can be done directly in the desktop
using FYEO or ChangeFSI and you might prefer to do it that way. This
has the advantage that the sprite produced in the conversion is displayed in
a window, so that you don't need to save the sprite file and load it into
Paint (for example) to view it. In particular FYEO is capable of displaying
multiple windows with different JPEG pictures in them. You can use this to
compare the same picture at several different Quality figures side by side.
The program is written in C and distributed with full source code and a
Makefile for AMU (in the application directory). I use release 4 of the C
compiler but the program may compile under earlier versions.
Further Reading
---------------
For a quick overview of JPEG, and the potential advantages of storing
pictures in this form, I refer you to the Archive article.
You should also read the file "JPEGinfo" in the ChangeFSI application
directory. This tells you about CJPEG and DJPEG and in particular explains
about the effects of the Quality option on the JPEG file produced.
This application calls the ChangeFSI program to generate sprite files. You
might want to look at the file "FSIinfo" in the ChangeFSI application
directory. This tells you how the sprite mode which is chosen on the Options
dialogue box affects the sprite output.
Copying
-------
The JFIF application is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 1, or (at your option) any later
version. This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.
A copy of the License is included in the application directory. To read it,
open the application directory (hold down shift and double click) and load
the file COPYING into Edit.
Note that unlike other many software authors I am happy to allow the
circulation of modified version of my programs or the "borrowing" of code
from my programs. All that I ask is that you document your changes (in the
sources and a brief summery added to the file ChangeLog) and that you read
the GNU General Public License and understand your obligations under it.
All bug reports, new versions, constructive critisism, etc. to the following
address.
e-mail: neil@ntlrd.demon.co.uk
Neil Hoggarth
18 Stanmore Lane,
Winchester,
SO22 4AJ.