ImgScale Version 2.8.12

Contact:

 ( Wenny Macura )
wmacu@telus.net
Tel 604 925 9425


1]     What is ImgScale:

2]     Install ImgScale:

3]     Compile ImgScale:

4]     Notes:



1]     What is ImgScale?

ImgScale is a console application designed to scale and or sub-sample single/multiple Images.
ImgScale is capable of both Image Scaling as well as pixel replication.
If *.scl images are generated [-q 0 or not specified ] the output images are truly scaled image
ImgScale uses special scaling algorithm.
( Compare the results with Photo Shop, and you might be surprised. )

At this time the input image formats are TIFF, JPEG, BMP, TGA, PGM and PPM.
The output image file will be either TIFF or JPEG depending on the -q option.
In case [-q] is set to 0 as in [-q 0 ] or [-q ] is not used, the default output will be a TIFF file with an *.scl extension,
  Use the -e option to change the extention ( as -e tif ).

The TIFF output may be optionally compressed using the [-c ]option. 

In all other cases the output will be a JPEG file with the *.tnl extension by default.
  Again use the -e option to change the extention.
If the destination file exists, it will not be replaced.

The WM_ImgLib library is described in more detail in WM_ImgLib.htm



2]    Install ImgScale:

Unpack the ImgScale.8.6.12.tgz to a local directory [ /usr/local/src].
Check the "Install-sh" for the local variables and change them if needed.
Execute the
"Install-sh" script.
The
"Install-sh"script is rather primitive and will install the WM_ImgLib, the compile includes and the executable in the locations mentioned bellow.

The default settings are set to :
DEST_PATH=/usr/local/bin
LIB_PATH=/usr/local/lib
INC_PATH=/usr/local/include
The INC_PATH variable will contain Tii directory, containing the WM_ImgLib includes, needed for compilation.

After the install, to execute the ImgScale
from Xterm type:
ImgScale -i <IMAGE_DIRECTORY>/* -o <DEST_DITECTORY>/  -s 300 -q 75 -t

This will produce thumbnails of all of the recognized images in
<IMAGE_DIRECTORY>.   // -i option
The thumbnails will be placed into <DEST_DITECTORY> directory.        // -o option
The thumbnails will be JPEGs an will have a *.tnl extension.       // -t option
The JPEG quality will be set to 75. // -q option
The horizontal size will be 300 pixels. // -s option
The vertical size will be calculated from the aspect ratio of the image.

ImgScale Usage:  

ImgScale -i inputFile [-o OutputFile] -s ###[%] [-d # ] [-r ##.##] [-q ###] [-e .ext [-k] [-t] [-c] [-a]
Input File extensions are [.tif/.jpg/.bmp/.pgm/.tga/.png/.ppm]

Input wild cards are allowed -i input file(s) if -i contains a wild card, as in [ ../* ],
then only the path is extracted from the -o option

        Input File extensions are [.tif/.jpg/.bmp/.pgm/.ppm/.tga/.png/.gif]
        Input wild cards are allowed.

-i[--input]     input file(s)
if -i contains a wild card, then only the path is extracted from the -o option
-o[--output]    output path and or file.
if -o is not specified the output will be directed to /tmp.
if only path is specified use the trailing '/' as in [ /foo/ ]
-s[--size] ###[%]  [ default 400 ]
Output size in pixels or percent of the original image.
if % is appended to the ### then the the original image is scaled by percentage as specified
-a option is not used with [%]
-q [--quality] ### [ default 66 with -t option].
JPG output quality of the JPG thumbnail. Useful range 15 to 95 ( 0 to 100 ).
0 or no argument produces a Bi-cubically scaled TIF image as *.scl [use -e .xxx to change ]
see also -t option.
-d [--debug] #
debug level 0 to 5
-r [--res ] ###.### [default 300.00]
Output Image Res in dpi.
-g [--gamma ] ###.### [default 1.00]
Output Image Gamma.
-k [--keephdr].
Keep the generated Image header files.
The headers are placed to the output directory, see [-o].
-t [--thumbnail].
produces a JPEG output with *.tnl [use -e .xxx to change] extenuation if -q is not specified default is used.
if -t option is not given, the output file extenuation will be *.scl.
-c [--compress].
if -q option is 0 or not specified compress the output TIFF file.
-v [--version].
display the version number.
-a [--fit_to_square ].
fit the output image into a square defined by the -s option.
-e Outputfile Extenuation.
-?, -h print this mesg.


3]    Compile ImgScale:

To compile the ImgScale the following libraries are required:
/usr/local/lib/libjpeg
/usr/local/lib/libtiff
/usr/local/lib/libWm_ImgLib

The Makefile is rather sparse, so don't complain, but you should have a look at the Makefile anyway,
it may give you few hints. :-)


4] NOTES:

A]    NOTE TIFF:

TIFF images are treated as a special case.
Not all tiff format variations are supported.
Most of the later libtiff's exclude the LZW compression option, hence -c option will not work.
Not all TIFF formats are fully supported.

B]    NOTE    WM_ImgLib.a WM_ImgLib.so

    Sorry, the WM_ImgLib is now distributed as an object library only. The source will be issued later.
    You might get more info by examining the included *.h files.
    The
WM_ImgLib has been compiled on an old Sparc 4 and Sun Ultra running Solaris 7 as well as
    on hp9000 L_Class Server.

    The Linux version was compiled with  [ gcc version 3.2.2 ] and [ libc-2.2.3 ].
 

Any questions or comments ??

Contact "wmacu@telus.net"


C]     It is assumed that the following Linux packages or at least the libraries,  were installed:
            /usr/local/ tiff-v3.5.7

            /usr/local/jpeg-6b.

The packages mentioned above are available from "http://www.ibiblio.org/" or mirrors.
I do believe that they are both, part of most of the Linux distributions.