home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 19
/
AACD19.BIN
/
AACD
/
Online
/
SiteWay
/
Tools
/
JpegTool.doc
< prev
next >
Wrap
Text File
|
2000-05-07
|
8KB
|
197 lines
JpegTool
© 1999 by Stephan Rupprecht
All rights reserved.
COPYRIGHT AND DISCLAIMER
JpegTool is copyrighted 1999 by Stephan Rupprecht. All rights
reserved. This program is freeware, so no financial donations
required. Redistribution allowed if the package is left unchanged.
The author is not responsible for any damage caused by the use
or misuse of this documentation and/or the program(s) it describes.
REQUIREMENTS
Any Amiga® (compatible) computer with at least OS3 and '020+ cpu.
jpeg.library v2+ by Paul Huxham (util/libs/jpeglibrary*.lha or
http://mafeking.scouts.org.au/~paulh).
picture.datatype v43+ and datatypes.library v45 (optional, see later).
The gui program by Nils Goers requires:
triton.library, tritonrexx.library, rexxsupport.library
DESCRIPTION
JpegTool allows you to convert any image that is recognized by
datatypes into a jpeg image and vice versa.
Features (mainly provided by jpeg.library)
· can create thumbnails from jpegs.
· allows to create progressive images (jpeglib v5).
· provides block smoothing for decompression (jpeglib v5).
· dct method (jpeglib v4) as well as quality and smoothing
factor can be changed.
· optionally creates grayscale images.
INSTALLATION
Simply copy JpegTool to where-ever-you-want :)
USAGE
You can start JpegTool only from shell, since it's a DOS command
(except for the possibility to start it from Workbench through
the menu item 'Execute Command...'). The following options are
provided:
FROM/M/A,TO/A,DESTDATATYPE=DATATYPE=DTN/K,Q=QUALITY/N/K,
S=SMOOTHING/N/K,DCT=DCTMETHOD/K,BS=BLOCKSMOOTHING/S,
P=PROGRESSIVE/S,SN=SCALENUM/N/K,SD=SCALEDENOM/N/K,
SC=SCALE/N/K,GS=GRAYSCALE/S,FORCE/S,ALL/S,FX=FLIPX/S,
FY=FLIPY/S,NL=NOLAYOUT/S,ILBM/S,QUIET/S
FROM/M/A: specifies the image(s) to convert, patterns will be accepted.
TO/A: name of the new image(s). The specified filename is not necessarily
just a simple identifier representing exactly one disk object. Instead,
it is a template which may contain variables/placeholders which will
be replaced by their actual values. Placeholders recognized are:
%n name of the source file without suffix. You can shorten the
filename by providing the maximum number of characters allowed
between % and n (eg. %5n).
%nu Each time an image is converted an internal counter will be
increased. %nu holds the current value of this counter.
%w width of the image.
%h height ...
%d depth ...
%sz shortcut for %wx%hx%d.
%s suffix _without_ leading point. If you convert an image to jpeg, the
suffix will be 'jpg' otherwise the name of the datatype specified
via DATATYPE will be taken as suffix (exception: 'picture' will be
turned into 'ilbm').
example: this will create thumbnails from all jpg files in the current
directory. jpegtool #?.jpg %20n_thumb.%s sd=8
NOTE: Source and destination MUST NOT be the same file !
DESTDATATYPE=DATATYPE=DTN/K: tells the program to create a datatypes
object from a jpeg stream. To create an ilbm picture specify
DTN=picture (no .datatype ending!). This option requires picture
datatype v43+ and datatypes.library v45! And, of course, the
specified subclass of picture dt must be v43 compatible and provide
an encoder.
ILBM/S: if set, an ilbm picture will be created. No particular
datatypes.library is required, picture.datatype v43+ is a must!
Q=QUALITY/N/K: quality of the jpeg stream to create (1%..100%).
default: 75
S=SMOOTHING/N/K: smoothing factor of the jpeg stream to create
(0%..100%). default: 0 (= no smoothing)
DCT=DCTMETHOD/K: allows to specify the dct method used for
de-/encoding. The following keywords are recognized:
ISLOW: integer, slow, more accurate (default).
IFAST: integer, fast, less accurate.
FLOAT: float, fast on fast machines, most accurate.
BS=BLOCKSMOOTHING/S: do block smoothing when decompressing.
P=PROGRESSIVE/S: create progressive jpeg.
SN=SCALENUM/N/K: scaling numerator when decompressing a jpeg image.
The jpeg code only supports a value of 1 (default) currently.
SD=SCALEDENOM/N/K: scaling denominator when decompressing a jpeg
image. Denominators supported are 1 (default), 2, 4 and 8. Eg. if
you want to have an image that is halve of the size of the original
one specify SD=2.
SC=SCALE/N/K: this option requests jpegtool to scale the image by
1/1..1/8 and overrides SCALENUM/-DENOM. The scale factor may be 0..3
which specifies the scale as exponent.
GS=GRAYSCALE/S: create grayscale image.
FX=FLIPX/S: mirrors the image horizontally.
FY=FLIPY/S: mirrors the image vertically.
FORCE/S: overwrite existing files.
ALL/S: convert subdirectories, too. A new directory in the destination
drawer _won't_ be created!
NL=NOLAYOUT/S: setting this option results in a faster dt->jpeg
conversion of <= 8bit images when p96 picture.dt is installed (no
layout will be done). NOTE: You shouldn't use this option in conjunction
with HAM images or the cgx picture.dt since garbage will be produced
(this is not a fault of JpegTool). I suggest to use this option only when
picture.datatype v44 is installed.
QUIET/S: suppresses any message except error messages.
PROBLEMS
The ffp version of jpeg.library will probably cause your computer to
crash, so better use the standard one or the fpu version (if possible).
The latest release of jpeg.library no longer includes an ffp version.
HISTORY
1.0 first public release
1.1 fixed a few non-serious bugs. added grayscale option. creates
an 8bit image from a grayscale jpeg, now (before truecolor).
fixed p96 picturedt problems.
1.2 Wrong aspect ratio was saved when creating a datatypes object.
Improved FROM and TO option, now multiple files / whole directories
can be converted at once. Included JpegToolGUI by Nils Goers.
1.3 added FORCE/S option. uses raw mode for input now (when asking you
for permission to overwrite an existing file) to avoid that the
input appears in cons' history. when overwriting an existing file
the filesize didn't change in case that the file was larger before.
added filesize to the output. Nils updated his gui program.
1.4 new ALL/S option. to convert a directory you don't need to give a
pattern anymore (ie. myimages/#? -> myimages). no longer assumes
that anything behind the first point of the source name is a suffix
(see %n placeholder).
1.5 added FLIPX/S,FLIPY/S,SCALE/N/K options. supports ham and ehb sources.
fixed a few small bugs.
1.6 - non public release -
new option NL=NOLAYOUT/S to speed up dt->jpeg conversion of <= 8bit
images when p96 picture.dt is installed.
1.7 converting a jpeg image to ilbm is now supported even without datatypes
library v45 (see description of ILBM/S switch). picture.datatype v43+
is still required for this purpose.
1.8 depending on the datatypes.library used, using ILBM/S could cause
enforcer hits <Nils Goers>. Now complains when DTN option is used
and datatypes.library v45 isn't installed. Updated JpegToolGUI.
1.9 %s placeholder had no value when ILBM switch was set.
FUTURE
bugfixes ;)
your suggestions
SPECIAL THANKS GO TO (in order of appearance:)
Paul Huxham for jpeg.library.
Olaf Barthel for his help.
Nils Goers <nils@goers.line.org> for the gui program.
AUTHOR
Please send bug reports and ideas to
Stephan Rupprecht
Apfeldweg 1
D44359 Dortmund
Germany
Send emails to
stephan.rupprecht@gmx.de