
******************************************************************************
*                                                                            *
*                              General Document                              *
*                                                                            *
*                     Belongs To The Scripti Collection                      *
*                                                                            *
*                         By Jan Van Overbeke, 3-DEE                         *
*                                                                            *
*      Read The Doc On The Scripti Collection For More Info About Rights     *
*                                                                            *
******************************************************************************

------------------------------------------------------------------------------
                                  GENERAL?
------------------------------------------------------------------------------
The scripts in this drawer I cannot put into a class. Nevertheless, they are
quite usefull.


------------------------------------------------------------------------------
                               24Bit->IFF.rexx
------------------------------------------------------------------------------
This one should be a regular. I wrote this to get the best results when I
convert a 24Bit-image to an IFF-image. I always do so by using dither, but I
made sure you can turn it off.

useage:
    rx rexx:24Bit->IFF.rexx <filename> <colors> <dither> <screenmode>
                                    <width> <height>

example:
    rx rexx:24Bit->IFF.rexx ram:image HAM8 1 7 640 512

where:  ram:image : filename
        HAM8:       colors
        1:          code for dither (0: off, 1:Floyd-Steinmann, and more)
        640:        }
        512:        } The image will be 640x512

so ram:image.new will be a nice HAM8-picture, which can, off course, be used
by any program which supports IFF-import, like DPaintIV, SCALA, Pagestream,
whatever.

I implied some clever things to check if the arguments are right. You can read
more about such method in some other doc, guess which one.


------------------------------------------------------------------------------
                               ImageIcon.rexx
------------------------------------------------------------------------------
Oh, my favourite!

Sadly, it doesn't work very well when you use more then 8 colors for your
Workbench. This is due to the utility called "Brush2Icon". It is a rather old
program, meant to work within Workbench1.3. This utility reacts quite strange
to my 16 color Workbench, few are OK, most are very much disturbed.

Also, this utility creates a TOOL. Which means, if you double-click it, you
can't call a viewer to quickly see it. To solve this, convert this icon to a
project, and set its "default tool". Another possibility is to click the
viewer's icon once, pressing down the SHIFT, and double-clicking the images'
one. Basic Amiga-stuff.

If you could find a better utility however, you could replace c:Brush2Icon
by yours, and you could replace the 'doscommand'-variable-value....

Now, how does it work?
- First, the script loads the Workbench-screen to get info about that one,
  like bitplanes and colors.
- The script locks the Workbench's palette.
- <filename> is being loaded.
- <filename> is being resized to the prefered icon-size, and the colors are
  adjusted to the Workbench's ones. (EXECUTE)
- The image is saved to a dummy-image in your ram:-drawer.
- Brush2Icon does what it has to.
- And the palette is unlocked.

The <filename> will not be saved over, and will not be affected.

Useage:
    rx rexx:ImageIcon.rexx <filename> <iconwidth> <iconheight> <dither>

Example:
    rx rexx:ImageIcon.rexx ram:image 80 60 1

Where:  1: dither-code (0:none, 1: Floyd Steinmann ,... there are more...)

If I want some quality icons, I do above routine manualy, so the result can
always be improved without losing too much time.


------------------------------------------------------------------------------
                               ImageInfo.rexx
------------------------------------------------------------------------------
This script is not very important, but it can give you an idea of how to get
information from ADPro.

Useage:
    rx rexx:ImageInfo.rexx <filename>

After the image is successfully laden, the script will give you the following
information:

    Size
    Colors:     2...HAM8, 24Bit
    Colormode:  Gray, Color
    Image:      Rendered, Not Rendered
    Screen:     screen code _or_ screen mode if image rendered

If you want to know how the script will react to each image, you'll have to
have some basic knowledge of ADPro.


------------------------------------------------------------------------------
                                 Scale.rexx
------------------------------------------------------------------------------
Here we will load an image, scale to a required size, and save it in the same
format we loaded it. This means, if we loaded a 24Bits-image, we are saving a
24Bits-image, if we loaded an IFF HAM8 Hires Interlaced picture, we'll save it
with the same format.

That is not very difficult, concerning IFF, because ADPro keeps his settings,
if we do not play around too much. And with scaling, we don't. 24Bit, however
is a small problem, we have to go around several routines, and set some
dummy-variables.

Useage:
    rx rexx:Scale.rexx <width> <height>

Where:
    Width:  a numerical or a percentage
    Height: same as Width

Example:
    rx rexx:Scale.rexx ram:image 640 512
    rx rexx:Scale.rexx ram:image 640 50%
    rx rexx:Scale.rexx ram:image 50% 512
    rx rexx:Scale.rexx ram:image 50% 50%

This script will learn you (and me) something about procedures within AREXX. I
find procedures in AREXX far more comples than BASIC, because you have to
watch out for return-values.


------------------------------------------------------------------------------
                               SaveFormat.rexx
------------------------------------------------------------------------------
I wrote this one to quickly save an image as a JPEG one, but made sure you
could add your own prefs (check out the script).

Useage:
    rx rexx:SaveFormat.rexx <format>

Example:
    rx rexx:SaveFormat.rexx JPEG



------------------------------------------------------------------------------
                                Negative.rexx
------------------------------------------------------------------------------
Simpler than simple.

Useage:
    rx rexx:Negative.rexx <filename>

Need an example?



------------------------------------------------------------------------------
                                   THE END
------------------------------------------------------------------------------
Phew, quite a long one, kept me off my studies again =:*/



Jan Van Overbeke.




