home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / conv / imagestudio / doctxt.lha / ImageStudio.txt next >
Text File  |  1995-03-08  |  199KB  |  7,003 lines

  1. ImageStudio, shareware image processing and conversion package for the
  2. Amiga.
  3.  
  4.    Copyright (C) 1994,1995 Andy Dean, Graham Dean.
  5.  
  6.    Welcome to ImageStudio, shareware image processing and conversion
  7. package for the Amiga.
  8.  
  9.    This document applies to version 2.0.x, written on 13th March 1995,
  10. Copyright (C) 1994,1995 Andy Dean, Graham Dean.
  11.  
  12. Introduction
  13. ************
  14.  
  15.    This chapter gives a brief introduction into the features offered by
  16. the program.
  17.  
  18. Copyright and Disclaimer
  19. ========================
  20.  
  21.    No guarantee of any kind is given that the programs described in
  22. this document are 100% reliable. You are using this material at your
  23. own risk. The authors *can not* be made responsible for any damage
  24. which is caused by using these programs.
  25.  
  26.    The unregistered package is freeware, but still copyright by Andy
  27. Dean and Graham Dean. This means that you can copy it freely as long as
  28. you don't ask for a more than nominal copying fee.
  29.  
  30.    The registered version of the program and its associated keyfile
  31. *may not* be freely distributed.
  32.  
  33.    Permission is granted to include the unregistered package in
  34. Public-Domain collections, especially in the excellent Fred Fish Amiga
  35. Disk Library (including CD ROM versions of it). The distribution file
  36. may be uploaded to Bulletin Board Systems or FTP servers. If you want
  37. to distribute this program you must use the original unmodified
  38. distribution archive.
  39.  
  40.    This program (or parts of it) may not be included or used in
  41. commercial programs unless by written permission from the authors.
  42.  
  43.    Installer and Installer project icon (c) Copyright 1991-93
  44. Commodore-Amiga, Inc.  All Rights Reserved. Reproduced and distributed
  45. under license from Commodore.
  46.  
  47.    INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE; NO
  48. WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK. NO LIABILITY OR
  49. RESPONSIBILITY IS ASSUMED.
  50.  
  51.    amigaguide.library (c) Copyright 1991-93 Commodore-Amiga, Inc. All
  52. Rights Reserved. Reproduced and distributed under license from
  53. Commodore.
  54.  
  55.    AMIGAGUIDE SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE; NO
  56. WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK. NO LIABILITY OR
  57. RESPONSIBILITY IS ASSUMED.
  58.  
  59.    Jonathan Forbes, the author of LX, has granted permission to include
  60. the unmodified Version 1.03 LX executable by itself (i.e. without
  61. documentation) with any PUBLIC DOMAIN or SHAREWARE package, provided
  62. that a brief credit note is included in the program's documentation
  63. (see Credits).
  64.  
  65. Machine requirements
  66. ====================
  67.  
  68.    ImageStudio requires the following system to run:
  69.  
  70.    * Workbench 2.04 or above.
  71.  
  72.    * Around 1 megabyte of free memory.
  73.  
  74.    * Several megabytes of free hard disk space.
  75.  
  76.    If ImageStudio is run on an AGA machine (A1200 or A4000), it will
  77. use the new display modes and palette routines to improve the quality
  78. of the internal viewer images.
  79.  
  80. Brief description
  81. =================
  82.  
  83.    ImageStudio is written for the casual graphics user who wishes to
  84. convert or manipulate various graphics formats on a modest Amiga
  85. system. There are several commercial offerings available, however the
  86. casual user is paying a lot of money for many facilities and options
  87. they would probably never use.
  88.  
  89.    Bitmap graphics, by their nature, usually require large amounts of
  90. RAM. One of the main objectives of ImageStudio was to reduce this
  91. burden by utilising virtual memory - most users have more spare hard
  92. disk space than spare RAM.
  93.  
  94.    ImageStudio works with several buffers at any one time (dependant on
  95. how many levels of undo are specified), each of these buffers can hold
  96. either colour-mapped or 24-bit images. For a detailed description of
  97. colour-mapped and 24-bit images, See Image types.
  98.  
  99.    ImageStudio comes with a fully featured ARexx port, which allows the
  100. writing of macro scripts to automate repetative processes and also
  101. allows communication with other ARexx aware programs. Again, ARexx has
  102. the reputation of being "something pretty difficult", so we've
  103. simplified the use of ARexx in ImageStudio by allowing the user to
  104. create, edit and run scripts entirely within ImageStudio - ImageStudio
  105. even provides a blank template as a starting point for each new script.
  106.  
  107. List of features
  108. ================
  109.  
  110.    General:
  111.    * Full 24-bit image buffers, with optimizations for colour-mapped
  112.      (palette based) images.
  113.  
  114.    * Up to 100 levels of undo / redo.
  115.  
  116.    * User configurable virtual memory.
  117.  
  118.    * Fully featured, easy to use, ARexx interface.
  119.  
  120.    * User saveable preferences.
  121.  
  122.    * Operations applicable to the whole image or a selected region.
  123.  
  124.    * Up to 256 greyshade preview window (with optional dither).
  125.  
  126.    * Zoom on preview window.
  127.  
  128.    * Internal / external viewers (external for third party 24-bit
  129.      graphics cards).
  130.  
  131.    * Loading / saving / manipulating of AGA image formats (e.g. 256
  132.      colours, HAM8) on non-AGA machines.
  133.  
  134.    * Max image size of 32000 x 32000 (limited to 250 x 250 in the
  135.      unregistered version).
  136.  
  137.    * Copy / paste to / from the system clipboard.
  138.  
  139.    * Runs on all Workbench 2.04+ Amiga's - utilises AGA chipset if
  140.      available.
  141.  
  142.    * Online AmigaGuide help, as well as ASCII, TeX `.dvi' and
  143.      PostScript documentation.
  144.  
  145.    * Multi-level help error requesters.
  146.  
  147.    * Standard Workbench2 interface.
  148.  
  149.    * Public screen.
  150.  
  151.    * Requires no third party libraries or utilities.
  152.  
  153.    Import:
  154.    * IFF-ILBM formats (Standard palette based, HAM6, HAM8, extra
  155.      halfbright, ILBM24)
  156.  
  157.    * BMP
  158.  
  159.    * GIF (conforming to GIF87a)
  160.  
  161.    * JPEG (conforming to JFIF standard)
  162.  
  163.    * PCX
  164.  
  165.    * Targa
  166.  
  167.    * Any installed Amiga datatype (with Workbench 2.1+)
  168.  
  169.    Export:
  170.    * IFF-ILBM formats (Standard palette based, HAM6, HAM8, extra
  171.      halfbright, ILBM24)
  172.  
  173.    * BMP
  174.  
  175.    * EPS
  176.  
  177.    * JPEG (conforming to JFIF standard)
  178.  
  179.    * PCX
  180.  
  181.    * Targa
  182.  
  183.    Colour Balance:
  184.    * All operations are available to the R,G,B components separately.
  185.  
  186.    * Brightness ( upto ±100%)
  187.  
  188.    * Contrast (non to full)
  189.  
  190.    * Gamma ( + and - )
  191.  
  192.    Convolution:
  193.    * Many supplied convolution filters.
  194.  
  195.    * User definable convolutions, load and save to disk.
  196.  
  197.    Effects:
  198.    * Built in effects: Dynamic range expansion, FlipX, FlipY, RollX,
  199.      RollY, Negative, Greyscale, Highlight, Shadow, Random, Pixelize,
  200.      Remove isolated pixels.
  201.  
  202.    Scale:
  203.    * Crop to selected region.
  204.  
  205.    * Increase / decrease scale by percentage or absolute image size.
  206.  
  207.    * Simple scale or colour averaged.
  208.  
  209.    Colour reduction:
  210.    * Increase colour mapped images to 24-bit.
  211.  
  212.    * Decrease number of colours in 24-bit or colour mapped images via
  213.      Heckbert median cut algorithm.
  214.  
  215.    * Dithers available for colour reduction: None, Floyd-Steinberg,
  216.      Burkes, Stucki, Sierra, Jarvis, Stevenson-Arce.
  217.  
  218.    Palette:
  219.    * Edit palette colours and ranges.
  220.  
  221.    * Save current palette.
  222.  
  223.    * Force palette onto current image, dithering if necessary (all
  224.      dithers available).
  225.  
  226. Shareware version
  227. =================
  228.  
  229.    To encourage users to register, the freely distributable version of
  230. ImageStudio is limited to loading in pictures upto 250x250 pixels. All
  231. other operations are available.
  232.  
  233.    For details on how to register, See How to register.
  234.  
  235. Starting ImageStudio
  236. ====================
  237.  
  238.    ImageStudio can be started from either the Workbench or CLI. From
  239. the Workbench it is simply a case of double-clicking on the icon.
  240. ImageStudio supports shift-clicking on a file to start the program with
  241. (see the Workbench manual for more information).
  242.  
  243.    To start ImageStudio from the CLI, simply type:
  244.  
  245.      run ImageStudio [filename]
  246.  
  247.    where `filename' is an optional file to load in at startup. The full
  248. range of tooltypes is supported, and can be appended to the CLI
  249. command. For example:
  250.  
  251.      run ImageStudio "SCREENNAME=Image2" "PREVIEWDITHER=YES" [filename]
  252.  
  253.    would start the program on a public screen named `Image2' with
  254. preview dithering on. See Tooltypes, for a full list of available
  255. tooltypes.
  256.  
  257. Upgrading from version 1.x.x
  258. ============================
  259.  
  260.    All versions of ImageStudio from version 2.0.0 require a *keyfile*
  261. to work fully.
  262.  
  263.    Users who have registered the ImageStudio package after v2.0.0 will
  264. be provided with a unique keyfile that can be used immediately.
  265.  
  266.    Users who have registered v1.x.x of the ImageStudio package will
  267. have to create their own keyfile using the `Create keyfile' option
  268. under the `Project' menu. See Create_keyfile, for more details.
  269.  
  270.    The idea of the keyfile is that once a keyfile has been created, it
  271. can be placed somewhere where all the programs in the ImageStudio
  272. package can access it. This is typically either the ImageStudio drawer
  273. or the `S:' directory. The user should never need to create another
  274. keyfile, it should work with all future versions of the software; for
  275. this reason, it is suggested that the keyfile is backed up and kept
  276. somewhere safe, as we will be unwilling to give out replacements should
  277. you loose it.
  278.  
  279.    It should also be noted that each keyfile is unique to each user,
  280. and your keyfile should not be given to others. If the number of
  281. registrations should drop due to people abusing the keyfile scheme and
  282. distributing pirate versions of the program, we shall be forced to do
  283. one or more of the following:
  284.  
  285.   1. Stop providing free upgrades. All programs will be individually
  286.      stamped and all upgrades must be paid for.
  287.  
  288.   2. Remove online help and provide printed manuals instead. This will
  289.      naturally raise the price substantially.
  290.  
  291.   3. Sell the software to a software publisher for commercial
  292.      distribution. This is likely to lead to a large price increase.
  293.  
  294.   4. Stop developing ImageStudio and related products.
  295.  
  296.    We see no reason why we should have to resort to any of these
  297. measures, but if you're using a pirated copy of ImageStudio now and you
  298. refuse to register, you *WILL* force this upon us.
  299.  
  300.    If you are using a pirate copy of ImageStudio, so will hundreds of
  301. others. A hundred orders to us is the difference between us writing the
  302. next version of the program, and us abandoning it. It really is your
  303. choice.
  304.  
  305. Configuring ImageStudio
  306. =======================
  307.  
  308.    In order to benefit from ImageStudio's virtual memory, it is
  309. recommended that the default location used for the storage of the
  310. temporary files is changed. The default location for the storage of
  311. these files is `T:' which is usually in RAM - we want to move this out
  312. onto harddisk.
  313.  
  314.    To do this, select `Prefs' from the `Project' menu and open up the
  315. prefs requester. Change the TEMPDIR preference to the desired location
  316. for the temporary files. See Prefs, for more information on changing
  317. preference variables.
  318.  
  319.    It is suggested that a drawer be made on a harddisk partition with
  320. lots of space to store these files. For example, make a drawer in your
  321. `Work:' partition called `tmp', and change the TEMPDIR preference to
  322. read `Work:tmp'.
  323.  
  324. Tutorial
  325. ********
  326.  
  327.    This chapter introduces ImageStudio by way of a few tutorials
  328. demonstrating commonly performed operations.
  329.  
  330. Changing the image format
  331. =========================
  332.  
  333.    The simplest use of ImageStudio is just as a file format converter;
  334. See File formats, for details about the supported file formats.
  335.  
  336.    In this example we will change the image format of the
  337. `FW14B_250x250.gif' from GIF to IFF-ILBM.
  338.  
  339.   1. Load the file `FW14B_250x250.gif' from the `Pics' drawer. To do
  340.      this, select `Open' from the `Project' menu. When the file
  341.      requester opens, select the file and it will load into
  342.      ImageStudio. The greyscale preview will show the image.
  343.  
  344.   2. The Infobar at the bottom of the screen shows the current image
  345.      size and number of colours, as well as a fuelgauge showing
  346.      progress when applicable. The current co-ordinates of the pointer
  347.      are also shown when the preview window is active.
  348.  
  349.   3. Open the save requester. To do this, select `Save' from the
  350.      `Project' menu. A requester will open, containing (amongst other
  351.      things) possible save formats.
  352.  
  353.   4. Select the file format to save. To do this, click on `IFF-ILBM' in
  354.      the listview.
  355.  
  356.   5. Change the filename to avoid overwriting the original file. To do
  357.      this, type the new filename - `FW14B_250x250.ilbm' into the
  358.      `Filename' string gadget.
  359.  
  360.   6. Save out the file by clicking on the `Save' gadget.
  361.  
  362.    The file will now be saved out as a 256 colour IFF-ILBM onto the
  363. disk.
  364.  
  365.    Note:
  366.  
  367.    * ImageStudio automatically recognises the filetype of the incoming
  368.      image. It will use its internal loaders first, then trying
  369.      datatypes if running on Workbench 2.1+.
  370.  
  371.    * All time consuming operations show their progress in the Infobar's
  372.      fuelgauge and can be aborted by clicking on the `Abort' gadget.
  373.  
  374. Changing the number of colours
  375. ==============================
  376.  
  377.    Often it is necessary to reduce the number of colours in an image,
  378. either to reduce the file size or produce images compatible with
  379. non-AGA software.
  380.  
  381.    In this example we will reduce the number of colours in the
  382. `FW14B_250x250.gif' image from 256 colours to 16 colours.
  383.  
  384.   1. Load in the `FW14B_250x250.gif' from the `Pics' drawer, if it not
  385.      already loaded.
  386.  
  387.   2. Open the colours requester by selecting `Colours...' from the
  388.      `Process' menu.
  389.  
  390.   3. The gadgets in the requester will show that the image is a 256
  391.      colour colour-mapped image. Change the number of colours to 16 by
  392.      clicking on the cycle gadget or sliding the `No. of colours'
  393.      slider.
  394.  
  395.   4. Leave the `Colour choice' and `Dithering' gadgets for now.
  396.  
  397.   5. Click on `OK' to perform the operation.
  398.  
  399.   6. When the operation is complete, view the image with the internal
  400.      viewer by selecting `View' from the `View' menu. A 16 colour Lores
  401.      image will be displayed.
  402.  
  403.   7. Remove the internal viewer by clicking the right mouse button.
  404.  
  405.    The colour reduced image should contain all the main colours used in
  406. the original image (blue, yellow, red and grey), but should contain
  407. less shades of the colours. To give the impression of more colours,
  408. dithering can be used to mix pixels of the chosen colours. To perform
  409. the last operation with dithering:
  410.  
  411.   1. Undo the colour reduction operation to return to the original 256
  412.      colour image. To do this, select `Undo' from the `Edit' menu.
  413.  
  414.   2. Bring up the colours requester as before and select 16 colours.
  415.      Also change the `Dithering' gadget from `None' to
  416.      `Floyd-Steinberg'.
  417.  
  418.   3. Click on `OK' to perform the operation.
  419.  
  420.   4. View as before.
  421.  
  422.    The image will now perform more gradual changes to colour changes.
  423.  
  424. Changing the colour balance
  425. ===========================
  426.  
  427.    When receiving images from external sources (scanners, frame
  428. grabbers) it is ofter necessary to change to "colour balance" of the
  429. image. Frame grabbers, for example, may have too much `red' in the
  430. image.
  431.  
  432.    In this example we shall see the effects on the
  433. `ColourFace_200x250RED.ham6' image of altering the colour balance.
  434.  
  435.   1. Load in the `ColourFace_200x250RED.ham6' image from the `Pics'
  436.      drawer. As the file is in HAM6 format, it is turned into 24-bit
  437.      internally.
  438.  
  439.   2. View the image with the internal viewer. As the Amiga doesn't have
  440.      true 24-bit screenmodes, the internal viewer will approximate the
  441.      24-bit image with a HAM preview screen (HAM6 on ECS machines, HAM8
  442.      on AGA machines). It should be obvious from the viewer that the
  443.      image is too red.
  444.  
  445.   3. Open the balance floating palette if it is not already open. Do
  446.      this by selecting `Show balance' from the `Tools' menu.
  447.  
  448.   4. To remove some of the red component, make sure that we are only
  449.      dealing with the red component. To do this, make sure that only
  450.      the `Red' checkbox at the bottom of the floating palette is
  451.      checked.
  452.  
  453.   5. Reduce the brightness slider, by say 20%. The graph on the right
  454.      of the floating palette will reflect the change (see Show_balance
  455.      for more details on the graph).
  456.  
  457.   6. View the image again, this time the image should have lost much of
  458.      its unnatural red tint.
  459.  
  460.    Brightness and contrast work in very much the same way as a TV set,
  461. but gamma may need some explanation.
  462.  
  463.    When printing an image out, it is usual for light colours to be
  464. resolved well and dark colours to be reduced to a dark mush. It is
  465. therefore preferable to have some way boost the brightness of the
  466. mid-dark colours whilst still leaving the very light colours light and
  467. the very dark colours dark. Gamma is the operator to perform this
  468. change. By applying a small amount of positive gamma, a much better
  469. balanced image can be produced for printing out.
  470.  
  471.    See Show_balance, for more information on the balance floating
  472. palette.
  473.  
  474. Applying an effect
  475. ==================
  476.  
  477.    ImageStudio has many built in effects for performing commonly used
  478. operations.
  479.  
  480.    This example will remove some noise from a region of
  481. `HappyFace_240x250.bmp', a simulated scanned image.
  482.  
  483.   1. Load in the `HappyFace_240x250.bmp' image from the `Pics' drawer.
  484.  
  485.   2. The image represents what may happen if you hand scan an image
  486.      into the computer - lots of "noise".
  487.  
  488.   3. Open the effects floating palette if it is not already open. Do
  489.      this by selecting `Show effects' from the `Tools' menu.
  490.  
  491.   4. Select `Remove isolated pixels' in the listview of the floating
  492.      palette. If you clicked on the `Apply' button now, the effect
  493.      would be applied to the whole image. To compare the image before
  494.      and after the effect, we'll only apply the effect to the left hand
  495.      side of the image.
  496.  
  497.   5. Open the `Region co-ords' requester by selecting `Region
  498.      co-ords...' from the `Edit' menu. To select the left hand side of
  499.      the image, set the following values in the gadgets: Min x = 0, Min
  500.      y = 0, Width = 120, Height = 250. Make sure that the radio button
  501.      on the left of the requester shows that the Width / Height are
  502.      being used, not the Max values; click on `Ok'.
  503.  
  504.   6. A region of "crawling ants" will show the selected region.
  505.  
  506.   7. Click on `Apply' of the effects floating palette. The `Remove
  507.      isolated pixels' effect will be applied to the selected region.
  508.  
  509.   8. The left of the image will have had a lot of the noise
  510.      automatically removed. Clear the selected region by clicking in
  511.      the preview window.
  512.  
  513.    Note:
  514.    * Not all effects can be applied to regions and whole images. See
  515.      Effects, for a comprehensive description of all the available
  516.      effects.
  517.  
  518.    See Show_effects, for more information on the effects floating
  519. palette.
  520.  
  521. Applying a convolution
  522. ======================
  523.  
  524.    Convolution is a powerful image processing tool, ImageStudio allows
  525. the user to define their own convolution filters.
  526.  
  527.    This example will apply a `Texture' filter to the
  528. `CheetahFace_250x200.ilbm' image.
  529.  
  530.   1. Load in the `CheetahFace_250x200.ilbm' image from the `Pics'
  531.      drawer.
  532.  
  533.   2. The `CheetahFace_250x200.ilbm' image is a 32 colour colour-mapped
  534.      image and convolution only works in 24-bit (see Show_convolves for
  535.      information on how convolves actually work). We therefore need to
  536.      turn the image into a 24-bit.
  537.  
  538.   3. Open the colours requester and click on the `16 million colours'
  539.      radio button on the left. Click on `OK'. The image in converted
  540.      into 24-bit.
  541.  
  542.   4. Open the convolves floating palette if it is not already open. Do
  543.      this by selecting `Show convolves' from the `Tools' menu.
  544.  
  545.   5. There should be many convolution filters in the list, click on
  546.      `Texture'.
  547.  
  548.   6. Apply the convolution filter to the image by clicking on `Apply'
  549.      at the bottom of the floating palette.
  550.  
  551.   7. After the filter has been applied, you could view the result with
  552.      the internal viewer in 24-bit, but for a clearer image we'll
  553.      convert it back to 32 colours.
  554.  
  555.   8. Open the colours requester, select `No. colours' = 32 and `Dither'
  556.      = `None'. Click on `OK'.
  557.  
  558.   9. Now view the 32 colour image with the internal viewer. The image
  559.      now has a rough paper(?) texture applied to it.
  560.  
  561.    Note:
  562.  
  563.    * There are many commonly used convolution filters available, it is
  564.      up to the user to build a collection suitable filters for their
  565.      own use.
  566.  
  567.    See Show_convolves, for more information on the convolves floating
  568. palette.
  569.  
  570. Scaling the image
  571. =================
  572.  
  573.    In this example we will scale the `CheetahFace_250x200.ilbm' image
  574. from 250 x 200 pixels down to 80 x 40 (icon size).
  575.  
  576.   1. Load in the `CheetahFace_250x200.ilbm' image from the `Pics'
  577.      drawer.
  578.  
  579.   2. Open the scale requester by selecting `Scale...' in the `Process'
  580.      menu.
  581.  
  582.   3. Set the `Width' = 80 and `Height' = 40. Click on `OK'.
  583.  
  584.   4. The image is re-scaled to that of an icon.
  585.  
  586.    The finish the creation of the icon, we can load it into Commodore's
  587. `IconEdit' program. Both ImageStudio and IconEdit support the
  588. clipboard, so we can copy the image into the clipboard from ImageStudio
  589. and paste it into IconEdit.
  590.  
  591.   1. Copy the image to the clipboard by selected `Copy' in the `Edit'
  592.      menu of ImageStudio.
  593.  
  594.   2. Run IconEdit from the `Tools' drawer of your system partition.
  595.  
  596.   3. Select `Paste' from IconEdit's `Edit' menu. The image will be
  597.      copied into IconEdit for final editing.
  598.  
  599. Menu options
  600. ************
  601.  
  602.    This chapter describes ImageStudio's menu options in detail.
  603.  
  604.    Selecting a main menu from the list below will give a list of
  605. sub-menu options.
  606.  
  607. Project
  608. =======
  609.  
  610.    Select the submenu you wish to investigate.
  611.  
  612. Open
  613. ----
  614.  
  615.    Keyboard shortcut - `Amiga - O'
  616.  
  617.    This is how the user loads in an image into the program.
  618.  
  619.    A file requester will appear, through which the user can select a
  620. file to open. Upon selecting a file, ImageStudio will test the file
  621. against its known file formats - loading the file if the image type is
  622. recognised. If the image format is not recognised, an error will be
  623. shown.
  624.  
  625.    In most cases the image will load directly into ImageStudio; however
  626. in the case of HAM6 and HAM8 formats the image is converted into 24-bit
  627. data as it is loaded in, as ImageStudio cannot work directly on HAM
  628. images. For a detailed description of colour-mapped and 24-bit images,
  629. See Image types.
  630.  
  631. Save
  632. ----
  633.  
  634.    Keyboard shortcut - `Amiga - S'
  635.  
  636.    The save requester allows the user to choose the filename for the
  637. saved image as well as the image's format.
  638.  
  639.    To change the filename, either click in the string gadget and edit
  640. the filename directly or click on the `Choose...' gadget to select the
  641. filename with a file requester.
  642.  
  643.    To change the image format of the file to be saved, click in the
  644. listview on the appropriate format. Depending on the format selected,
  645. depends on whether the `Options...' and `Screen...' buttons remain
  646. unghosted. Some formats (e.g. IFF-ILBM) have further options available
  647. by clicking on the `Options...' button. The `Screen...' button can be
  648. clicked on to change the screenmode of the saved image (only used with
  649. IFF-ILBM images).
  650.  
  651.    When the user has selected the filename and the image format, the
  652. file can be saved by clicking on `OK' or no action can be performed by
  653. clicking on `Cancel'. If the currently selected filename already
  654. exists, the user will be warned that they are about to overwrite it.
  655.  
  656. Screen mode
  657. -----------
  658.  
  659.    The user may select the current screen's resolution and number of
  660. colours.
  661.  
  662.    The screenmode requester allows the user to change the properties of
  663. the current screen. Click on the desired screenmode as well as the
  664. size, number of colours and overscan settings. To bring the changes
  665. into effect, click on `OK' else to perform no action click on `Cancel'.
  666.  
  667. Prefs
  668. -----
  669.  
  670.    The user may configure the program to their own needs with the prefs
  671. requester. The requester consists of a scrolling list with all the
  672. available preferences, several gadgets that show the current tooltype
  673. value whilst allowing the user to change it, and a couple of checkboxes
  674. for saving the current screenmode and window positions. When the user
  675. is happy with the current values, they may save them as defaults by
  676. clicking `Save', use them for the current session by clicking `Use' or
  677. discard the changes by clicking `Cancel'.
  678.  
  679.    The preferences in the list are separated into string values (e.g.
  680. filenames, ARexx port name etc...), numeric values (e.g. virtual memory
  681. pagesize, number of undo buffers etc...) and boolean, or ON / OFF
  682. values (e.g. Online AmigaGuide help, splash window on startup etc...).
  683. A short description of the preference is shown on the left of the list,
  684. the tooltype (see Tooltypes) name is given on the right.
  685.  
  686.    To change a preference value, click on its name in the list. The
  687. current value will be copied to the text or numeric value below; the
  688. exception to this is a boolean preference, see below. The value is
  689. changed by changing the displayed value in the gadget, it will be
  690. stored as this value if another preference is selected or the user
  691. presses `Save' or `Use'. If a string preference is selected that
  692. requires a filename to be chosen, the `Choose...' gadget can be used to
  693. select the desired filename from a file requester.
  694.  
  695.    Boolean preferences are changed by double-clicking on their entries
  696. in the list. The value will toggle between the two states.
  697.  
  698.    If the user wishes to save the current screenmode or window
  699. positions to be the defaults next time the program is started, they may
  700. click on the `Save screenmode' and / or the `Save window positions'
  701. checkboxes.
  702.  
  703.    When changing any of the preferences that require the use of an
  704. external program (e.g. the external text editor), the string must be
  705. formatted to contain a `%s' placed where the filename should be placed.
  706.  
  707.    The default string of
  708.  
  709.      run sys:Tools/Memacs <NIL: >NIL: "%s"
  710.  
  711.    for the `TEXTEDITOR' preference would run Commodore's Micro-emacs
  712. text editor to edit files. It is recommended that the "run" is added at
  713. the start of the string to run the program in the background (i.e.
  714. ImageStudio doesn't have to wait for the text editor to finish) and
  715. that the double-quotes are placed around the `%s' to allow for
  716. filenames containing spaces.
  717.  
  718.    The preferences values may also be read (see ARexx_PREF_GET) and
  719. written (see ARexx_PREF_SET) from ARexx.
  720.  
  721. About
  722. -----
  723.  
  724.    This brings up a small requester containing information about the
  725. program version number and the user name (only in registered version).
  726.  
  727. Info
  728. ----
  729.  
  730.    This brings up an information requester containing memory and file
  731. usage information.
  732.  
  733.    The `Memory' figures are the amount of RAM used by the buffers, the
  734. `VMem' figures are the amount of disk space used by the virtual memory.
  735.  
  736.    At the bottom of the requester the amount of free RAM and ARexx port
  737. name is shown.
  738.  
  739. Help
  740. ----
  741.  
  742.    Keyboard shortcut - `Amiga - H'
  743.  
  744.    This brings up the main page of the AmigaGuide document.
  745.  
  746.    In order for AmigaGuide help to work, the following must be
  747. satisfied:
  748.  
  749.   1. Commodore's AmigaGuide help has to be installed on your system.
  750.      This comes with Workbench3.0+ and can be freely obtained for
  751.      earlier versions of Workbench.
  752.  
  753.   2. The preference `HELP' must be `ON' (see Prefs).
  754.  
  755.   3. The *full* filename of the AmigaGuide helpfile must be given in
  756.      the `HELPFILE' preference (see Tooltype_HELPFILE).
  757.  
  758.    It is recommended that help be turned off if you are short of memory.
  759.  
  760.    Once help is running, it can either be accessed by selecting the
  761. `Help' submenu in the `Project' menu or by performing a standard "help
  762. menu pick" on a menu item. To do this, highlight the menu item you item
  763. you wish to know more about, but instead of releasing the right mouse
  764. button to select the item, press `Help' on the keyboard. To clarify,
  765. perform the following steps:
  766.  
  767.   1. Press right mouse button.
  768.  
  769.   2. Highlight menu item you wish to find out help on.
  770.  
  771.   3. Press `Help' on the keyboard.
  772.  
  773.   4. Release right mouse button.
  774.  
  775. Create keyfile
  776. --------------
  777.  
  778.    This allows registered users with v1.x.x of ImageStudio to create a
  779. keyfile to `unlock' the freely distributable versions of ImageStudio.
  780.  
  781.    A file requester will open asking the user to select their
  782. registered version of ImageStudio v1.x.x. If ImageStudio recognises
  783. this as a registered copy, a keyfile with the name given by the
  784. `KEYFILE' preference (see Tooltype_KEYFILE) will created.
  785.  
  786.    If all is successful, when ImageStudio is next started it will be
  787. fully operational.
  788.  
  789.    A plea:
  790.  
  791.      Please do not give your keyfile to anyone else. Each keyfile is
  792.      individual to each user, so should your keyfile get into
  793.      distribution it can be traced back to you. Don't try altering your
  794.      keyfile, it won't work.
  795.  
  796.      Many thanks for your co-operation in this matter.
  797.  
  798. Iconify
  799. -------
  800.  
  801.    Keyboard shortcut - `Amiga - !'
  802.  
  803.    This reduces the program to a small icon on the Workbench screen. To
  804. reopen the program, simply double-click on the icon. In order to reduce
  805. the amount of memory used by the program when it is iconified, some of
  806. the working memory used by the program is purged; this could lead to a
  807. freeing of several hundred K of memory, depending on the virtual memory
  808. page size and data in internal caches.
  809.  
  810. Quit
  811. ----
  812.  
  813.    This quits the program. If any changes remain unsaved, the user is
  814. warned before the program quits.
  815.  
  816. Edit
  817. ====
  818.  
  819.    Select the submenu you wish to investigate.
  820.  
  821. Undo
  822. ----
  823.  
  824.    Keyboard shortcut - `Amiga - U'
  825.  
  826.    Undos last operation.
  827.  
  828.    The maximum number of undos is set in the preferences requester, See
  829. Prefs.
  830.  
  831. Redo
  832. ----
  833.  
  834.    Keyboard shortcut - `Amiga - R'
  835.  
  836.    Redos last undo.
  837.  
  838.    The maximum number of redos is set in the preferences requester, See
  839. Prefs.
  840.  
  841. Copy
  842. ----
  843.  
  844.    Keyboard shortcut - `Amiga - C'
  845.  
  846.    Copies the current image to the clipboard.
  847.  
  848.    Once the image has been copied to the clipboard it can be used by
  849. any other program that supports the Amiga clipboard.
  850.  
  851. Paste
  852. -----
  853.  
  854.    Keyboard shortcut - `Amiga - V'
  855.  
  856.    Reads in image from the clipboard.
  857.  
  858. Region co-ords
  859. --------------
  860.  
  861.    Keyboard shortcut - `Amiga - D'
  862.  
  863.    Allows the user to select a region by typing the co-ordinates.
  864.  
  865.    The region co-ords requester allow the user to specify the selected
  866. region by either typing in the co-ordinates of the minimum and maximum
  867. corners of the rectangle or the minimum co-ordinates and the
  868. rectangle's width and height. A radio button on the left of the
  869. requester shows whether the maximum co-ords or the width and height are
  870. to be used to select the region.
  871.  
  872.    If there is already a selected region, these values are copied into
  873. the requester when it is opened.
  874.  
  875. Region clear
  876. ------------
  877.  
  878.    Removes any selected region from the preview window.
  879.  
  880.    As well as this menu item, the region can be cleared by simply
  881. clicking in the preview window.
  882.  
  883. Select all
  884. ----------
  885.  
  886.    Keyboard shortcut - `Amiga - A'
  887.  
  888.    Makes the selected region the whole of the displayed image in the
  889. preview window.
  890.  
  891.    Note:
  892.  
  893.    If the user has zoomed in on a region of the image (see Zoom_in),
  894. `Select all' will not select the whole image but just the displayed
  895. image in the preview window.
  896.  
  897. View
  898. ====
  899.  
  900.    Select the submenu you wish to investigate.
  901.  
  902. Full image
  903. ----------
  904.  
  905.    Keyboard shortcut - `Amiga - F'
  906.  
  907.    Displays the whole image in the preview window.
  908.  
  909. Zoom in
  910. -------
  911.  
  912.    Keyboard shortcut - `Amiga - <'
  913.  
  914.    Zooms in to make the currently selected region fill the preview
  915. window.
  916.  
  917. Zoom out
  918. --------
  919.  
  920.    Keyboard shortcut - `Amiga - >'
  921.  
  922.    Zooms out by a factor of 3 times.
  923.  
  924. Internal viewer
  925. ---------------
  926.  
  927.    Keyboard shortcut - `Amiga - I'
  928.  
  929.    Views the current image with the internal viewer.
  930.  
  931.    If the image is colour-mapped, the viewer will try and open a screen
  932. with the same number of colours as the image. Under the AGA graphics
  933. chipset this should always be possible (providing there is enough free
  934. CHIP RAM), however under the ECS chipset it is impossible to open up
  935. screens of greater than 5 bitplanes. Viewing a 256 colour image, for
  936. example, on a ECS machine is not possible directly.
  937.  
  938.    If the image originated as an IFF-ILBM, the viewer screen will try
  939. and open up in the same screen mode as the image. If this is not
  940. possible, the user may change to a more suitable screenmode with the
  941. `View screenmode' menu option, See View_screenmode.
  942.  
  943.    Viewing 24-bit images is done by using the HAM screenmodes (HAM6
  944. under ECS, HAM8 under AGA) to approximate the 24-bit image. In order to
  945. keep the viewer reasonably fast, the HAM image sometimes suffers from
  946. `colour fringing' as the approximation is relatively crude (especially
  947. under ECS).
  948.  
  949.    If the internal viewer won't display the current image, check the
  950. following:
  951.  
  952.   1. If the image was loaded in as an IFF-ILBM, the saved screenmode
  953.      may not be supported by your machine. For example, the screenmode
  954.      may be `Productivity' and your machine doesn't have a multiscan
  955.      monitor. Simply change the screenmode to one your machine does
  956.      support - e.g.  `Hires Laced'
  957.  
  958.   2. A colour-mapped image contains more colours than it is possible to
  959.      show on a ECS machine. Either reduce the number of colours in the
  960.      image to a number that can be displayed or increase the number of
  961.      colours to 16 million (see Colours) and use the internal viewer to
  962.      display an approximation in a HAM screen.
  963.  
  964.   3. Make sure you have enough CHIP RAM free to open the screen. Large
  965.      256 colour and 16 million colours images take lots of CHIP RAM.
  966.  
  967.    To stop the viewer at any time, press the right mouse button or
  968. click on `Abort' in the infobar.
  969.  
  970. View screenmode
  971. ---------------
  972.  
  973.    This allows the user to set the screenmode of the image, and
  974. therefore of the internal viewer.
  975.  
  976.    Click on the desired screenmode for the image in the screenmode
  977. requester. The current screenmode is highlighted in the listview.
  978.  
  979. External viewer
  980. ---------------
  981.  
  982.    Uses an external viewer program to view the image.
  983.  
  984.    This calls up the external viewer program to view the current image.
  985. If a third party 24-bit graphics card is installed, a viewer can be
  986. used to view the image on that.
  987.  
  988.    To specify the external viewer to use, See Prefs.
  989.  
  990. Process
  991. =======
  992.  
  993.    Select the submenu you wish to investigate.
  994.  
  995. Crop
  996. ----
  997.  
  998.    Keyboard shortcut - `Amiga - W'
  999.  
  1000.    Crops the current image to the selected region.
  1001.  
  1002.    This reduces the image to only that which is in the selected region.
  1003. A region must be selected in order for this operation to work.
  1004.  
  1005. Scale
  1006. -----
  1007.  
  1008.    Keyboard shortcut - `Amiga - L'
  1009.  
  1010.    Reduces / increases the size of the image.
  1011.  
  1012.    The scale requester allows the user to change the image's width /
  1013. height by either selecting the absolute size of the new image or the
  1014. percentage by which to scale. A radio gadget to the left shows which
  1015. operation will be performed.
  1016.  
  1017.    The percentage value may also be changed by sliding the width and
  1018. height sliders to achieve the desired final size; divide and multiply
  1019. by 2 buttons are provided to quickly scale the image by common amounts.
  1020.  
  1021.    Finally, two methods of scaling are supported: fast and colour
  1022. average. Fast scaling works with both colour-mapped and 24-bit images
  1023. and produces results adequate for most needs. If the image is to be
  1024. scaled up by a large amount the image may become very `blocky' and if
  1025. the image is scaled down a large amount, information in the image may
  1026. be lost. To reduce this, colour average scaling is available on 24-bit
  1027. images which reduces blockiness when increasing the scale and reduces
  1028. information loss when reducing the scale. Colour average rescale can
  1029. take significantly longer than a fast rescale.
  1030.  
  1031. Colours
  1032. -------
  1033.  
  1034.    Keyboard shortcut - `Amiga - K'
  1035.  
  1036.    Allows increasing / decreasing of the number of colours in the
  1037. image, with various dithers.
  1038.  
  1039.    The colours requester allows the user control over the number of
  1040. colours in the image. A radio button on the left hand side shows
  1041. whether the current image is colour-mapped or 24-bit.
  1042.  
  1043.    To increase the number of colours in a colour-mapped image, simply
  1044. select the new number of colours with the top cycle gadget or the `No.
  1045. colours' slider. Although the number of colours need not be a power of
  1046. 2 (2, 4, 8, 16, 32, 64, 128 or 256), internally the number will be
  1047. rounded up to the nearest power of 2. If, for example, a 16 colour
  1048. picture was increased to 20 colours then the image would become a 32
  1049. colour image.
  1050.  
  1051.    Colour-mapped images can also be turned into 24-bit images by
  1052. clicking on the `16 million colours' radio button on the left hand side
  1053. of the requester. This is useful if the user wishes to perform an
  1054. operation on a colour-mapped image that can only be performed on a
  1055. 24-bit image. The resultant 24-bit image can then be turned back into a
  1056. colour-mapped image after the operation is complete.
  1057.  
  1058.    To reduce the number of colours in an image, the same process is
  1059. followed as above with a few differences. Whereas increasing the number
  1060. of colours in an image does not lose any image information, it is
  1061. enevitable that reducing the number of colours must lose some of the
  1062. colour information. In order to help reduce the effect of this, two
  1063. other aids are used: dithering and palette choice.
  1064.  
  1065.    The result of colour reduction is always a colour-mapped image. The
  1066. user may select the number of colours in the final image with the top
  1067. cycle gadget or the `No. colours' slider. Again, although the number of
  1068. colours need not be a power of  2 (2, 4, 8, 16, 32, 64, 128 or 256),
  1069. internally the number will be rounded up to the nearest power of 2.
  1070. This though can be useful, as the user may want to reduce a 24-bit
  1071. image down to 30 colours - leaving 2 spare for his / her own use.
  1072.  
  1073.    In order to give the impression of more colours in the reduced
  1074. colour image, dithering can be employed to smoothly distribute colours
  1075. over areas of high colour change. `Floyd-Steinberg' is the most common
  1076. method and works well in most cases. For larger images, better contrast
  1077. can be obtained by using a more computationally intensive dither
  1078. (`Burkes', `Stucki', `Sierra', `Jarvis') and for the user with large
  1079. images and lots of time to spare, `Stevenson-Arce'. Again, there is no
  1080. hard and fast rule which method of dithering is best; if you're not
  1081. happy with the result, try a different method.
  1082.  
  1083. Palette
  1084. -------
  1085.  
  1086.    Allows the saving of the current palette and loading of new palette
  1087. onto the current image.
  1088.  
  1089.    Palettes can either be loaded, saved and edited in ImageStudio:
  1090.  
  1091. Palette load
  1092.      This is used to force a palette onto an image. The requester
  1093.      allows the user to choose the palette to load and any dithering to
  1094.      be applied to the image, See Colours. Various sample palettes are
  1095.      given with the distribution to map the image to the Workbench
  1096.      colours or a general purpose palette. New palettes can be
  1097.      generated with any popular paint package(1).
  1098.  
  1099. Palette save
  1100.      Saves the current palette out to the filename chosen by the user
  1101.      in the requester. The palette file is compatible with the popular
  1102.      paint packages. This option has no relevance for 24-bit images, as
  1103.      they have no palette.
  1104.  
  1105. Palette edit
  1106.      This brings up the palette edit requester. Here the user may edit
  1107.      each colour individually or move the colours around with the
  1108.      `Copy' and `Swap' operations. Colour ranges can be created and
  1109.      ranges may be sorted into order of increasing or decreasing
  1110.      luminosity.
  1111.  
  1112.      To edit a colour, simply click on the colour in the scrolling
  1113.      viewer and edit the R,G,B or H,S,V colour values (see Colour
  1114.      representations).
  1115.  
  1116.      To copy or swap two colours, click on the first one in the
  1117.      scrolling viewer then click on either `Copy' or `Swap'. The
  1118.      pointer will change to a "To" pointer to allow you to click on
  1119.      another colour to swap or copy to.
  1120.  
  1121.      To create a colour spread, alter one colour to be the start of the
  1122.      spread and alter another colour to be the end of the spread.
  1123.      Clicking on the first colour, then on `Spread', the on the end
  1124.      colour will cause a smooth transition of colours between the start
  1125.      and end colours.
  1126.  
  1127.      Sorting the colours is like a colour spread, only no colour values
  1128.      are actually changed. Simply click on the start of the sort,
  1129.      followed by either of the `Sort' buttons and finally on the end
  1130.      colour. The colours between these values will be sorted into
  1131.      either an increasing or decreasing order of luminosity.
  1132.  
  1133.      Finally, to apply the new colour palette to the image click on
  1134.      `OK'. To remap the image to the new palette (swap the old colours
  1135.      with their nearest match in the new palette), click on `Remap'.
  1136.  
  1137.      Whilst changing the colours in the scrolling viewer, the colours
  1138.      in the preview window will change. *This is not a representation
  1139.      of what is happening to the image!*.
  1140.  
  1141.    ---------- Footnotes ----------
  1142.  
  1143.    (1)  Except Brilliance, which seems to save all 384 colours of its
  1144. palette.
  1145.  
  1146. Tools
  1147. =====
  1148.  
  1149.    Select the submenu you wish to investigate.
  1150.  
  1151. Command shell
  1152. -------------
  1153.  
  1154.    Keyboard shortcut - `Amiga - 0'
  1155.  
  1156.    Opens the ARexx command shell.
  1157.  
  1158.    The command shell allows the user to enter ARexx commands directly,
  1159. without having to write a script file (see Show_scripts). This means
  1160. that the effect of the ARexx command may be seen directly, allowing the
  1161. commands to be experimented with before adding them to a script.
  1162.  
  1163.    The values returned by a command are displayed in a readable form in
  1164. the command shell.
  1165.  
  1166.    It should be noted that the command shell differs from executing an
  1167. actual ARexx script in the following ways:
  1168.  
  1169.   1. Each entered command is passed directly to ImageStudio without
  1170.      going through ARexx first. This means that no ARexx statements can
  1171.      be used (e.g. loops) and no variables may be defined.
  1172.  
  1173.   2. The string entered in the command shell is *exactly* what is seen
  1174.      by the ImageStudio command parser - nothing is evaluated. It is
  1175.      not neccessary therefore to enclose strings in both single and
  1176.      double quotes to stop them from being evaluated. For example, the
  1177.      following line is valid in the command shell, but invalid in an
  1178.      ARexx script as the string would have its quotes removed (see
  1179.      Common ARexx problems):
  1180.  
  1181.           REQUEST_MESSAGE TEXT "A string with spaces in it"
  1182.  
  1183.  
  1184.    Help on a particular command's template (see Command templates) can
  1185. be obtained by typing:
  1186.  
  1187.      help <command>
  1188.  
  1189.    in the command shell. The command's template for the input and
  1190. return values will be show.
  1191.  
  1192. Show balance
  1193. ------------
  1194.  
  1195.    Keyboard shortcut - `Amiga - 1'
  1196.  
  1197.    Opens / closes the balance floating palette.
  1198.  
  1199.    The balance floating palette is used to control the brightness,
  1200. contrast and gamma of the current image. On 24-bit images, the colour
  1201. balance can be altered on selected regions as well as the whole image
  1202. whereas colour-mapped images only allow alterations to the whole image.
  1203.  
  1204.    The colour balance effects are usually applied to all the red /
  1205. green / blue components simultaneously, but each component can be
  1206. altered individually by checking the `Red', `Green' or `Blue'
  1207. checkboxes at the bottom of the floating palette.
  1208.  
  1209.    The effect of changing either the brightness, contrast or gamma can
  1210. be seen in the graph on the right hand side of the floating palette.
  1211. The graph shows the input RGB component along the X-axis and the output
  1212. RGB component along the Y-axis.
  1213.  
  1214.               output
  1215.       Light RGB ^
  1216.                 |
  1217.                 |
  1218.                 |
  1219.                 |
  1220.                 |
  1221.        Dark RGB |
  1222.                 +-------> input
  1223.             Dark RGB  Light RGB
  1224.  
  1225.    No operation is shown therefore with a straight diagonal line - the
  1226. input value is mapped to the same output value.
  1227.  
  1228.               output
  1229.                 ^
  1230.                 |     /
  1231.                x|____/
  1232.                 |   /|
  1233.                 |  / |
  1234.                 | /  |
  1235.                 |/   |
  1236.                 +-------> input
  1237.                      x
  1238.  
  1239. Brightness
  1240.      Altering the brightness is achieved by mutliplying up / down the
  1241.      RGB components by the specified amount. The range of the slider is
  1242.      from -100% (everything becomes black) to +100% (everything is
  1243.      twice as bright).
  1244.  
  1245. Contrast
  1246.      Altering the contrast forces dark colours darker and light colours
  1247.      lighter. The range of the slider is from -100% (everything becomes
  1248.      mid grey) to +100% (RGB components are either on/off).
  1249.  
  1250.      Note: 100% contrast on a colour image doesn't produce a black and
  1251.      white image as may be expected. As each RGB component is treated
  1252.      individually, it leaves you with an 8 colour image - the 8 colours
  1253.      being composed of combinations of the RGB components as below:
  1254.  
  1255.     Black
  1256.           0% Red, 0% Green, 0% Blue
  1257.  
  1258.     Red
  1259.           100% Red, 0% Green, 0% Blue
  1260.  
  1261.     Green
  1262.           0% Red, 100% Green, 0% Blue
  1263.  
  1264.     Blue
  1265.           0% Red, 0% Green, 100% Blue
  1266.  
  1267.     Yellow
  1268.           100% Red, 100% Green, 0% Blue
  1269.  
  1270.     Magenta
  1271.           100% Red, 0% Green, 100% Blue
  1272.  
  1273.     Cyan
  1274.           0% Red, 100% Green, 100% Blue
  1275.  
  1276.     White
  1277.           100% Red, 100% Green, 100% Blue
  1278.  
  1279.      If you wish to turn a colour image into 2 colour black and white,
  1280.      greyscale the image first with the greyscale effect, See Effects.
  1281.  
  1282. Gamma
  1283.      Adjusting the gamma of an image has the effect of lightening some
  1284.      of the mid-dark colours, whilst leaving the dark colours dark.
  1285.      This can often enhance the eye's perception of the image, as the
  1286.      eye is more responsive to light colours. Gamma correction can also
  1287.      be useful when printing an image out, as mid-dark colours tend to
  1288.      get printed too dark.
  1289.  
  1290.      Only small alterations are usually needed with this operator (-20%
  1291.      to +20%).
  1292.  
  1293. Show effects
  1294. ------------
  1295.  
  1296.    Keyboard shortcut - `Amiga - 2'
  1297.  
  1298.    Opens / closes the effects floating palette.
  1299.  
  1300.    The effects floating palette contains a list of ImageStudio's built
  1301. in effects. Not all types of effect can be applied to all types of
  1302. buffer, the details are given below. Any numerical values required by
  1303. the individual effects are set using the slider on the effect floating
  1304. palette.
  1305.  
  1306.    See Effects, for details of all available effects.
  1307.  
  1308. Show convolves
  1309. --------------
  1310.  
  1311.    Keyboard shortcut - `Amiga - 3'
  1312.  
  1313.    Opens / closes the convolves floating palette.
  1314.  
  1315.    The convolves floating palette allows the user to apply their own
  1316. convolution effects to a 24-bit image; convolution will not work on
  1317. colour-mapped images.
  1318.  
  1319.    To create a new convolution filter, select `New' and then `Edit'
  1320. from the floating palette. The convolve grid requester contains the
  1321. convolution filter's name at the top as well as gadgets for the filter,
  1322. divisor and bias values. When the user has set the filter values, click
  1323. on `OK' to return to the convolve floating palette.
  1324.  
  1325.    To apply a filter, select it in the listview and click on `Apply'.
  1326. To delete a filter from the list, click on `Del'. This will not delete
  1327. the file from the disk, this has to be done from the Workbench.
  1328.  
  1329.    To scan a new drawer for convolution filters, click on `Load' and
  1330. select a directory to scan. To save the current list's convolution
  1331. filters, click on `Save' and select a drawer to save to.
  1332.  
  1333.    The default drawer to scan at startup is set in the preferences, See
  1334. Prefs.
  1335.  
  1336.    What follows is a quick description of convolution, it is not
  1337. necessary to understand this to use the filters.
  1338.  
  1339.    It is convenient think of the convolution filter as an array of
  1340. numbers that "slides" over the image a pixel at a time. To find the new
  1341. colour value of the pixel at the centre of the filter, multiply the
  1342. filter values by the values of the colours under the array then divide
  1343. the result by the `Div' value, then add the `Bias' value.
  1344.  
  1345.    If we take the example of 3 x 3 `blur low' filter being applied to
  1346. the pixels below:
  1347.  
  1348.      filter                  pixels
  1349.      
  1350.      0 1 0                   a b c
  1351.      1 2 1  convolved with   d e f   gives:
  1352.      0 1 0                   g h i
  1353.  
  1354.    ((0 x a) + (1 x b) + (0 x c) + (1 x d) + (2 x e) + (1 x f) + (0 x g)
  1355. + (1 x h) + (0 x i)) / Div + Bias
  1356.  
  1357.    which would be applied to the new pixel in the position of the `e'
  1358. pixel.
  1359.  
  1360.    Although the pixels shown above are shown as `a', `b' etc... they
  1361. are actually the 3 red, green and blue values that comprise the colour.
  1362.  
  1363.    Examples:
  1364.  
  1365.   1.      0 0 0
  1366.           0 1 0
  1367.           0 0 0
  1368.           Div = 3, Bias = 0
  1369.      would make each pixel one third of its original brightness.
  1370.  
  1371.   2.      0 0 0
  1372.           0 0 0
  1373.           0 1 0
  1374.           Div = 1, Bias = 0
  1375.      would move each pixel up by one.
  1376.  
  1377.   3.      0 0 0
  1378.           0 1 0
  1379.           0 0 0
  1380.           Div = 1, Bias = 50
  1381.      would add 50 onto each of the red, green, blue components of the
  1382.      centre pixel.
  1383.  
  1384.    Note:
  1385.  
  1386.    * The red, green, blue components of a pixel can have values in the
  1387.      range 0 to 255. If a convolution value is greater than 255 it is
  1388.      made equal to 255. Similarly if a convolution value is less than 0
  1389.      it is made equal to 0.
  1390.  
  1391.    * ImageStudio has optimized routines for 1x1, 3x3 and 5x5 filters.
  1392.      If the program detects that only values in a 3x3 filter are being
  1393.      used, only calculations for a 3x3 filter are performed.
  1394.  
  1395. Show scripts
  1396. ------------
  1397.  
  1398.    Keyboard shortcut - `Amiga - 4'
  1399.  
  1400.    Opens / closes the scripts floating palette.
  1401.  
  1402.    The scripts floating palette gives a list of easily available ARexx
  1403. scripts for the user to apply.
  1404.  
  1405.    To execute a script in the list, select the desired script and click
  1406. on `Apply'. The script can be stopped by either clicking on `Abort'
  1407. during any operation or choosing `Cancel' on any given requester (if
  1408. the script is written correctly, that is). See Writing scripts, for
  1409. more information on creating ARexx scripts.
  1410.  
  1411.    New scripts can be created by clicking on `New...' button. The user
  1412. is requested to name the new script and it is placed in the listview.
  1413. By default, the script will already contain some ARexx commands to help
  1414. the user - the user simply adds what is neccessary.
  1415.  
  1416.    To edit the currently selected script, the `Edit...' button is used.
  1417. The text editor set in the preferences (see Prefs) is used to edit the
  1418. file.
  1419.  
  1420.    The `Load...' button allows the user to scan another directory for
  1421. ARexx script files. `Other...' will let the user select another ARexx
  1422. script file to run, without adding it to the list.
  1423.  
  1424. ARexx
  1425. *****
  1426.  
  1427.    This chapter gives information about the program's interface to the
  1428. ARexx programming language.
  1429.  
  1430. Introduction to ARexx
  1431. =====================
  1432.  
  1433.    ARexx is the script language that is distributed with all Amigas
  1434. sporting Workbench 2.04 and above. It is used on the Amiga for two main
  1435. tasks:
  1436.  
  1437.   1. Providing an easy and consistent method of adding macro facilities
  1438.      to programs.
  1439.  
  1440.   2. To allow ARexx aware programs to communicate with each other.
  1441.  
  1442.    Most users are dissuaded from using ARexx with their programs
  1443. because of the learning curve involved in (i) learning ARexx and (ii)
  1444. using the functions provided with each program. With ImageStudio, we
  1445. have tried to simplify the process of creating an ARexx script by:
  1446.  
  1447.   1. Providing an easy interface for creating and running the scripts.
  1448.  
  1449.   2. Providing a ready-made script template which the user can just
  1450.      "fill in the blanks" to produce a fully working program.
  1451.  
  1452.   3. Providing many commands to perform commonly performed operations.
  1453.      This means the user needs to write less code in ARexx and doesn't
  1454.      need to rely on external utilities and libraries to perform the
  1455.      operations.
  1456.  
  1457.    Typical uses for ARexx in ImageStudio include:
  1458.  
  1459.    * Batch processing. ImageStudio can now be told to repeatedly
  1460.      perform the same operation on many images. The user could, for
  1461.      example, convert all PCX files in a given directory into IFF-ILBM
  1462.      files.
  1463.  
  1464.    * Background processing. ImageStudio can be told to watch a given
  1465.      directory and whenever a new file is generated to perform a set of
  1466.      operations on it. This is useful for producing ray-traced
  1467.      animations, where each frame of the animation could be converted
  1468.      from 24bits to HAM6 (say) as each frame was generated by the ray
  1469.      tracer.
  1470.  
  1471.    * Adding additional image manipulation abilities to other programs.
  1472.      ImageStudio could be passed an image from another program, process
  1473.      it, then return it back to the original program. By using a
  1474.      desktop publishing package that supports ARexx, an image could be
  1475.      saved from the DTP program, gamma corrected by ImageStudio, then
  1476.      reloaded back into the DTP program all automatically.
  1477.  
  1478.    Many example files are given with ImageStudio (see Example scripts),
  1479. which can either be used directly or modified to perform the desired
  1480. operation.
  1481.  
  1482.    In order for ARexx to be available to ImageStudio, you must start
  1483. ARexx at startup time by including the line:
  1484.  
  1485.      rexxmast >NIL:
  1486.  
  1487.    in your `User-Startup' file in the `S:' directory. Normally this
  1488. line should be present in your User-Startup, but if you find no scripts
  1489. run from ImageStudio you must add this line manually.
  1490.  
  1491. Writing scripts
  1492. ===============
  1493.  
  1494.    We have tried to simplify the process of writing an ARexx script as
  1495. much a possible to provide access to the power of ARexx scripts without
  1496. (too much(!)) pain.
  1497.  
  1498.    An ARexx script can be written and run without ever having to leave
  1499. ImageStudio. The only extra tool needed is a text editor; ImageStudio
  1500. can be configured to use your favourite text editor by changing the
  1501. program's preferences (see Prefs). The basic process of creating an
  1502. ARexx script is as follows:
  1503.  
  1504.   1. Open the `Scripts' floating palette.
  1505.  
  1506.   2. Create and name the new script by clicking on `New...'.
  1507.  
  1508.   3. Load the blank script template into your editor by clicking on
  1509.      `Edit...'.
  1510.  
  1511.   4. Add the desired commands to the template in the space provided.
  1512.  
  1513.   5. Save the file and exit the text editor.
  1514.  
  1515.   6. Run the script by clicking on the `Apply' button on the scripts
  1516.      floating palette.
  1517.  
  1518.    Any errors the script may generate will be displayed in a requester
  1519. on the ImageStudio screen.
  1520.  
  1521.    To try this process out, try the following:
  1522.  
  1523.   1. Open the `Scripts' floating palette.
  1524.  
  1525.   2. Click on `New...' and call the script "FirstScript".
  1526.  
  1527.   3. Edit the new script by clicking on `Edit...'.
  1528.  
  1529.   4. In the space provided in the script, type the following lines:
  1530.  
  1531.           OPEN "Pics/FW14B_250x250.gif"
  1532.           SCALE 80 40
  1533.           PALETTE_LOAD "Palettes/Workbench4.palette" DITHER FS
  1534.           VIEW
  1535.  
  1536.   5. Save the file and exit the text editor.
  1537.  
  1538.   6. Run the script by clicking on the `Apply' button on the scripts
  1539.      floating palette.
  1540.  
  1541.    The result of the above script should be a 4 colour icon sized image
  1542. of a Formula1 racing car. This could now be copied into the clipboard
  1543. by selecting `Copy' in the `Edit' menu and pasted into Commodore's
  1544. IconEdit program for final conversion into an icon. Alternatively, the
  1545. command to copy the image into the clipboard could be added to the end
  1546. of the script.
  1547.  
  1548.    See ARexx commands, for a full description of the ARexx commands
  1549. used in the above example.
  1550.  
  1551.    Note, please don't remove the "/* BEGIN PROGRAM ****" and
  1552. corresponding "END PROGRAM" lines in the blank macro template - these
  1553. will be used to insert the recorded ARexx macros when they are
  1554. implemented (see Future additions).
  1555.  
  1556. Basic ARexx
  1557. ===========
  1558.  
  1559.    This section is meant as a beginners guide to using ARexx with
  1560. ImageStudio. We cannot hope to teach you the ARexx language, although
  1561. it is only neccessary to the know the very basics to start using ARexx
  1562. scripts with ImageStudio. It is assumed that the user is editing and
  1563. running their scripts from within ImageStudio (see Show_scripts).
  1564.  
  1565.    For further information on ARexx, we suggest reading Commodore's
  1566. ARexx user guide supplied with the A4000 or the Workbench2 and 3
  1567. upgrade packs. For A600 and A1200 users who don't get this manual, we
  1568. recommend the "ARexxGuide" AmigaGuide document by Robin Evans which is
  1569. a shareware document containing extensive information on the ARexx
  1570. language. The guide can be obtained from all good PD houses.
  1571.  
  1572.    The ARexx programming language is similar to many other programming
  1573. languages in its structure. Users who have BASIC, C, FORTRAN, Pascal,
  1574. Modula2 or Oberon experience will notice many similarites. It is not
  1575. similar to Assember language, Lisp or Prolog. An ARexx program is, in
  1576. its simplest form, a list of instructions for ImageStudio to perform.
  1577. Here is a simple ARexx program:
  1578.  
  1579.      /* A simple ARexx program */
  1580.      
  1581.      REQUEST_MESSAGE TEXT '"Hello world!"'
  1582.      
  1583.      exit
  1584.  
  1585.    This shows some important things about an ARexx program:
  1586.  
  1587.   1. All ARexx programs *must* start with a comment line. A comment
  1588.      line is a line which starts with the `/*' sequence of characters
  1589.      and ends with the `*/' characters. Anything between these
  1590.      characters is ignored by ARexx.
  1591.  
  1592.   2. For clarity, all of ImageStudio's commands are shown CAPITALISED,
  1593.      ARexx commands are kept in lower case. REQUEST_MESSAGE is
  1594.      therefore an ImageStudio command that should be performed.
  1595.  
  1596.   3. The REQUEST_MESSAGE has some `arguments' or `parameters' following
  1597.      it. These tell the REQUEST_MESSAGE command how to behave, in this
  1598.      case they tell the command to pop up greeting message.
  1599.  
  1600.   4. To stop an ARexx program, use the command `exit'.
  1601.  
  1602.    OK, lets enhance our program a little:
  1603.  
  1604.      /* A better simple ARexx program */
  1605.      
  1606.      REQUEST_MESSAGE TEXT '"What do you think of\n'||,
  1607.         'the show so far?"',
  1608.         BUTTONTEXT "Great|Mediocre|Rubbish"
  1609.      
  1610.      exit
  1611.  
  1612.    From this example we learn:
  1613.  
  1614.   1. To separate a long command line, place a comma `,' as the last
  1615.      character on the line. This tells ARexx to treat the next line as
  1616.      a continuation of the previous. Two line breaks are used in the
  1617.      above example.
  1618.  
  1619.   2. ARexx loves to evaluate things. If we want to stop ARexx
  1620.      evaluating variables, the variable should be enclosed in single
  1621.      quotes ` ' '.
  1622.  
  1623.    See ARexx problem 1, if little explanation is needed as to the many
  1624. double and single quotes used above. If we now tell you that the `\n'
  1625. characters are used represent a newline and the `||' characters glue
  1626. string together, we should see that:
  1627.  
  1628.      '"What do you think of\n'||'the show so far?"'
  1629.  
  1630.    would be evaluated to:
  1631.  
  1632.      "What do you think of*the show so far?"
  1633.  
  1634.    where `*' represents a newline. The lesson to be learnt here is that
  1635. whenever you use a string (with or without spaces) it is best to
  1636. enclose the whole thing in single quotes outside the double quotes to
  1637. keep the whole thing together.
  1638.  
  1639.    On with the examples. The previous script isn't much use if we can't
  1640. test for which button the user pressed, so:
  1641.  
  1642.      /* A better simple ARexx program */
  1643.      
  1644.      options results
  1645.      
  1646.      REQUEST_MESSAGE TEXT '"What do you think of\n'||,
  1647.         'the show so far?"',
  1648.         BUTTONTEXT "Great|Mediocre|Rubbish"
  1649.      
  1650.      if RESULT == 0 then
  1651.         REQUEST_MESSAGE TEXT '"Sorry, I was trying very hard."'
  1652.      else if RESULT == 2 then
  1653.         REQUEST_MESSAGE TEXT '"It gets better."'
  1654.      else do
  1655.         REQUEST_MESSAGE TEXT '"We like happy users."'
  1656.         REQUEST_MESSAGE TEXT '"Treat yourself to a coffee."'
  1657.         end
  1658.      
  1659.      exit
  1660.  
  1661.    This shows:
  1662.  
  1663.   1. Normally ARexx ignores the values returned by commands. To allow
  1664.      commands to return values, use "options results"; this is done for
  1665.      you in the blank ARexx script.
  1666.  
  1667.   2. Unless otherwise specified (see Return values) commands return the
  1668.      results of their operation in a variable called "RESULT". The
  1669.      command REQUEST_MESSAGE returns the value of the button that the
  1670.      user pressed.  It is this value that we can test for.
  1671.  
  1672.   3. The `if' tests are shown above. Note that if you only want to
  1673.      perform one operation as part of the `if', you can just place it
  1674.      after the `then'. If you wish to perform more operations, they
  1675.      must be placed in  a `do / end' set.
  1676.  
  1677.    OK, that's about it for the introduction to ARexx. We really suggest
  1678. now that you look at the example scripts provided with ImageStudio (see
  1679. Example scripts) to learn more examples. Have fun!
  1680.  
  1681.    Note, if you use any ARexx command which prints text out (e.g.
  1682. "say"), this text is printed to the file given by the tooltype
  1683. REXXOUTPUT (see Tooltype_REXXOUTPUT). After the script has been
  1684. executed, this file can be examined.
  1685.  
  1686. Command templates
  1687. =================
  1688.  
  1689.    The parameters passed to the ARexx commands closely follow
  1690. Commodore's style guidelines. The parsing of the arguments follows the
  1691. standard template format described below.
  1692.  
  1693.    Commands are always of the form:
  1694.  
  1695.      command [options]
  1696.  
  1697.    The command may be something like `OPEN' or `SCALE' and the options
  1698. may be filenames, numbers etc... A typical command template may look
  1699. like:
  1700.  
  1701.      OPEN FILE/A,FORMAT,ARGS,FORCE/S
  1702.  
  1703.    The commands and options are not case sensitive, therefore `OPEN',
  1704. `Open' or `open' can be used to open a file. The options after the
  1705. command name are separated by commas, and are named (e.g. FILE or FORCE
  1706. are option names). After the name, follows an optional modifier (e.g.
  1707. /A or /S are modifiers) which describes what type of information the
  1708. option specifies.
  1709.  
  1710.        When using the command, the option names may be ommitted if the
  1711. parameters for the command are given in the same order as the options
  1712. in the template, but for clarity it is recommended that the option
  1713. names be used.
  1714.  
  1715.    The following modifiers are used:
  1716.  
  1717. No modifier
  1718.      If the option has no modifier, the option is expecting a string.
  1719.      Strings are lines of text with no spaces; to use a string with a
  1720.      space, place the string in double-quotes (").
  1721.  
  1722. Multiple strings (/M)
  1723.      Many strings can be specified if an option uses this modifier.
  1724.  
  1725. Numeric (/N)
  1726.      Numeric options allow both positive and negative integers.
  1727.      Floating point numbers are not yet used by ImageStudio.
  1728.  
  1729. Boolean (/S)
  1730.      Some options can be specified to "switch" that option on. By
  1731.      leaving the option out, the option is switched off.
  1732.  
  1733. Keyword (/K)
  1734.      A keyword option shows that the option name must be used to set
  1735.      this option.
  1736.  
  1737. Always (/A)
  1738.      This option must always be included in this command.
  1739.  
  1740.    In practice, it soon becomes very easy to interpret command
  1741. templates - some examples with explanations are given below:
  1742.  
  1743.      OPEN FILE/A,FORMAT,ARGS,FORCE/S
  1744.  
  1745.    The command `OPEN' is used to open a file and load it into
  1746. ImageStudio. OPEN requires a filename (FILE/A is a string, and is
  1747. always required), an optional FORMAT string, an optional ARGS string
  1748. and and optional FORCE switch. The following are valid OPEN commands:
  1749.  
  1750.    The following would load a file called
  1751. `Pics/CheetahFace250x200.ilbm', forcing the old project to be
  1752. overwritten:
  1753.  
  1754.      OPEN FILE "Pics/CheetahFace250x200.ilbm" FORCE
  1755.  
  1756.    The following would load a file called `Ram Disk:Tulip.jpg', asking
  1757. first if the current project has changed:
  1758.  
  1759.      OPEN '"Ram Disk:Tulip.jpg"'
  1760.  
  1761.    The following is an error, if the filename has spaces in it, it
  1762. should be enclosed in single and double-quotes:
  1763.  
  1764.      OPEN "Ram Disk:Tulip.jpg"
  1765.  
  1766.      SCALE X/N,Y/N,PERCENT/S,METHOD
  1767.  
  1768.    `SCALE' is used to change the size of the image (see ARexx_SCALE).
  1769. SCALE expects two numerical values (X/N,Y/N are numbers but neither are
  1770. required), can be used to scale either to an absolute size or by a
  1771. given percentage (adding the PERCENT switch specifies percentage
  1772. scaling) and can use a variety of methods (METHOD is used to specify a
  1773. description string of the method to be used - again, if this is not
  1774. specified a default method is used). The following are valid SCALE
  1775. commands:
  1776.  
  1777.    The following scales the image to 640x480 pixels:
  1778.  
  1779.      SCALE X 640 Y 480
  1780.  
  1781.    The following makes the image 50 percent of its original height:
  1782.  
  1783.      SCALE Y 50 PERCENT
  1784.  
  1785.    The following scales the image to 800x600 pixels using the colour
  1786. averaging method:
  1787.  
  1788.      SCALE 800 600 METHOD AVERAGE
  1789.  
  1790.    The following is an error, no X or Y values given:
  1791.  
  1792.      SCALE X PERCENT
  1793.  
  1794.    The following is an error, floating point values are not allowed:
  1795.  
  1796.      SCALE Y 127.5
  1797.  
  1798.    See ARexx commands, for more detailed descriptions of each of the
  1799. individual ARexx commands.
  1800.  
  1801. Return values
  1802. =============
  1803.  
  1804.    The return values for the ARexx commands are specified in the same
  1805. notation as the input parameters, although the types of returned values
  1806. is more limited than the input parameter types. In order for results to
  1807. be returned from ARexx commands, it is essential that the line:
  1808.  
  1809.      options results
  1810.  
  1811.    be placed near the start of the ARexx script.
  1812.  
  1813.    Commands may return either strings, numbers or arrays of either. By
  1814. default, all ARexx commands return their values in a variable called
  1815. "RESULT". This is fine if the command returns a single number or
  1816. string. For example, the following call to the FILE_JOIN command (see
  1817. ARexx_FILE_JOIN) would return the string "T:Image.ilbm" in the RESULT
  1818. variable:
  1819.  
  1820.      FILE_JOIN PATHPART "T:" FILEPART "Image.ilbm"
  1821.  
  1822.    If the user wishes to return the result in another variable other
  1823. than RESULT, they may specify the VAR keyword. For example, the
  1824. following would perform the same action as above, only putting the
  1825. result in the varible called "FULLNAME"
  1826.  
  1827.      FILE_JOIN PATHPART "T:" FILEPART "Image.ilbm" VAR FULLNAME
  1828.  
  1829.    Some ARexx commands return multiple values, and these to can be
  1830. returned in a single variable - each returned value in the variable is
  1831. seperated with a space. The following returns information about the
  1832. current image (see ARexx_IMAGEINFO_GET):
  1833.  
  1834.      IMAGEINFO_GET
  1835.  
  1836.    and the RESULT variable might look something like:
  1837.  
  1838.      640 400 8 Pics/Zebra.ilbm 32772
  1839.  
  1840.    It is possible then to extract the desired information using ARexx's
  1841. built in parsing routines. A neater way to return multiple values
  1842. though is through a "stem" variable. Here, a base name for a variable
  1843. is given and the returned values' names get added to it. It is clearer
  1844. with an example:
  1845.  
  1846.      IMAGEINFO_GET STEM IMAGEINFO.
  1847.  
  1848.    would return the same information as previously, only it would
  1849. create the following variables:
  1850.  
  1851.      IMAGEINFO.WIDTH = 640
  1852.      IMAGEINFO.HEIGHT = 400
  1853.      IMAGEINFO.DEPTH = 8
  1854.      IMAGEINFO.FILE = Pics/Zebra.ilbm
  1855.      IMAGEINFO.MODEID = 32772
  1856.  
  1857.    Now you can refer easily to the returned values.
  1858.  
  1859.    If an ARexx function returns an array of results, they are named as
  1860. follows:
  1861.  
  1862.      STEMNAME.RESULTNAME.NUMBER
  1863.  
  1864.    with the variable STEMNAME.RESULTNAME.COUNT holding the number of
  1865. returned results. Again, an example being the following which gets all
  1866. the ".ilbm" images in the "Pics" dirctory:
  1867.  
  1868.      FILES_MATCH PATHPART "Pics" PATTERN "#?.ilbm" STEM MATCHED.
  1869.  
  1870.    which might return the following:
  1871.  
  1872.      MATCHED.FILEPARTS.COUNT = 4
  1873.      MATCHED.FILEPARTS.0 = Zebra.ilbm
  1874.      MATCHED.FILEPARTS.1 = WilliamsFW14B.ilbm
  1875.      MATCHED.FILEPARTS.2 = Spitfire.ilbm
  1876.      MATCHED.FILEPARTS.3 = Brightside.ilbm
  1877.  
  1878.    See ARexx tips, for more information on how to turn array stem
  1879. variables into string variables.
  1880.  
  1881. Error checking
  1882. ==============
  1883.  
  1884.    ImageStudio uses the standard ARexx method of returning errors, with
  1885. a further extension.
  1886.  
  1887.    Whenever a command is executed, a variable called "RC" has its value
  1888. set by ARexx. If the command executed normally, RC is set to zero. If
  1889. any failure happened, RC is set to either 5 (warning), 10 (failure) or
  1890. 20 (serious failure).
  1891.  
  1892.    ImageStudio also sets the value of a further variable called "RC2",
  1893. which either contains a text description of the reason for failure or a
  1894. standard AmigaDos error code.
  1895.  
  1896.    A description string is returned in RC2 if a failure occurs within
  1897. the execution of a command. RC2 will be an AmigaDos error number if
  1898. there is an error with the command syntax (e.g. mis-spelled command
  1899. name or missing quotes).
  1900.  
  1901.    If, for example the user was to try to use the scale command when
  1902. there was no image in the buffer, RC and RC2 would be set to the
  1903. following:
  1904.  
  1905.      RC = 10
  1906.      RC2 = "SCALE, No image"
  1907.  
  1908.    If the scale operation were to be performed with the command:
  1909.  
  1910.      SCLAE 80 40
  1911.  
  1912.    the following values would be set:
  1913.  
  1914.      RC = 10
  1915.      RC2 = 236
  1916.  
  1917.    where AmigaDos error 236 represents `not implemented', i.e. unknown
  1918. command. The default blank script template will convert the most common
  1919. likely AmigaDos error codes into description strings (see Commodore's
  1920. AmigaDos manual for a full description of AmigaDos errors).
  1921.  
  1922.    By default, the blank script template turns on automatic error
  1923. checking. The line:
  1924.  
  1925.      signal on error
  1926.  
  1927.    tells ImageStudio to jump to the ERROR: label whenever a command
  1928. fails. The blank script then puts up a requester showing the error.
  1929.  
  1930.    The user may wish to turn off the automatic error checking to
  1931. perform error checking themselves. This is neccessary, for example, if
  1932. the user wishes to trap the user pressing `Cancel' on a requester (this
  1933. returns an error). The following checks when the user cancels the file
  1934. requester:
  1935.  
  1936.      /* Turn off automatic error checking */
  1937.      
  1938.      signal off error
  1939.      
  1940.      /* Open the requester */
  1941.      
  1942.      REQUEST_FILE
  1943.      
  1944.      /* Check for the error condition */
  1945.      
  1946.      if RC ~= 0 then do
  1947.         REQUEST_MESSAGE TEXT '"An error occurred (user\n'||,
  1948.            'probably pressed Cancel)"'
  1949.         end
  1950.      else do
  1951.         REQUEST_MESSAGE TEXT '"You chose: '||RESULT||'"'
  1952.         end
  1953.  
  1954. Common ARexx problems
  1955. =====================
  1956.  
  1957. ARexx problem 1
  1958. ---------------
  1959.  
  1960.      "I can't use strings with spaces in them."
  1961.  
  1962.    Care must be taken when specifying string paramters when the string
  1963. contains space characters. Single quotes must be used around double
  1964. quotes to stop the string from being seen as many different strings.
  1965.  
  1966.    Consider the following example:
  1967.  
  1968.      REQUEST_MESSAGE TEXT "Hello"
  1969.  
  1970.    ARexx would evaluate the string "Hello" and give ImageStudio the
  1971. following command to execute:
  1972.  
  1973.      REQUEST_MESSAGE TEXT Hello
  1974.  
  1975.    i.e. without the double quotes. In this example, REQUEST_MESSAGE
  1976. would do as expected. The problems start when strings have spaces in
  1977. them; consider the following:
  1978.  
  1979.      REQUEST_MESSAGE TEXT "Hello world"
  1980.  
  1981.    ARexx would evaluate the string "Hello world" and give ImageStudio
  1982. the following command to execute:
  1983.  
  1984.      REQUEST_MESSAGE TEXT Hello world
  1985.  
  1986.    which is not what is desired. The Hello becomes the TEXT value and
  1987. the world becomes the value of the next parameter (BUTTONTEXT in this
  1988. case). The result would be a requester with the text of "Hello" and a
  1989. button called "world". Now we must use the single quotes to stop ARexx
  1990. from evaluating the string:
  1991.  
  1992.      REQUEST_MESSAGE TEXT '"Hello world"'
  1993.  
  1994.    would send ImageStudio the following command:
  1995.  
  1996.      REQUEST_MESSAGE TEXT "Hello world"
  1997.  
  1998.    which shows that the whole string "Hello world" belongs to the TEXT
  1999. parameter.
  2000.  
  2001. ARexx problem 2
  2002. ---------------
  2003.  
  2004.      "I can't use AmigaDos commands in a script."
  2005.  
  2006.    There is a bug which causes ImageStudio to sometimes crash the
  2007. machine if the output from AmigaDos command is not properly
  2008. re-directed. The stdin and stdout for all external CLI commands should
  2009. be redirected to the NIL: device.
  2010.  
  2011.    For example:
  2012.  
  2013.      address command 'rename ram:foo ram:bar'
  2014.  
  2015.    could crash the machine if the rename fails (e.g. the file "ram:foo"
  2016. doesn't exist). To avoid this, use:
  2017.  
  2018.      address command 'rename <NIL: >NIL: ram:foo ram:bar'
  2019.  
  2020.    The failure will still be trapped by ARexx and sets RC to 10.
  2021.  
  2022. ARexx problem 3
  2023. ---------------
  2024.  
  2025.      "I can't run scripts from the ram disk."
  2026.  
  2027.    This is due to ARexx scripts being treated by ARexx as external
  2028. commands. Command names may not contain spaces, and scripts in the ram
  2029. disk will be called something like `Ram Disk:MyScript.isrx', which is
  2030. not allowed.
  2031.  
  2032.    To work around this, either move the script to a location without a
  2033. space in its filename or specify the ram disk as `ram:' rather than
  2034. `Ram Disk:'.
  2035.  
  2036. ARexx problem 4
  2037. ---------------
  2038.  
  2039.      "I can't set the same variable twice with VAR"
  2040.  
  2041.    If you are able to return a value from a command into a given
  2042. variable name once in a program, but unable to do it again it's
  2043. probably due to ARexx evaluating your variable the second time it is
  2044. used.
  2045.  
  2046.    For example, the following won't work:
  2047.  
  2048.      FILE_JOIN FILEPART '"Work:"' '"MyFile"' VAR fullname
  2049.      
  2050.      FILE_JOIN FILEPART '"Work:"' '"MyOtherFile"' VAR fullname
  2051.  
  2052.    because ARexx will evaluate `fullname' in the second FILE_JOIN, i.e.
  2053. ARexx will see the second FILE_JOIN as:
  2054.  
  2055.      FILE_JOIN FILEPART "Work:" "MyFile" VAR Work:MyFile
  2056.  
  2057.    The solution is to enclose the variable name in single quotes to
  2058. stop it from being evaluated, i.e. our second FILE_JOIN is written as:
  2059.  
  2060.      FILE_JOIN FILEPART '"Work:"' '"MyOtherFile"' VAR 'fullname'
  2061.  
  2062. ARexx problem 5
  2063. ---------------
  2064.  
  2065.      "I can't get any ARexx script to run."
  2066.  
  2067.    In order for ARexx to be available to ImageStudio, you must start
  2068. ARexx at startup time by including the line:
  2069.  
  2070.      rexxmast >NIL:
  2071.  
  2072.    in your `User-Startup' file in the `S:' directory. Normally this
  2073. line should be present in your User-Startup, but if you find no scripts
  2074. run from ImageStudio you must add this line manually.
  2075.  
  2076. ARexx tips
  2077. ==========
  2078.  
  2079. ARexx tip 1
  2080. -----------
  2081.  
  2082.      "How to turn stem arrays into strings."
  2083.  
  2084.    It usually desirable for commands that return arrays to return the
  2085. values in a stem, making the return values easier to deal with. In some
  2086. cases it is neccessary to pass these values back to ImageStudio after
  2087. reading or altering them. As ImageStudio commands can't accept stems
  2088. directly, these stems have to be converted back into strings.
  2089.  
  2090.    We suggest the following method, using the PALETTE_GET and
  2091. PALETTE_SET commands as examples of getting and setting an array of
  2092. values:
  2093.  
  2094.      /* Get the current palette */
  2095.      
  2096.      PALETTE_GET STEM OLDPALETTE.
  2097.      
  2098.      /* Convert the stem to a parameter list */
  2099.      
  2100.      NEWPALETTE = ''
  2101.      
  2102.      do l = 0 to (OLDPALETTE.PALETTE.COUNT - 1)
  2103.         NEWPALETTE = NEWPALETTE||' '||OLDPALETTE.PALETTE.l
  2104.         end
  2105.      
  2106.      /* Force the new palette back onto the image */
  2107.      
  2108.      PALETTE_SET PALETTE NEWPALETTE REMAP
  2109.  
  2110. ARexx tip 2
  2111. -----------
  2112.  
  2113.      "Shortening command names"
  2114.  
  2115.    Using the current ARexx command interpreter within ImageStudio, it
  2116. is possible to specify a shorter version of each ARexx command. For
  2117. example, `OP' could be used as a synonym for `OPEN' and `RG' is a
  2118. synonym for `RGB_TO_HSV'. The following should be noted however:
  2119.  
  2120.    * This behaviour may be removed in a future version of ImageStudio.
  2121.      Therefore we recommend that this feature only be used to reduce
  2122.      typing in the command shell (see Command_shell) and not be used in
  2123.      ARexx scripts.
  2124.  
  2125.    * If the shortened command name is ambiguous, the first matching
  2126.      command will be executed. For example, if the shortened command
  2127.      `REQUEST' is used, `REQUEST_DIR' will be executed.
  2128.  
  2129. Example scripts
  2130. ===============
  2131.  
  2132. BalanceTest
  2133. -----------
  2134.  
  2135. Description
  2136.      This script allows the user to see the result of changing the
  2137.      brightness, contrast and gamma values over their full ranges.
  2138.  
  2139.      An image is loaded in if one is not present already. The image is
  2140.      then divided into 3 strips - the top, middle and bottom
  2141.      representing changes to the balance, contrast and gamma
  2142.      respectively. Depending on the number of divisions the user
  2143.      chooses, each of the 3 strips is divided further horizontally and
  2144.      each of the brightness, contrast and  gamma values are applied
  2145.      starting from -100 on the left to +100 on the right. An odd number
  2146.      of horizontal divisions are used to leave a central, vertical area
  2147.      of the image which remains unchanged.
  2148.  
  2149. Known bugs
  2150.      None.
  2151.  
  2152. BatchConvert
  2153. ------------
  2154.  
  2155. Description
  2156.      This scripts allows the conversion of multiple images to be output
  2157.      as one image format.
  2158.  
  2159.      The script allows the following:
  2160.  
  2161.        1. Saving of the converted image into a different location as
  2162.           the source.
  2163.  
  2164.        2. Choose any of the available image formats to save, with
  2165.           controls over their subformat.
  2166.  
  2167.        3. Automatic file renaming.
  2168.  
  2169.        4. Automatic deleting of source images if different from the
  2170.           destination image.
  2171.  
  2172. Known bugs
  2173.      If the source and destination files are the same, but have
  2174.      different filenames (e.g. `T:Bud2.gif' and `Ram:T/Bud2.gif') the
  2175.      script will delete the source file (which will be the destination
  2176.      file). To avoid this, make sure both filenames are both specified
  2177.      in the same manner.
  2178.  
  2179. BatchProcess
  2180. ------------
  2181.  
  2182. Description
  2183.      This scripts allows the processing of multiple images to be output
  2184.      as one image format. The script is based on `BatchConvert' (see
  2185.      BatchConvert).
  2186.  
  2187.      The commands to control the processing should be typed in to the
  2188.      appropriate requester as though they were ARexx commands to be
  2189.      executed in a script. For example:
  2190.  
  2191.           SCALE 640 480
  2192.  
  2193.      would scale each image to 640x480 pixels before saving out.
  2194.      Multiple commands can be separated with a semi-colon `;', for
  2195.      example:
  2196.  
  2197.           SCALE 800 600;COLOURS 256 DITHER FS
  2198.  
  2199.      would scale the image to 800x600 and then reduce to 256 colours
  2200.      with Floyd-Steinberg dithering before saving out. Commands are
  2201.      executed from left to right.
  2202.  
  2203.      The script allows the following:
  2204.  
  2205.        1. Saving of the processed image into a different location as
  2206.           the source.
  2207.  
  2208.        2. Choose any of the available image formats to save, with
  2209.           controls over their subformat.
  2210.  
  2211.        3. Automatic file renaming.
  2212.  
  2213.        4. Application of multiple commands to process the image before
  2214.           saving.
  2215.  
  2216.        5. Automatic deleting of source images if different from the
  2217.           destination image.
  2218.  
  2219. Known bugs
  2220.      If the source and destination files are the same, but have
  2221.      different filenames (e.g. `T:Bud2.gif' and `Ram:T/Bud2.gif') the
  2222.      script will delete the source file (which will be the destination
  2223.      file). To avoid this, make sure both filenames are both specified
  2224.      in the same manner.
  2225.  
  2226. BatchProcessNotify
  2227. ------------------
  2228.  
  2229. Description
  2230.      This script starts a batch lot of processing to be performed when
  2231.      a given file is changed or created; the script is based on
  2232.      `BatchConvert' (see BatchProcess).
  2233.  
  2234.      This is useful if you wish to convert the output from a program
  2235.      that has generated multiple frames (e.g. a raytracer or landscape
  2236.      renderer) into a format that can be compiled into an animation
  2237.      (e.g. ILBM24 to HAM6).
  2238.  
  2239.      The first thing the user must select is the filename of the final
  2240.      file in the sequence. When this file has been created, ImageStudio
  2241.      will start the processing of the images. This file may not of
  2242.      course have been created yet, so the user will have to type the
  2243.      name into the file requester.
  2244.  
  2245.      After the user has specified the output format (see BatchProcess),
  2246.      the script will wait for the specified file be created before
  2247.      proceeding with the processing on all the files in the chosen
  2248.      directory with the same basename as the selected final filename.
  2249.  
  2250. Known bugs
  2251.      If the source and destination files are the same, but have
  2252.      different filenames (e.g. `T:Bud2.gif' and `Ram:T/Bud2.gif') the
  2253.      script will delete the source file (which will be the destination
  2254.      file). To avoid this, make sure both filenames are both specified
  2255.      in the same manner.
  2256.  
  2257. Example
  2258.      The user wishes to convert the 24bit output files created by a
  2259.      raytracer into HAM6 format, ready for compiling into an animation.
  2260.      The animation is 200 frames and the files are numbered `pic.0001',
  2261.      `pic.0002' etc... and are located in the `Work:Render' directory.
  2262.      No extra processing is to be performed on the images.
  2263.  
  2264.      Upon running the BatchProcessNotify script, the user enters
  2265.      `Work:Render/pic.0200' as the final frame in the sequence and sets
  2266.      the output file format to be IFF-ILBM, HAM6.
  2267.  
  2268.      The script now waits for the final file to be created, and upon
  2269.      doing so, matches all files in the `Work:Render' directory that
  2270.      start with the basename `pic.'. 200 files should be found. Each of
  2271.      these files are loaded and saved as HAM6, before the script ends.
  2272.  
  2273. ConvolveTest
  2274. ------------
  2275.  
  2276. Description
  2277.      Applies a chosen set of convolution filters to an image.
  2278.  
  2279.      A number of convolution filters are chosen and the image is tiled
  2280.      depending on the number of filters chosen, each filter is applied
  2281.      to each of the tiles.
  2282.  
  2283. Known bugs
  2284.        1. The convolution filters chosen to apply *must* be taken from
  2285.           the directory currently shown in the `Convolves' floating
  2286.           palette. This is because convolution filters with the
  2287.           CONVOLVE command are chosen by name, not filename (see
  2288.           ARexx_CONVOLVE).
  2289.  
  2290.        2. The tiling algorithm used isn't very smart, the number of
  2291.           tiles vertically is the same as the number horizontally. This
  2292.           can lead to almost half of the image being unaffected if the
  2293.           number of chosen filters is just above the nearest square
  2294.           number.
  2295.  
  2296.        3. The maximum number of filters to be applied to the image is
  2297.           100.
  2298.  
  2299. Demo
  2300. ----
  2301.  
  2302. Description
  2303.      Demonstrates some of the features of the ImageStudio ARexx
  2304.      interface.
  2305.  
  2306.      Simply follow the prompts to see the features being explained.
  2307.  
  2308. Known bugs
  2309.      None.
  2310.  
  2311. ToIcon
  2312. ------
  2313.  
  2314. Description
  2315.      Resizes and remaps the image to that suitable as an icon.
  2316.  
  2317.      The script allows the following:
  2318.  
  2319.        1. Choosing of an alternative palette other than the default 4
  2320.           colour Workbench palette.
  2321.  
  2322.        2. Copying of the image into the clipboard, ready to be pasted
  2323.           into IconEdit.
  2324.  
  2325. Known bugs
  2326.      None.
  2327.  
  2328. ARexx commands
  2329. ==============
  2330.  
  2331.    More detailed information on each of the individual ARexx commands
  2332. can be found below.
  2333.  
  2334. BALANCE
  2335. -------
  2336.  
  2337. Command
  2338.      BALANCE
  2339.  
  2340. Parameters template
  2341.      BRIGHTNESS/N, CONTRAST/N, GAMMA/N, NORED/S, NOGREEN/S,
  2342.      NOBLUE/S
  2343.  
  2344. Return template
  2345.      None.
  2346.  
  2347. Description
  2348.      This command allows the user to change the colour balance of the
  2349.      image.  The user may select specify one of the BRIGHTNESS,
  2350.      CONTRAST or GAMMA values to adjust - specifying more than one will
  2351.      only result in the first operation being acted upon.
  2352.  
  2353.      By default, the operation is applied to all the red, green and
  2354.      blue values of the image. The user may stop any of the RGB
  2355.      channels being affected by selecting any of the NORED, NOGREEN or
  2356.      NOBLUE switches. Multiple switches may be used, but not all three
  2357.      together.
  2358.  
  2359.      See Show_balance, for a full description of altering the image's
  2360.      colour balance.
  2361.  
  2362. Parameters
  2363.     BRIGHTNESS
  2364.           This adjusts the brightness / darkness of the image. Valid
  2365.           values are between -100 (make everything black) to 100 (make
  2366.           everything twice as bright).
  2367.  
  2368.     CONTRAST
  2369.           This adjusts the relative difference between dark and light
  2370.           colours. Valid values are -100 (everything to mid-grey) to
  2371.           100 (everything to extreme contrast).
  2372.  
  2373.     GAMMA
  2374.           This adjusts the gamma response of the image. Valid values
  2375.           are -100 to 100.
  2376.  
  2377. Returns
  2378.      Nothing.
  2379.  
  2380. Errors
  2381.      rc = 0 if the operation was successful.
  2382.  
  2383.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2384.      string describing the problem.
  2385.  
  2386. Example
  2387.      The following adjusts the gamma of the image by 10:
  2388.  
  2389.           BALANCE GAMMA 10
  2390.  
  2391.      The following darkens the green componant of the image by -20:
  2392.  
  2393.           BALANCE BRIGHTNESS -20 NORED NOBLUE
  2394.  
  2395. Known bugs
  2396.      None.
  2397.  
  2398. COLOURS
  2399. -------
  2400.  
  2401. Command
  2402.      COLOURS
  2403.  
  2404. Parameters template
  2405.      NUMCOLOURS/N, SIXTEENMILLION/S, COLOURCHOICE, DITHER
  2406.  
  2407. Return template
  2408.      None.
  2409.  
  2410. Description
  2411.      Allows the user to change the number of colours of the current
  2412.      image. The image can be changed to either 2-256 colours or 16
  2413.      million colours (24bit). Methods of colour choice and dithering
  2414.      are available when reducing the number of colours in the image.
  2415.  
  2416.      See Colours, for a full description of changing the number of
  2417.      colours in the image.
  2418.  
  2419. Parameters
  2420.     NUMCOLOURS/N
  2421.           The number of colours desired for the image. Valid values are
  2422.           2 to 256, the result will always be a colour-mapped image.
  2423.  
  2424.     SIXTEENMILLION/S
  2425.           In order to increase the number of possible colours in the
  2426.           image to the maximum possible (16 million), the user should
  2427.           specify this switch. The user may not specify this switch as
  2428.           well as the NUMCOLOURS option.
  2429.  
  2430.     COLOURCHOICE
  2431.           This is a string which determines which method of colour
  2432.           choice should be used to reduce the number of colours in an
  2433.           image. At the present time, HECKBERT is the only available
  2434.           option and will be used by default if no COLOURCHOICE is
  2435.           specified.
  2436.  
  2437.     DITHER
  2438.           This string determines which method of dithering should be
  2439.           used when reducing the number of colours in an image. Valid
  2440.           strings are: NONE, FLOYD-STEINBERG or FS, STUCKI, JARVIS,
  2441.           BURKES, SIERRA and STEVENSON-ARCE. By default, no dithering
  2442.           is used.
  2443.  
  2444. Returns
  2445.      Nothing.
  2446.  
  2447. Errors
  2448.      rc = 0 if the operation was successful.
  2449.  
  2450.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2451.      string describing the problem.
  2452.  
  2453. Example
  2454.      The following reduces the image to 16 colours with Floyd-Steinberg
  2455.      dithering:
  2456.  
  2457.           COLOURS NUMCOLOURS 16 DITHER "FS"
  2458.  
  2459.      The following increases the image to 24bits, allowing 16 million
  2460.      possible colours:
  2461.  
  2462.           COLOURS SIXTEENMILLION
  2463.  
  2464. Known bugs
  2465.      None.
  2466.  
  2467. CONVOLVE
  2468. --------
  2469.  
  2470. Command
  2471.      CONVOLVE
  2472.  
  2473. Parameters template
  2474.      NAME/A
  2475.  
  2476. Return template
  2477.      None.
  2478.  
  2479. Description
  2480.      Applies the named convolution to the 24bit image. Convolution can
  2481.      only be applied to 16 million colour (24bit) images.
  2482.  
  2483.      See Show_convolves, for a full description of convolution filters.
  2484.  
  2485. Parameters
  2486.     NAME/A
  2487.           The name of the convolution filter as it appears in the "Show
  2488.           convolves" floating palette.
  2489.  
  2490. Returns
  2491.      Nothing.
  2492.  
  2493. Errors
  2494.      rc = 0 if the operation was successful.
  2495.  
  2496.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2497.      string describing the problem.
  2498.  
  2499. Example
  2500.      The following applies the "Blur high" convolution filter to the
  2501.      current image:
  2502.  
  2503.           CONVOLVE NAME '"Blur high"'
  2504.  
  2505.      The following increases the image to 24bits if necessary, then
  2506.      applies the "Edge detect" convolution filter:
  2507.  
  2508.           IMAGEINFO_GET STEM IMAGEINFO.
  2509.           
  2510.           if IMAGEINFO.DEPTH ~= 24 then do
  2511.              COLOURS SIXTEENMILLION
  2512.              end
  2513.           
  2514.           CONVOLVE NAME '"Edge detect"'
  2515.  
  2516. Known bugs
  2517.      None.
  2518.  
  2519. COPY
  2520. ----
  2521.  
  2522. Command
  2523.      COPY
  2524.  
  2525. Parameters template
  2526.      None.
  2527.  
  2528. Return template
  2529.      None.
  2530.  
  2531. Description
  2532.      Copies the current image into the clipboard buffer.
  2533.  
  2534.      See Copy, for a full description of copying images to the
  2535.      clipboard.
  2536.  
  2537. Parameters
  2538.      None.
  2539.  
  2540. Returns
  2541.      Nothing.
  2542.  
  2543. Errors
  2544.      rc = 0 if the operation was successful.
  2545.  
  2546.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2547.      string describing the problem.
  2548.  
  2549. Example
  2550.      The following copies the current image to the clipboard:
  2551.  
  2552.           COPY
  2553.  
  2554. Known bugs
  2555.      None.
  2556.  
  2557. CROP
  2558. ----
  2559.  
  2560. Command
  2561.      CROP
  2562.  
  2563. Parameters template
  2564.      None.
  2565.  
  2566. Return template
  2567.      None.
  2568.  
  2569. Description
  2570.      Crops the image to the currently selected region. A region must be
  2571.      selected for this command to work.
  2572.  
  2573.      See Crop, for a full description of cropping images.
  2574.  
  2575. Parameters
  2576.      None.
  2577.  
  2578. Returns
  2579.      Nothing.
  2580.  
  2581. Errors
  2582.      rc = 0 if the operation was successful.
  2583.  
  2584.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2585.      string describing the problem.
  2586.  
  2587. Example
  2588.      The following crops the current image to the currently selected
  2589.      region:
  2590.  
  2591.           CROP
  2592.  
  2593.      The following crops the current image to the currently selected
  2594.      region only if a region exists:
  2595.  
  2596.           REGION_GET STEM REGIONINFO.
  2597.           
  2598.           if REGIONINFO.MINX ~= -1 then do
  2599.              CROP
  2600.              end
  2601.  
  2602. Known bugs
  2603.      None.
  2604.  
  2605. EFFECT
  2606. ------
  2607.  
  2608. Command
  2609.      EFFECT
  2610.  
  2611. Parameters template
  2612.      NAME/A, ARGS
  2613.  
  2614. Return template
  2615.      None.
  2616.  
  2617. Description
  2618.      Applies the named effect to the image. Optional arguments that the
  2619.      effect may require can be passed via the ARGS parameter.
  2620.  
  2621.      See Effects, for a full description of the available effects.
  2622.  
  2623. Parameters
  2624.     NAME/A
  2625.           The name of the effect to apply, as it appears in the
  2626.           "Effects" floating palette.
  2627.  
  2628.     ARGS
  2629.           Any optional arguments that the desired effect may require.
  2630.  
  2631. Returns
  2632.      Nothing.
  2633.  
  2634. Errors
  2635.      rc = 0 if the operation was successful.
  2636.  
  2637.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2638.      string describing the problem.
  2639.  
  2640. Example
  2641.      The following applies the "Negative" effect to the image:
  2642.  
  2643.           EFFECT NAME "Negative"
  2644.  
  2645.      The following pixelizes the image to a size of 4 pixels:
  2646.  
  2647.           EFFECT NAME "Pixelize" ARGS '"PIXELSIZE 4"'
  2648.  
  2649. Known bugs
  2650.      None.
  2651.  
  2652. FILES_MATCH
  2653. -----------
  2654.  
  2655. Command
  2656.      FILES_MATCH
  2657.  
  2658. Parameters template
  2659.      PATHPART/A, PATTERN
  2660.  
  2661. Return template
  2662.      FILEPARTS/M
  2663.  
  2664. Description
  2665.      Returns a list of files in a directory matching an optional
  2666.      pattern.
  2667.  
  2668. Parameters
  2669.     PATHPART/A
  2670.           The path (directory) name from which the filenames should be
  2671.           taken.
  2672.  
  2673.     PATTERN
  2674.           Optional file matching pattern, to allow the inclusion of
  2675.           only specific filenames. By default, all the files in a
  2676.           directory are returned.
  2677.  
  2678. Returns
  2679.     FILEPARTS/M
  2680.           An array of strings containing the matching filenames in the
  2681.           given PATH.
  2682.  
  2683. Errors
  2684.      rc = 0 if the operation was successful.
  2685.  
  2686.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2687.      string describing the problem.
  2688.  
  2689. Example
  2690.      The following gets all the filenames from the "Pics" directory and
  2691.      returns them in the stem FILENAMES.:
  2692.  
  2693.           FILES_MATCH PATHPART "Pics" STEM FILENAMES.
  2694.  
  2695.      The following gets all the filenames in the current directory with
  2696.      a ".ilbm" or ".iff" filename extension:
  2697.  
  2698.           FILES_MATCH PATHPART '""' PATTERN "#?.(ilbm|iff)" STEM FILENAMES.
  2699.  
  2700.      The following gets all the filenames in the "S:" directory that
  2701.      start with an "S" and puts them in pop up requesters:
  2702.  
  2703.           FILES_MATCH PATHPART "S:" PATTERN "S#?" STEM FILENAMES.
  2704.           
  2705.           do l = 0 to (FILENAMES.FILEPARTS.COUNT - 1)
  2706.              REQUEST_MESSAGE BUTTONTEXT "More|Cancel" AUTOCANCEL,
  2707.                 TEXT '"'FILENAMES.FILEPARTS.l'"'
  2708.              end
  2709.  
  2710. Known bugs
  2711.      None.
  2712.  
  2713. FILE_JOIN
  2714. ---------
  2715.  
  2716. Command
  2717.      FILE_JOIN
  2718.  
  2719. Parameters template
  2720.      PATHPART/A, FILEPART/A
  2721.  
  2722. Return template
  2723.      FILE
  2724.  
  2725. Description
  2726.      Joins the path part of a filename to the file part of a filename,
  2727.      returning the full filename. Adds `/' and `:' where appropriate to
  2728.      create a full filename.
  2729.  
  2730. Parameters
  2731.     PATHPART/A
  2732.           The path (directory) part of the filename to be created.
  2733.  
  2734.     FILEPART/A
  2735.           The file part of the filename to be created.
  2736.  
  2737. Returns
  2738.     FILE
  2739.           The full filename created from the path and file parts.
  2740.  
  2741. Errors
  2742.      rc = 0 if the operation was successful.
  2743.  
  2744.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2745.      string describing the problem.
  2746.  
  2747. Example
  2748.      The following creates the filename "Pics/HappyFace_240x250.bmp"
  2749.      from the seperate path and fileparts - the result is put in a pop
  2750.      up requester:
  2751.  
  2752.           FILE_JOIN PATHPART "Pics" FILEPART "HappyFace_240x250.bmp"
  2753.           
  2754.           REQUEST_MESSAGE TEXT '"'RESULT'"'
  2755.  
  2756.      The following creates the filename "T:TempImage.jpg" from the
  2757.      seperate path and fileparts (note how the '/' seperater is not
  2758.      needed) - the result is put in a pop up requester:
  2759.  
  2760.           FILE_JOIN PATHPART "T:" FILEPART "TempImage.jpg"
  2761.           
  2762.           REQUEST_MESSAGE TEXT '"'RESULT'"'
  2763.  
  2764. Known bugs
  2765.      None.
  2766.  
  2767. FILE_RENAME
  2768. -----------
  2769.  
  2770. Command
  2771.      FILE_RENAME
  2772.  
  2773. Parameters template
  2774.      FILE/A, FROM/A, TO/A
  2775.  
  2776. Return template
  2777.      FILE
  2778.  
  2779. Description
  2780.      Replaces the last occurrance of a given string in a filename with
  2781.      another string. Useful for renaming filename extensions.
  2782.  
  2783.      Note: *This command doesn't actually rename the file*, it simply
  2784.      returns what the new filename should be.
  2785.  
  2786.      Hint: To rename *any* filename extension to a chosen extension,
  2787.      you can set "FROM ." and "TO .newextension". This removes any old
  2788.      extension and replaces it with the given new extension. This can
  2789.      be useful if you are converting a large number of different format
  2790.      files to one format (see BatchConvert).
  2791.  
  2792. Parameters
  2793.     FILE/A
  2794.           The original filename to be renamed.
  2795.  
  2796.     FROM/A
  2797.           The string to remove from the old filename.
  2798.  
  2799.     TO/A
  2800.           The string to replace the FROM string in the filename.
  2801.  
  2802. Returns
  2803.     FILE
  2804.           The renamed filename. If no FROM string was found in the
  2805.           original filename, the original filename is returned with the
  2806.           new TO string appended.
  2807.  
  2808. Errors
  2809.      rc = 0 if the operation was successful.
  2810.  
  2811.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2812.      string describing the problem.
  2813.  
  2814. Example
  2815.      The following renames the filename "Zebra_250x250.pcx" to
  2816.      "Zebra_250x250.ilbm", the final filename is placed in RESULT:
  2817.  
  2818.           FILE_RENAME FILE "Zebra_250x250.pcx" FROM ".pcx" TO ".ilbm"
  2819.  
  2820.      The following appends ".out" to the filename "pic.0001":
  2821.  
  2822.           FILE_RENAME FILE "pic.0001" FROM "XXX" TO ".out"
  2823.  
  2824. Known bugs
  2825.      None.
  2826.  
  2827. FILE_SPLIT
  2828. ----------
  2829.  
  2830. Command
  2831.      FILE_SPLIT
  2832.  
  2833. Parameters template
  2834.      FILE/A
  2835.  
  2836. Return template
  2837.      PATHPART, FILEPART
  2838.  
  2839. Description
  2840.      Splits the given filename into seperate path and file parts.
  2841.  
  2842. Parameters
  2843.     FILE/A
  2844.           The full filename to be split.
  2845.  
  2846. Returns
  2847.     PATHPART
  2848.           The path (directory) part of the filename.
  2849.  
  2850.     FILEPART
  2851.           The file part of the filename.
  2852.  
  2853. Errors
  2854.      rc = 0 if the operation was successful.
  2855.  
  2856.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2857.      string describing the problem.
  2858.  
  2859. Example
  2860.      The following seperates the filename "Pics/HappyFace_240x250.bmp"
  2861.      into seperate path and fileparts - the result is put in a pop up
  2862.      requester:
  2863.  
  2864.           FILE_SPLIT FILE "Pics/HappyFace_240x250.bmp" STEM FILENAME.
  2865.           
  2866.           REQUEST_MESSAGE TEXT '"Path:'FILENAME.PATHPART,
  2867.              'File:'FILENAME.FILEPART'"'
  2868.  
  2869.      The following seperates the filename "T:TempImage.jpg" into
  2870.      seperate path and fileparts - the result is put into the default
  2871.      settings of a file requester:
  2872.  
  2873.           FILE_SPLIT FILE "T:TempImage.jpg" STEM FILENAME.
  2874.           
  2875.           REQUEST_FILE PATHPART '"'FILENAME.PATHPART'"',
  2876.              FILE '"'FILENAME.PATHPART'"'
  2877.  
  2878. Known bugs
  2879.      None.
  2880.  
  2881. FULL_IMAGE
  2882. ----------
  2883.  
  2884. Command
  2885.      FULL_IMAGE
  2886.  
  2887. Parameters template
  2888.      None.
  2889.  
  2890. Return template
  2891.      None.
  2892.  
  2893. Description
  2894.      Displays the full image in the preview window.
  2895.  
  2896.      See Full_image, for a full description of this command.
  2897.  
  2898. Parameters
  2899.      None.
  2900.  
  2901. Returns
  2902.      Nothing.
  2903.  
  2904. Errors
  2905.      rc = 0 if the operation was successful.
  2906.  
  2907.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2908.      string describing the problem.
  2909.  
  2910. Example
  2911.      The following displays the full image in the preview window:
  2912.  
  2913.           FULL_IMAGE
  2914.  
  2915. Known bugs
  2916.      None.
  2917.  
  2918. GUI_BLOCK
  2919. ---------
  2920.  
  2921. Command
  2922.      GUI_BLOCK
  2923.  
  2924. Parameters template
  2925.      None.
  2926.  
  2927. Return template
  2928.      None.
  2929.  
  2930. Description
  2931.      Blocks all input to any open ImageStudio windows. This command is
  2932.      used to stop the user from entering any more input into the
  2933.      ImageStudio windows whilst an ARexx script is running. If the
  2934.      script has been started from ImageStudio (i.e. from the "Scripts"
  2935.      floating palette), all the GUI blocking / unblocking is handled
  2936.      automatically - the GUI is blocked when the script starts and
  2937.      unblocked when it finishes.
  2938.  
  2939.      If the script is started externally (i.e. from another ARexx
  2940.      program or from the CLI using `rx'), the user should block the GUI
  2941.      if they think the ARexx is going to spend a long time processing
  2942.      some information. The GUI is still automatically blocked when a
  2943.      requester is opened however.
  2944.  
  2945. Parameters
  2946.      None.
  2947.  
  2948. Returns
  2949.      Nothing.
  2950.  
  2951. Errors
  2952.      rc = 0 if the operation was successful.
  2953.  
  2954.      rc = 10 if the operation failed for any reason, rc2 will contain a
  2955.      string describing the problem.
  2956.  
  2957. Example
  2958.      The following blocks all input to the ImageStudio GUI:
  2959.  
  2960.           GUI_BLOCK
  2961.  
  2962. Known bugs
  2963.      None.
  2964.  
  2965. GUI_UNBLOCK
  2966. -----------
  2967.  
  2968. Command
  2969.      GUI_UNBLOCK
  2970.  
  2971. Parameters template
  2972.      None.
  2973.  
  2974. Return template
  2975.      None.
  2976.  
  2977. Description
  2978.      Unblocks all input to any open ImageStudio windows after a
  2979.      GUI_BLOCK command. If the script has been started from ImageStudio
  2980.      (i.e. from the "Scripts" floating palette), all the GUI blocking /
  2981.      unblocking is handled automatically - the GUI is blocked when the
  2982.      script starts and unblocked when it finishes.
  2983.  
  2984.      If the scripts is started externally (i.e. from another ARexx
  2985.      program or from the CLI using `rx'), the user should unblock the
  2986.      GUI after a GUI_BLOCK command has been issued. The GUI is still
  2987.      automatically unblocked after a requester has been satisfied
  2988.      however.
  2989.  
  2990. Parameters
  2991.      None.
  2992.  
  2993. Returns
  2994.      Nothing.
  2995.  
  2996. Errors
  2997.      rc = 0 if the operation was successful.
  2998.  
  2999.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3000.      string describing the problem.
  3001.  
  3002. Example
  3003.      The following unblocks all input to the ImageStudio GUI:
  3004.  
  3005.           GUI_UNBLOCK
  3006.  
  3007. Known bugs
  3008.      None.
  3009.  
  3010. HELP
  3011. ----
  3012.  
  3013. Command
  3014.      HELP
  3015.  
  3016. Parameters template
  3017.      COMMAND
  3018.  
  3019. Return template
  3020.      COMMANDDESC, COMMANDLIST/M
  3021.  
  3022. Description
  3023.      Returns help on a given ARexx command. This command is meant
  3024.      mainly for use with the command shell (see Command_shell), as it
  3025.      is of very little use within a script. Both the command's
  3026.      parameter and return templates are returned.
  3027.  
  3028. Parameters
  3029.     COMMAND
  3030.           The ARexx command to obtain help on.
  3031.  
  3032. Returns
  3033.     COMMANDDESC
  3034.           The parameter template.
  3035.  
  3036.     COMMANDLIST/M
  3037.           The result template.
  3038.  
  3039. Errors
  3040.      rc = 0 if the operation was successful.
  3041.  
  3042.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3043.      string describing the problem.
  3044.  
  3045. Example
  3046.      The following gets help on the ARexx OPEN command:
  3047.  
  3048.           HELP OPEN
  3049.  
  3050.      The following gets help on the HELP command:
  3051.  
  3052.           HELP HELP
  3053.  
  3054. Known bugs
  3055.      None.
  3056.  
  3057. HSV_TO_RGB
  3058. ----------
  3059.  
  3060. Command
  3061.      HSV_TO_RGB
  3062.  
  3063. Parameters template
  3064.      H/N/A, S/N/A, V/N/A
  3065.  
  3066. Return template
  3067.      R/N, G/N, B/N
  3068.  
  3069. Description
  3070.      Converts a HSV colour value into a RGB colour value.
  3071.  
  3072.      See Colour representations, for more details on RGB and HSV colour
  3073.      representations.
  3074.  
  3075. Parameters
  3076.     H/N/A
  3077.           The hue value of the colour to convert. Valid values are 0 to
  3078.           360.
  3079.  
  3080.     S/N/A
  3081.           The saturation value of the colour to convert. Valid values
  3082.           are 0 to 100.
  3083.  
  3084.     V/N/A
  3085.           The value of the colour to convert. Valid values are 0 to 100.
  3086.  
  3087. Returns
  3088.     R/N
  3089.           The red componant value of the colour.
  3090.  
  3091.     G/N
  3092.           The green componant value of the colour.
  3093.  
  3094.     B/N
  3095.           The blue componant value of the colour.
  3096.  
  3097. Errors
  3098.      rc = 0 if the operation was successful.
  3099.  
  3100.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3101.      string describing the problem.
  3102.  
  3103. Example
  3104.      The following converts yellow from HSV to RGB representation,
  3105.      putting the result in RESULT:
  3106.  
  3107.           HSV_TO_RGB 60 100 100
  3108.  
  3109.      The following converts mid-grey from HSV to RGB representation,
  3110.      putting the result in the stem COLOUR.:
  3111.  
  3112.           HSV_TO_RGB 0 0 49 STEM COLOUR.
  3113.  
  3114. Known bugs
  3115.      None.
  3116.  
  3117. IMAGEINFO_GET
  3118. -------------
  3119.  
  3120. Command
  3121.      IMAGEINFO_GET
  3122.  
  3123. Parameters template
  3124.      None.
  3125.  
  3126. Return template
  3127.      WIDTH/N, HEIGHT/N, DEPTH/N, FILE, MODEID/N, CHANGED/N
  3128.  
  3129. Description
  3130.      Returns information about the current image. If no image is
  3131.      currently loaded, -1 is returned in all the numeric fields.
  3132.  
  3133. Parameters
  3134.      None.
  3135.  
  3136. Returns
  3137.     WIDTH/N
  3138.           The width of the image in pixels, -1 if no image is loaded.
  3139.  
  3140.     HEIGHT/N
  3141.           The height of the image in pixels, -1 if no image is loaded.
  3142.  
  3143.     DEPTH/N
  3144.           The colour depth of the image, -1 if no image is loaded.
  3145.           Returns 1 to 8 for 2 to 256 colour images, 24 for 16 million
  3146.           colour images.
  3147.  
  3148.     FILE
  3149.           The full filename of the current image.
  3150.  
  3151.     MODEID/N
  3152.           The current screenmode of the image. This number is not meant
  3153.           to be interpreted directly, but can be used to be passed to
  3154.           the screenmode requester (see ARexx_REQUEST_SCREENMODE). When
  3155.           the image loaded is a non IFF-ILBM image, this screenmode
  3156.           value is "guessed" at by ImageStudio to be the closest Amiga
  3157.           equivalent based on the image's dimensions.
  3158.  
  3159.     CHANGED/N
  3160.           A numeric value, taking the value 1 to represent a change in
  3161.           the current project or 0 for no change.
  3162.  
  3163. Errors
  3164.      rc = 0 if the operation was successful.
  3165.  
  3166.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3167.      string describing the problem.
  3168.  
  3169. Example
  3170.      The following gets the current image's information and returns it
  3171.      in the stem IMAGE.:
  3172.  
  3173.           IMAGEINFO_GET STEM IMAGE.
  3174.  
  3175.      The following gets the current image's info and opens a screenmode
  3176.      requester with the current screenmode if an image is loaded:
  3177.  
  3178.           IMAGEINFO_GET STEM IMAGE.
  3179.           
  3180.           if IMAGE.WIDTH ~= -1 then do
  3181.              REQUEST_SCREENMODE MODEID IMAGE.MODEID
  3182.              end
  3183.  
  3184. Known bugs
  3185.      None.
  3186.  
  3187. IMAGEINFO_SET
  3188. -------------
  3189.  
  3190. Command
  3191.      IMAGEINFO_SET
  3192.  
  3193. Parameters template
  3194.      MODEID/N
  3195.  
  3196. Return template
  3197.      None.
  3198.  
  3199. Description
  3200.      Sets information about the current image. Currently, only the
  3201.      image's screenmode can be set.
  3202.  
  3203. Parameters
  3204.     MODEID/N
  3205.           The current screenmode ID of the image.
  3206.  
  3207. Returns
  3208.      Nothing.
  3209.  
  3210. Errors
  3211.      rc = 0 if the operation was successful.
  3212.  
  3213.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3214.      string describing the problem.
  3215.  
  3216. Example
  3217.      The following sets the current image's screenmode to LoRes.
  3218.  
  3219.           IMAGEINFO_SET MODEID 0
  3220.  
  3221.      The following opens up a screenmode requester and allows the user
  3222.      to choose the screenmode of the current image:
  3223.  
  3224.           REQUEST_SCREENMODE STEM SCREENMODEINFO.
  3225.           
  3226.           IMAGEINFO_SET MODEID SCREENMODEINFO.MODEID
  3227.  
  3228. Known bugs
  3229.      None.
  3230.  
  3231. NOTIFY_DIR
  3232. ----------
  3233.  
  3234. Command
  3235.      NOTIFY_DIR
  3236.  
  3237. Parameters template
  3238.      PATHPART/A
  3239.  
  3240. Return template
  3241.      FILEPART, ACTION
  3242.  
  3243. Description
  3244.      Monitors the specified directory and returns when a file is either
  3245.      updated or added to the directory. The affected filename is
  3246.      returned as well as the action that had been performed (either
  3247.      updated or added).
  3248.  
  3249.      Whilst the command is waiting for any change in the specified
  3250.      directory, the fuelgauge will flash and the user may press the
  3251.      `Abort' button on the infobar to cancel the operation.
  3252.  
  3253. Parameters
  3254.     PATHPART
  3255.           The path (directory) to be monitored.
  3256.  
  3257. Returns
  3258.     FILEPART
  3259.           The filename of the file that has been changed; the filename
  3260.           returned is without the full pathname. See ARexx_FILE_JOIN,
  3261.           for information on how to add the path part of the filename
  3262.           to create a full filename.
  3263.  
  3264.     ACTION
  3265.           A string containing a descripion of the action performed on
  3266.           FILE, either "ADDED" if the file is new to the directory or
  3267.           "UPDATED" if the file has been updated since the notify
  3268.           started.
  3269.  
  3270. Errors
  3271.      rc = 0 if the operation was successful.
  3272.  
  3273.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3274.      string describing the problem.
  3275.  
  3276. Example
  3277.      The following monitors the ram disk for any change, returning any
  3278.      change in the NOTIFYINFO. stem:
  3279.  
  3280.           NOTIFY_DIR PATHPART "ram:" STEM NOTIFYINFO.
  3281.  
  3282.      The following monitors the "Pics" directory for any change and
  3283.      pops up a requester informing the user of what has happened:
  3284.  
  3285.           NOTIFY_DIR PATHPART "Pics" STEM NOTIFYINFO.
  3286.           
  3287.           REQUEST_MESSAGE TEXT '"'NOTIFYINFO.FILEPART||' has been '||,
  3288.              NOTIFYINFO.ACTION'"'
  3289.  
  3290. Known bugs
  3291.        1. AmigaDos won't notify us if a file is deleted from the
  3292.           directory.
  3293.  
  3294.        2. If many files are added / updated in the directory quickly,
  3295.           NOTIFY_DIR may not necessarily return the first changed file.
  3296.           The same is true if the a file is created with an icon,
  3297.           NOTIFY_DIR may return the name of the ".info" file.
  3298.  
  3299.        3. File notification is not implemented on all filesystems
  3300.           (notably some network filesystems). No problems occur with
  3301.           either the standard OFS or FFS filesystems.
  3302.  
  3303. NOTIFY_FILE
  3304. -----------
  3305.  
  3306. Command
  3307.      NOTIFY_FILE
  3308.  
  3309. Parameters template
  3310.      FILE/A
  3311.  
  3312. Return template
  3313.      None.
  3314.  
  3315. Description
  3316.      Waits for a change in the specified file. The function will return
  3317.      if either a new file by the given name is created, or if the file
  3318.      is updated. Unlike NOTIFY_DIR (see ARexx_NOTIFY_DIR), NOTIFY_FILE
  3319.      also returns if the specified file is deleted.
  3320.  
  3321.      Whilst the command is waiting for any change in the specified
  3322.      file, the fuelgauge will flash and the user may press the `Abort'
  3323.      button on the infobar to cancel the operation.
  3324.  
  3325.      This function can be used to trigger ImageStudio to perform a
  3326.      given set of operations when the specified file has been created.
  3327.      For example, if 50 frames of an animation were being rendered by a
  3328.      ray-tracer then ImageStudio could be told to wait for the last
  3329.      frame to be created an then convert them all to HAM format.
  3330.  
  3331. Parameters
  3332.     FILE
  3333.           The file to be monitored.
  3334.  
  3335. Returns
  3336.      Nothing.
  3337.  
  3338. Errors
  3339.      rc = 0 if the operation was successful.
  3340.  
  3341.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3342.      string describing the problem.
  3343.  
  3344. Example
  3345.      The following monitors the file "Pics/CheetahFace250x200.ilbm" for
  3346.      any change:
  3347.  
  3348.           NOTIFY_FILE "Pics/CheetahFace250x200.ilbm"
  3349.  
  3350.      The following waits for the 50th frame in the sequence "Render."
  3351.      to be created in the "Work:RayTrace":
  3352.  
  3353.           NOTIFY_FILE "Work:RayTrace/Render.050"
  3354.  
  3355. Known bugs
  3356.      File notification is not implemented on all filesystems (notably
  3357.      some network filesystems). No problems occur with either the
  3358.      standard OFS or FFS filesystems.
  3359.  
  3360. OPEN
  3361. ----
  3362.  
  3363. Command
  3364.      OPEN
  3365.  
  3366. Parameters template
  3367.      FILE/A, FORMAT, ARGS, FORCE/S
  3368.  
  3369. Return template
  3370.      None.
  3371.  
  3372. Description
  3373.      Loads the specified file into ImageStudio. Most file formats are
  3374.      automatically recognised by the program, but it is possible to
  3375.      specify extra information with the FORMAT and ARGS parameters.
  3376.  
  3377. Parameters
  3378.     FILE
  3379.           The filename of the file to be loaded.
  3380.  
  3381.     FORMAT
  3382.           Most file formats are automatically recognised by
  3383.           ImageStudio, but some raw formats need to be specified. If
  3384.           the file to be loaded is known to be a raw format, this
  3385.           parameter should be used to specify the file format. See File
  3386.           formats, for more information on raw file formats.
  3387.  
  3388.     ARGS
  3389.           Some file formats require extra information to be specified a
  3390.           load time, this parameter should be used to specify more
  3391.           information. See File formats, for more information on extra
  3392.           arguments allowed by the loaders.
  3393.  
  3394.     FORCE/S
  3395.           By default the user will be warned if they are about to
  3396.           overwrite the current project. By specifying FORCE, the user
  3397.           is not warned.
  3398.  
  3399. Returns
  3400.      Nothing.
  3401.  
  3402. Errors
  3403.      rc = 0 if the operation was successful.
  3404.  
  3405.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3406.      string describing the problem.
  3407.  
  3408. Example
  3409.      The following opens the file "Pics/CheetahFace250x200.ilbm":
  3410.  
  3411.           OPEN "Pics/CheetahFace250x200.ilbm"
  3412.  
  3413. Known bugs
  3414.      With v2.0.x, if the user presses `Abort' when the file is loading,
  3415.      an error message is not returned and so the ARexx script assumes
  3416.      the file loaded OK. This will be fixed when the loaders / savers
  3417.      become external modules.
  3418.  
  3419. PALETTE_GET
  3420. -----------
  3421.  
  3422. Command
  3423.      PALETTE_GET
  3424.  
  3425. Parameters template
  3426.      None.
  3427.  
  3428. Return template
  3429.      PALETTE/N/M
  3430.  
  3431. Description
  3432.      Gets the palette information from the current image.
  3433.  
  3434. Parameters
  3435.      None.
  3436.  
  3437. Returns
  3438.     PALETTE/N/M
  3439.           An array of the colours in the palette, ordered red, green
  3440.           then blue. Check PALETTE.COUNT for the number of entries in
  3441.           the array, divide this value by 3 to get the number of
  3442.           colours in the palette.
  3443.  
  3444. Errors
  3445.      rc = 0 if the operation was successful.
  3446.  
  3447.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3448.      string describing the problem.
  3449.  
  3450. Example
  3451.      The following gets the palette from the current image and returns
  3452.      it in the PALETTE. stem:
  3453.  
  3454.           PALETTE_GET STEM PALETTE.
  3455.  
  3456.      The following gets the palette from the current image (if
  3457.      possible) and puts the first colour value in a requester:
  3458.  
  3459.           IMAGEINFO_GET STEM IMAGEINFO.
  3460.           
  3461.           if IMAGEINFO.DEPTH ~= 24 then do
  3462.              PALETTE_GET STEM PALETTE.
  3463.           
  3464.              numcolours = PALETTE.PALETTE.COUNT / 3
  3465.           
  3466.              REQUEST_MESSAGE TEXT '"'numcolours||' colours, colour 0 = '||,
  3467.                 PALETTE.PALETTE.0||','||PALETTE.PALETTE.1||','||,
  3468.                 PALETTE.PALETTE.2||'"'
  3469.              end
  3470.           else do
  3471.              REQUEST_MESSAGE TEXT '"Image has no palette."'
  3472.              end
  3473.  
  3474. Known bugs
  3475.      None.
  3476.  
  3477. PALETTE_LOAD
  3478. ------------
  3479.  
  3480. Command
  3481.      PALETTE_LOAD
  3482.  
  3483. Parameters template
  3484.      FILE/A, DITHER
  3485.  
  3486. Return template
  3487.      None.
  3488.  
  3489. Description
  3490.      Loads and remaps a palette onto the current image. Dithering is
  3491.      also allowed to get a better approximation with the new palette.
  3492.  
  3493. Parameters
  3494.     FILE/A
  3495.           The filename of the palette file to load.
  3496.  
  3497.     DITHER
  3498.           A string containing the name of the dither to apply when
  3499.           applying the new palette. The same dither names as the
  3500.           COLOURS command are used (see ARexx_COLOURS). By default, no
  3501.           dithering is applied.
  3502.  
  3503. Returns
  3504.      Nothing.
  3505.  
  3506. Errors
  3507.      rc = 0 if the operation was successful.
  3508.  
  3509.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3510.      string describing the problem.
  3511.  
  3512. Example
  3513.      The following loads a general 256 colour palette onto the image:
  3514.  
  3515.           PALETTE_LOAD FILE "Palettes/General256.palette"
  3516.  
  3517.      The following loads a general 16 colour palette with
  3518.      Floyd-Steinberg dithering onto the image:
  3519.  
  3520.           PALETTE_LOAD FILE "Palettes/General16.palette" DITHER "FS"
  3521.  
  3522. Known bugs
  3523.      None.
  3524.  
  3525. PALETTE_SAVE
  3526. ------------
  3527.  
  3528. Command
  3529.      PALETTE_SAVE
  3530.  
  3531. Parameters template
  3532.      FILE/A
  3533.  
  3534. Return template
  3535.      None.
  3536.  
  3537. Description
  3538.      Saves the palette of the current image out to disk. The image must
  3539.      be colour-mapped for this operation to work.
  3540.  
  3541. Parameters
  3542.     FILE/A
  3543.           The filename of the palette file to save.
  3544.  
  3545. Returns
  3546.      Nothing.
  3547.  
  3548. Errors
  3549.      rc = 0 if the operation was successful.
  3550.  
  3551.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3552.      string describing the problem.
  3553.  
  3554. Example
  3555.      The following saves the current image's palette to the ram disk:
  3556.  
  3557.           PALETTE_SAVE FILE "ram:Image.palette"
  3558.  
  3559.      The following only saves out the palette of the current image if
  3560.      the current image is colour-mapped:
  3561.  
  3562.           IMAGEINFO_GET STEM IMAGEINFO.
  3563.           
  3564.           if IMAGEINFO.DEPTH ~= 24 then do
  3565.              PALETTE_SAVE FILE "Image.palette"
  3566.              end
  3567.  
  3568. Known bugs
  3569.      None.
  3570.  
  3571. PALETTE_SET
  3572. -----------
  3573.  
  3574. Command
  3575.      PALETTE_SET
  3576.  
  3577. Parameters template
  3578.      PALETTE/N/M/A, REMAP/S
  3579.  
  3580. Return template
  3581.      None.
  3582.  
  3583. Description
  3584.      Forces the array of numbers as the current palette for the image.
  3585.      The depth of the resultant image is taken from the number of
  3586.      entries in the array. This is useful for adding colours into the
  3587.      current image's palette.
  3588.  
  3589. Parameters
  3590.     PALETTE/N/M/A
  3591.           The array of numbers that will build the palette. The total
  3592.           number of elements in the array determines the number of
  3593.           palette entries and the depth of the resultant images. The
  3594.           entries in the array are arranged colour0_red, colour0_green,
  3595.           colour0_blue, colour1_red etc... The values of the red, green
  3596.           and blue values are 0 to 255.
  3597.  
  3598.     REMAP
  3599.           By default, the given palette is forced up on the current
  3600.           image. By specifying the REMAP switch, the image can be
  3601.           remapped to best fit the new palette.
  3602.  
  3603. Returns
  3604.      Nothing.
  3605.  
  3606. Errors
  3607.      rc = 0 if the operation was successful.
  3608.  
  3609.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3610.      string describing the problem.
  3611.  
  3612. Example
  3613.      The following sets the current image to black and white, remapping
  3614.      as best as possible:
  3615.  
  3616.           PALETTE_SET PALETTE "0 0 0 255 255 255" REMAP
  3617.  
  3618.      The following reduces the number of colours in the image to 29,
  3619.      then sets the top 3 colours to be red, white and blue. This is an
  3620.      example of how the returned stem value can be turned into a list
  3621.      of parameters for another command:
  3622.  
  3623.           /* Reduce the number of colours */
  3624.           
  3625.           COLOURS NUMCOLOURS 29 DITHER "FS"
  3626.           
  3627.           /* Get the current palette */
  3628.           
  3629.           PALETTE_GET STEM OLDPALETTE.
  3630.           
  3631.           /* Set the top 3 colours to red, white and blue */
  3632.           
  3633.           OLDPALETTE.PALETTE.87 = 255  /* Red */
  3634.           OLDPALETTE.PALETTE.88 = 0
  3635.           OLDPALETTE.PALETTE.89 = 0
  3636.           
  3637.           OLDPALETTE.PALETTE.90 = 255  /* White */
  3638.           OLDPALETTE.PALETTE.91 = 255
  3639.           OLDPALETTE.PALETTE.92 = 255
  3640.           
  3641.           OLDPALETTE.PALETTE.93 = 0    /* Blue */
  3642.           OLDPALETTE.PALETTE.94 = 0
  3643.           OLDPALETTE.PALETTE.95 = 255
  3644.           
  3645.           /* Convert the stem to a parameter list */
  3646.           
  3647.           NEWPALETTE = ''
  3648.           
  3649.           do l = 0 to (OLDPALETTE.PALETTE.COUNT - 1)
  3650.              NEWPALETTE = NEWPALETTE||' '||OLDPALETTE.PALETTE.l
  3651.              end
  3652.           
  3653.           /* Force the new palette onto the image */
  3654.           
  3655.           PALETTE_SET PALETTE NEWPALETTE REMAP
  3656.  
  3657. Known bugs
  3658.      None.
  3659.  
  3660. PALETTE_SORT
  3661. ------------
  3662.  
  3663. Command
  3664.      PALETTE_SORT
  3665.  
  3666. Parameters template
  3667.      FROM/N, TO/N, LIGHTTODARK/S
  3668.  
  3669. Return template
  3670.      None.
  3671.  
  3672. Description
  3673.      Sorts the colours in the palette into ascending / descending order
  3674.      of brightness. The whole palette can be sorted or a selected range.
  3675.  
  3676.      The colours in the palette are numbered from zero, so a 32 colour
  3677.      image would have palette entries 0 to 31 inclusive.
  3678.  
  3679.      The image in automatically remapped to the new palette after the
  3680.      operation.
  3681.  
  3682. Parameters
  3683.     FROM/N
  3684.           The first colour in the palette to sort from. By default this
  3685.           is zero.
  3686.  
  3687.     TO/N
  3688.           The last colour in the palette to sort to. By default this is
  3689.           the last colour in the image's palette.
  3690.  
  3691.     LIGHTTODARK/S
  3692.           By default the palette is sorted from dark to light. This
  3693.           option allows the palette to be sorted light to dark.
  3694.  
  3695. Returns
  3696.      Nothing.
  3697.  
  3698. Errors
  3699.      rc = 0 if the operation was successful.
  3700.  
  3701.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3702.      string describing the problem.
  3703.  
  3704. Example
  3705.      The following sorts the colours in the image's palette dark
  3706.      through to light:
  3707.  
  3708.           PALETTE_SORT
  3709.  
  3710.      The following sorts the lower 32 colours in a 64 colour image from
  3711.      light to dark:
  3712.  
  3713.           PALETTE_SORT FROM 0 TO 31 LIGHTTODARK
  3714.  
  3715. Known bugs
  3716.      None.
  3717.  
  3718. PASTE
  3719. -----
  3720.  
  3721. Command
  3722.      PASTE
  3723.  
  3724. Parameters template
  3725.      FORCE/S
  3726.  
  3727. Return template
  3728.      None.
  3729.  
  3730. Description
  3731.      Pastes the image in the clipboard into the program.
  3732.  
  3733. Parameters
  3734.     FORCE/S
  3735.           By default the user is warned if the the current project is
  3736.           unsaved and they are about to overwrite it. This parameter
  3737.           will not warn the user and overwrite the project regardless.
  3738.  
  3739. Returns
  3740.      Nothing.
  3741.  
  3742. Errors
  3743.      rc = 0 if the operation was successful.
  3744.  
  3745.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3746.      string describing the problem.
  3747.  
  3748. Example
  3749.      The following pastes the image in the clipboard, warning the user
  3750.      if the current project isn't saved:
  3751.  
  3752.           PASTE
  3753.  
  3754.      The following pastes the image in the clipboard with no warning to
  3755.      the user if the current project isn't saved:
  3756.  
  3757.           PASTE FORCE
  3758.  
  3759. Known bugs
  3760.      With v2.0.x, if the user presses `Abort' when the file is being
  3761.      pasted, an error message is not returned and so the ARexx script
  3762.      assumes the file pasted OK. This will be fixed when the loaders /
  3763.      savers become external modules.
  3764.  
  3765. PREF_GET
  3766. --------
  3767.  
  3768. Command
  3769.      PREF_GET
  3770.  
  3771. Parameters template
  3772.      NAME/A
  3773.  
  3774. Return template
  3775.      VALUE
  3776.  
  3777. Description
  3778.      Allows the user to read any of the preferences values currently in
  3779.      use by the program.
  3780.  
  3781.      See Prefs, for a full description of the available preference
  3782.      values.
  3783.  
  3784. Parameters
  3785.     NAME/A
  3786.           The name of the preference whose value should be returned.
  3787.           The tooltype name is given here, so to read the virtual
  3788.           memory pagesize for example, NAME would be PAGESIZE.
  3789.  
  3790.           If the preference name is not found, an error is returned.
  3791.  
  3792. Returns
  3793.     VALUE
  3794.           The value of the preference. If the preference is a string,
  3795.           VALUE is the string value, if the preference is numeric,
  3796.           VALUE is the number value and if the preference is boolean,
  3797.           VALUE is either the value 1 for a positive setting ("YES" or
  3798.           "ON") or 0 for a negative setting ("NO" or "OFF").
  3799.  
  3800. Errors
  3801.      rc = 0 if the operation was successful.
  3802.  
  3803.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3804.      string describing the problem.
  3805.  
  3806. Example
  3807.      The following finds the current virtual memory pagesize:
  3808.  
  3809.           PREF_GET NAME "PAGESIZE"
  3810.           
  3811.           say 'The pagesize is 'RESULT * 1024' bytes'
  3812.  
  3813.      The following detects whether the preview dithering is being used:
  3814.  
  3815.           PREF_GET NAME "PREVIEWDITHER"
  3816.           
  3817.           if RESULT == 1 then do
  3818.              say 'Preview dithering is ON'
  3819.              end
  3820.           else do
  3821.              say 'Preview dithering is OFF'
  3822.              end
  3823.  
  3824. Known bugs
  3825.      None.
  3826.  
  3827. PREF_SET
  3828. --------
  3829.  
  3830. Command
  3831.      PREF_SET
  3832.  
  3833. Parameters template
  3834.      NAME/A, VALUE/A
  3835.  
  3836. Return template
  3837.      None.
  3838.  
  3839. Description
  3840.      Allows the user to set any of the preferences values currently in
  3841.      use by the program. Changing some preference variables may have no
  3842.      effect until the next time the program is run.
  3843.  
  3844.      See Prefs, for a full description of the available preference
  3845.      values.
  3846.  
  3847. Parameters
  3848.     NAME/A
  3849.           The name of the preference whose value should be changed. The
  3850.           tooltype name is given here, so to set the virtual memory
  3851.           pagesize for example, NAME would be PAGESIZE.
  3852.  
  3853.           If the preference name is not found, an error is returned.
  3854.  
  3855.     VALUE/A
  3856.           The desired value of the preference. If the preference is a
  3857.           string, VALUE should be a string value, if the preference is
  3858.           numeric, VALUE should be a number value. If the preference is
  3859.           boolean, VALUE can be either the strings "YES" or "ON" to set
  3860.           a positive value, "NO" or "OFF" to set a negative value.
  3861.  
  3862. Returns
  3863.      Nothing.
  3864.  
  3865. Errors
  3866.      rc = 0 if the operation was successful.
  3867.  
  3868.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3869.      string describing the problem.
  3870.  
  3871. Example
  3872.      The following turns the preview redraw off:
  3873.  
  3874.           PREF_SET NAME "PREVIEWREDRAW" VALUE "OFF"
  3875.  
  3876.      The following sets the virtal memory pagesize to be 200K:
  3877.  
  3878.           PREF_SET NAME "PAGESIZE" VALUE 200
  3879.  
  3880. Known bugs
  3881.      None.
  3882.  
  3883. QUIT
  3884. ----
  3885.  
  3886. Command
  3887.      QUIT
  3888.  
  3889. Parameters template
  3890.      FORCE/S
  3891.  
  3892. Return template
  3893.      None.
  3894.  
  3895. Description
  3896.      Quits the program. By using the FORCE option, the program can be
  3897.      forced to quit without warning the user.
  3898.  
  3899.      The program cannot be quit by issuing the QUIT command from the
  3900.      command shell.
  3901.  
  3902. Parameters
  3903.     FORCE/S
  3904.           By default the user is warned if the program is about to quit
  3905.           and the current project remains unsaved. Specifying this
  3906.           parameter will force the program to quit regardless.
  3907.  
  3908. Returns
  3909.      Absolutely nothing.
  3910.  
  3911. Errors
  3912.      rc = 0 if the operation was successful.
  3913.  
  3914.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3915.      string describing the problem.
  3916.  
  3917. Example
  3918.      The following quits the program, warning the user if the current
  3919.      project is unsaved:
  3920.  
  3921.           QUIT
  3922.  
  3923.      The following quits the program regardless of the status of the
  3924.      current project:
  3925.  
  3926.           QUIT FORCE
  3927.  
  3928. Known bugs
  3929.      None.
  3930.  
  3931. REDO
  3932. ----
  3933.  
  3934. Command
  3935.      REDO
  3936.  
  3937. Parameters template
  3938.      None.
  3939.  
  3940. Return template
  3941.      None.
  3942.  
  3943. Description
  3944.      Re-does the last UNDO operation (see ARexx_UNDO).
  3945.  
  3946. Parameters
  3947.      None.
  3948.  
  3949. Returns
  3950.      Nothing.
  3951.  
  3952. Errors
  3953.      rc = 0 if the operation was successful.
  3954.  
  3955.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3956.      string describing the problem.
  3957.  
  3958. Example
  3959.      The following re-does the last UNDO operation:
  3960.  
  3961.           REDO
  3962.  
  3963. Known bugs
  3964.      None.
  3965.  
  3966. REDRAW
  3967. ------
  3968.  
  3969. Command
  3970.      REDRAW
  3971.  
  3972. Parameters template
  3973.      None.
  3974.  
  3975. Return template
  3976.      None.
  3977.  
  3978. Description
  3979.      Forces a redraw of the image in the preview window. This is not
  3980.      normally needed, as all the redrawing is done automatically
  3981.      however it could be used if the PREVIEWREDRAW preference is
  3982.      changed within a script.
  3983.  
  3984. Parameters
  3985.      None.
  3986.  
  3987. Returns
  3988.      Nothing.
  3989.  
  3990. Errors
  3991.      rc = 0 if the operation was successful.
  3992.  
  3993.      rc = 10 if the operation failed for any reason, rc2 will contain a
  3994.      string describing the problem.
  3995.  
  3996. Example
  3997.      The following forces a redraw of the image in the preview window:
  3998.  
  3999.           REDRAW
  4000.  
  4001.      The following forces a redraw of the image after the preview
  4002.      redraw has been turned off with the PREVIEWREDRAW preference:
  4003.  
  4004.           PREF_SET NAME "PREVIEWREDRAW" VALUE "OFF"
  4005.           
  4006.           REDRAW
  4007.  
  4008. Known bugs
  4009.      None.
  4010.  
  4011. REGION_CLEAR
  4012. ------------
  4013.  
  4014. Command
  4015.      REGION_CLEAR
  4016.  
  4017. Parameters template
  4018.      None.
  4019.  
  4020. Return template
  4021.      None.
  4022.  
  4023. Description
  4024.      Removes the currently selected region, if one exists. No error is
  4025.      given if a region doesn't exist.
  4026.  
  4027. Parameters
  4028.      None.
  4029.  
  4030. Returns
  4031.      Nothing.
  4032.  
  4033. Errors
  4034.      rc = 0 if the operation was successful.
  4035.  
  4036.      rc = 10 if the operation failed for any reason, rc2 will contain a
  4037.      string describing the problem.
  4038.  
  4039. Example
  4040.      The following clears the currently selected region:
  4041.  
  4042.           REGION_CLEAR
  4043.  
  4044.      The following checks that a region is selected before trying to
  4045.      clear it:
  4046.  
  4047.           REGION_GET STEM REGIONINFO.
  4048.           
  4049.           if REGIONINFO.MINX ~= -1 then do
  4050.              REGION_CLEAR
  4051.              end
  4052.  
  4053. Known bugs
  4054.      None.
  4055.  
  4056. REGION_GET
  4057. ----------
  4058.  
  4059. Command
  4060.      REGION_GET
  4061.  
  4062. Parameters template
  4063.      None.
  4064.  
  4065. Return template
  4066.      MINX/N, MINY/N, MAXX/N, MAXY/N, WIDTH/N, HEIGHT/N
  4067.  
  4068. Description
  4069.      Gets the current region dimensions from the image. If no region is
  4070.      selected, -1 is returned in all the fields.
  4071.  
  4072.      The values returned are the values of all the pixels inside the
  4073.      selected region. For example, if the top left pixel only of the
  4074.      image was selected the following values would be returned:
  4075.  
  4076.           MINX = 0
  4077.           MINY = 0
  4078.           MAXX = 0
  4079.           MAXY = 0
  4080.           WIDTH = 1
  4081.           HEIGHT = 1
  4082.  
  4083. Parameters
  4084.      None.
  4085.  
  4086. Returns
  4087.     MINX/N
  4088.           The left-most pixel included in the selected region, -1 if no
  4089.           region is selected.
  4090.  
  4091.     MINY/N
  4092.           The top-most pixel included in the selected region, -1 if no
  4093.           region is selected.
  4094.  
  4095.     MAXX/N
  4096.           The right-most pixel included in the selected region, -1 if
  4097.           no region is selected.
  4098.  
  4099.     MAXY/N
  4100.           The bottom-most pixel included in the selected region, -1 if
  4101.           no region is selected.
  4102.  
  4103.     WIDTH/N
  4104.           The width of the selected region, -1 if no region is selected.
  4105.  
  4106.     HEIGHT/N
  4107.           The height of the selected region, -1 if no region is
  4108.           selected.
  4109.  
  4110. Errors
  4111.      rc = 0 if the operation was successful.
  4112.  
  4113.      rc = 10 if the operation failed for any reason, rc2 will contain a
  4114.      string describing the problem.
  4115.  
  4116. Example
  4117.      The following gets the currently selected region and returns the
  4118.      value in the REGIONINFO. stem:
  4119.  
  4120.           REGION_GET STEM REGIONINFO.
  4121.  
  4122.      The following checks that a region is selected, popping up an
  4123.      message requester:
  4124.  
  4125.           REGION_GET STEM REGIONINFO.
  4126.           
  4127.           if REGIONINFO.MINX ~= -1 then do
  4128.              REQUEST_MESSAGE TEXT '"Width,Height = '||REGIONINFO.WIDTH||,
  4129.                 ','||REGIONINFO.HEIGHT||'"'
  4130.              end
  4131.           else do
  4132.              REQUEST_MESSAGE TEXT '"No region selected"'
  4133.              end
  4134.  
  4135. Known bugs
  4136.      None.
  4137.  
  4138. REGION_SET
  4139. ----------
  4140.  
  4141. Command
  4142.      REGION_SET
  4143.  
  4144. Parameters template
  4145.      None.
  4146.  
  4147. Return template
  4148.      XSTART/N, YSTART/N, TO/S, XEND/N, YEND/N
  4149.  
  4150. Description
  4151.      Sets the selected region of the image. The region can either be
  4152.      specifed by the co-ordinates of its corners or by its width,
  4153.      height and position.
  4154.  
  4155. Parameters
  4156.     XSTART/N
  4157.           The left-most co-ordinate included in the region.
  4158.  
  4159.     YSTART/N
  4160.           The top-most co-ordinate included in the region.
  4161.  
  4162.     TO/S
  4163.           By default the region is specified by the co-ordinates of its
  4164.           top-left corners and its width and height. By using the TO
  4165.           parameter, the region can be specified with the lower-bottom
  4166.           co-ordinate of the region.
  4167.  
  4168.     XEND/N
  4169.           The width of the region. If the TO parameter is used, this
  4170.           value is used to specify the right-most pixel included by the
  4171.           region.
  4172.  
  4173.     YEND/n
  4174.           The height of the region. If the TO parameter is used, this
  4175.           value is used to specify the bottom-most pixel included by
  4176.           the region.
  4177.  
  4178. Returns
  4179.      Nothing.
  4180.  
  4181. Errors
  4182.      rc = 0 if the operation was successful.
  4183.  
  4184.      rc = 10 if the operation failed for any reason, rc2 will contain a
  4185.      string describing the problem.
  4186.  
  4187. Example
  4188.      The following sets the selected region to have it's top-left
  4189.      corner at (10,20) with a width of 30 and height of 40:
  4190.  
  4191.           REGION_SET 10 20 30 40
  4192.  
  4193.      The following sets the selected region to have it's top-left
  4194.      corner at (50,60) and its bottom-right corner to include (70,80):
  4195.  
  4196.           REGION_SET 50 60 TO 70 80
  4197.  
  4198. Known bugs
  4199.      None.
  4200.  
  4201. REQUEST_DIR
  4202. -----------
  4203.  
  4204. Command
  4205.      REQUEST_DIR
  4206.  
  4207. Parameters template
  4208.      PATHPART, TITLE
  4209.  
  4210. Return template
  4211.      PATHPART
  4212.  
  4213. Description
  4214.      Opens a directory requester, allowing the user to choose a
  4215.      directory name.
  4216.  
  4217.      The other ImageStudio windows are automatically blocked when the
  4218.      requester is opened and unblocked when the requester is closed.
  4219.  
  4220.      In common with all ImageStudio requesters, if the user presses
  4221.      `Cancel', an error message is returned. For the script to trap
  4222.      this error, global error checking must be turned off. See Error
  4223.      checking, for more information.
  4224.  
  4225. Parameters
  4226.     PATHPART
  4227.           The default path name to put in the requester.
  4228.  
  4229.     TITLE
  4230.           The text for the title bar of the requester.
  4231.  
  4232. Returns
  4233.     PATHPART
  4234.           The selected path from the requester.
  4235.  
  4236. Errors
  4237.      rc = 0 if the operation was successful.
  4238.  
  4239.      rc = 10 if the operation failed for any reason or the user
  4240.      cancelled requester, rc2 will contain a string describing the
  4241.      problem.
  4242.  
  4243. Example
  4244.      The following puts up a directory requester, with the results
  4245.      being put in the DIRINFO. stem:
  4246.  
  4247.           REQUEST_DIR STEM DIRINFO.
  4248.  
  4249.      The following puts up a directory requester with a default
  4250.      directory of "T:", the result being printed in a message requester:
  4251.  
  4252.           REQUEST_DIR PATHPART "T:" STEM DIRINFO.
  4253.           
  4254.           REQUEST_MESSAGE TEXT '"You chose '||DIRINFO.PATHPART||'"'
  4255.  
  4256. Known bugs
  4257.      None.
  4258.  
  4259. REQUEST_FILE
  4260. ------------
  4261.  
  4262. Command
  4263.      REQUEST_FILE
  4264.  
  4265. Parameters template
  4266.      PATHPART, FILEPART, PATTERN, TITLE
  4267.  
  4268. Return template
  4269.      FILE
  4270.  
  4271. Description
  4272.      Opens a file requester, allowing the user to choose a filename.
  4273.  
  4274.      The other ImageStudio windows are automatically blocked when the
  4275.      requester is opened and unblocked when the requester is closed.
  4276.  
  4277.      In common with all ImageStudio requesters, if the user presses
  4278.      `Cancel', an error message is returned. For the script to trap
  4279.      this error, global error checking must be turned off. See Error
  4280.      checking, for more information.
  4281.  
  4282. Parameters
  4283.     PATHPART
  4284.           The default path name to put in the requester.
  4285.  
  4286.     FILEPART
  4287.           The default filename to put in the requester.
  4288.  
  4289.     PATTERN
  4290.           An AmigaDos pattern matching pattern, will only show files in
  4291.           the requester which match the given pattern. By default, all
  4292.           files are shown.
  4293.  
  4294.     TITLE
  4295.           The text for the title bar of the requester.
  4296.  
  4297. Returns
  4298.     FILE
  4299.           The selected filename from the requester, the filename
  4300.           consists of both the FILEPART and PATHPART parts.
  4301.  
  4302. Errors
  4303.      rc = 0 if the operation was successful.
  4304.  
  4305.      rc = 10 if the operation failed for any reason or the user
  4306.      cancelled requester, rc2 will contain a string describing the
  4307.      problem.
  4308.  
  4309. Example
  4310.      The following puts up a file requester, with the results being put
  4311.      in the FILEINFO. stem:
  4312.  
  4313.           REQUEST_FILE STEM FILEINFO.
  4314.  
  4315.      The following puts up a file requester with the result being
  4316.      printed in a message requester. The default file is
  4317.      "Pics/HappyFace240x250.bmp":
  4318.  
  4319.           REQUEST_FILE PATHPART "Pics" FILEPART "HappyFace240x250.bmp",
  4320.              STEM FILEINFO.
  4321.           
  4322.           REQUEST_MESSAGE TEXT '"You chose '||FILEINFO.FILE||'"'
  4323.  
  4324.      The following will only show files with a ".ilbm" file extension:
  4325.  
  4326.           REQUEST_FILE PATTERN "#?.ilbm"
  4327.  
  4328. Known bugs
  4329.      None.
  4330.  
  4331. REQUEST_LIST
  4332. ------------
  4333.  
  4334. Command
  4335.      REQUEST_LIST
  4336.  
  4337. Parameters template
  4338.      STRINGS/M/A, TITLE
  4339.  
  4340. Return template
  4341.      NUMBER/N, STRING
  4342.  
  4343. Description
  4344.      Opens a requester containing a list of options for the user to
  4345.      choose.
  4346.  
  4347.      The other ImageStudio windows are automatically blocked when the
  4348.      requester is opened and unblocked when the requester is closed.
  4349.  
  4350.      In common with all ImageStudio requesters, if the user presses
  4351.      `Cancel', an error message is returned. For the script to trap
  4352.      this error, global error checking must be turned off. See Error
  4353.      checking, for more information.
  4354.  
  4355. Parameters
  4356.     STRINGS/M/A
  4357.           The a list of string options for the user to choose.
  4358.  
  4359.     TITLE
  4360.           The text for the title bar of the requester.
  4361.  
  4362. Returns
  4363.     NUMBER/N
  4364.           The number in the list of the selected string. The strings
  4365.           are numbered from zero, so selecting the first choice in the
  4366.           list would set NUMBER to 0.
  4367.  
  4368.     STRING
  4369.           The selected string.
  4370.  
  4371. Errors
  4372.      rc = 0 if the operation was successful.
  4373.  
  4374.      rc = 10 if the operation failed for any reason, or the user
  4375.      cancelled requester, or no choice was made. rc2 will contain a
  4376.      string describing the problem.
  4377.  
  4378. Example
  4379.      The following puts up a list requester, with the results being put
  4380.      in the LISTINFO. stem:
  4381.  
  4382.           REQUEST_LIST STRINGS "IFF-ILBM" "PCX" "BMP" STEM LISTINFO.
  4383.  
  4384.      The following puts up a list requester, the result being printed
  4385.      in a message requester:
  4386.  
  4387.           REQUEST_LIST STRINGS "First" "Second" "Third" STEM LISTINFO.
  4388.           
  4389.           REQUEST_MESSAGE TEXT '"You chose '||LISTINFO.STRING||','||,
  4390.              ' option '||LISTINFO.NUMBER'"'
  4391.  
  4392. Known bugs
  4393.      None.
  4394.  
  4395. REQUEST_MESSAGE
  4396. ---------------
  4397.  
  4398. Command
  4399.      REQUEST_MESSAGE
  4400.  
  4401. Parameters template
  4402.      TEXT/A, BUTTONTEXT, AUTOCANCEL/S, TITLE
  4403.  
  4404. Return template
  4405.      NUMBER/N
  4406.  
  4407. Description
  4408.      Opens a general purpose message requester. Simple messages can be
  4409.      presented to the user for them to "OK" them. OK / Cancel
  4410.      requesters can be built with this requester, as well a complex
  4411.      multiple choice requesters.
  4412.  
  4413.      When designing requesters, it is worth remembering the following
  4414.      rules:
  4415.  
  4416.        1. The "Negative" response should be placed on the far
  4417.           right-hand button. For example, the `Cancel' button should be
  4418.           placed here.
  4419.  
  4420.        2. The "Positive" response should be placed on the far left-hand
  4421.           button. For example, the `OK' button should be placed here.
  4422.  
  4423.        3. Try to word your requesters to keep the positive and negative
  4424.           text as "OK" and "Cancel". Using options like "Go to it" and
  4425.           "Stop right here" doesn't make for a very intuitive interface.
  4426.  
  4427.        4. Keep the request text short. The user shouldn't have to read
  4428.           a screen full of text to find out what to do next.
  4429.  
  4430.        5. You should *NEVER* swap the "OK" and "Cancel" buttons around.
  4431.  
  4432.        6. The last point is *VERY* important.
  4433.  
  4434.      The other ImageStudio windows are automatically blocked when the
  4435.      requester is opened and unblocked when the requester is closed.
  4436.  
  4437.      If the AUTOCANCEL option is used and the user presses `Cancel', an
  4438.      error message is returned. For the script to trap this error,
  4439.      global error checking must be turned off. See Error checking, for
  4440.      more information.
  4441.  
  4442. Parameters
  4443.     TEXT/A
  4444.           The text to put into the requester. The text may contain
  4445.           multiple lines by including the `\n' characters in the string
  4446.           (see examples below).
  4447.  
  4448.     BUTTONTEXT
  4449.           The text for the buttons of the requester. The different
  4450.           buttons are seperated with a `|' character (i.e. BUTTONTEXT
  4451.           "OK|Cancel"). By default, only an "OK" button is placed in
  4452.           the requester.
  4453.  
  4454.     AUTOCANCEL/S
  4455.           By default REQUEST_MESSAGE simply returns the number of the
  4456.           button that the user selected. If the requester is of the OK
  4457.           / Cancel variety, specifying the AUTOCANCEL switch allows the
  4458.           requester to stop the script should the user press `Cancel'.
  4459.  
  4460.     TITLE
  4461.           The text for the title bar of the requester.
  4462.  
  4463. Returns
  4464.     NUMBER
  4465.           The number of the selected button. If the requester has one
  4466.           button, NUMBER is set to 0. For more that one button, the
  4467.           right-most button sets NUMBER to 0, with the buttons being
  4468.           numbered from 1 upwards working left to right. For example,
  4469.           with a BUTTONTEXT of "OK|Save first|Cancel", "OK" would
  4470.           return 1, "Save first" would return 2 and "Cancel" would
  4471.           return 0.
  4472.  
  4473. Errors
  4474.      rc = 0 if the operation was successful.
  4475.  
  4476.      rc = 10 if the operation failed for any reason, rc2 will contain a
  4477.      string describing the problem. rc will also be set to 10 if the
  4478.      AUTOCANCEL option is used and the user selects `Cancel'.
  4479.  
  4480. Example
  4481.      The following puts up a message requester:
  4482.  
  4483.           REQUEST_MESSAGE TEXT '"Operation finished"'
  4484.  
  4485.      The following puts up a OK / Cancel requester, stopping the script
  4486.      if the user selects `Cancel':
  4487.  
  4488.           REQUEST_MESSAGE TEXT '"Continue ?"' BUTTONTEXT "OK|Cancel",
  4489.              AUTOCANCEL
  4490.  
  4491.      The following shows a multiple choice requester, followed by a
  4492.      requester showing which option was chosen:
  4493.  
  4494.           REQUEST_MESSAGE TEXT '"Choose an option..."',
  4495.              BUTTONTEXT "First|Second|Third"
  4496.           
  4497.           REQUEST_MESSAGE TEXT '"You chose option '||RESULT||'"'
  4498.  
  4499.      The following shows a message requester with multiple lines of
  4500.      text using the `\n' characters:
  4501.  
  4502.           REQUEST_MESSAGE TEXT '"Top line\nMiddle line\nBottom line"'
  4503.  
  4504. Known bugs
  4505.      None.
  4506.  
  4507. REQUEST_MULTIFILE
  4508. -----------------
  4509.  
  4510. Command
  4511.      REQUEST_MULTIFILE
  4512.  
  4513. Parameters template
  4514.      PATHPART, FILEPART, PATTERN, TITLE
  4515.  
  4516. Return template
  4517.      FILES/M
  4518.  
  4519. Description
  4520.      Opens a file requester, allowing the user to choose multiple
  4521.      filenames.
  4522.  
  4523.      The other ImageStudio windows are automatically blocked when the
  4524.      requester is opened and unblocked when the requester is closed.
  4525.  
  4526.      In common with all ImageStudio requesters, if the user presses
  4527.      `Cancel', an error message is returned. For the script to trap
  4528.      this error, global error checking must be turned off. See Error
  4529.      checking, for more information.
  4530.  
  4531. Parameters
  4532.     PATHPART
  4533.           The default path name to put in the requester.
  4534.  
  4535.     FILEPART
  4536.           The default filename to put in the requester.
  4537.  
  4538.     PATTERN
  4539.           An AmigaDos pattern matching pattern, will only show files in
  4540.           the requester which match the given pattern. By default, all
  4541.           files are shown.
  4542.  
  4543.     TITLE
  4544.           The text for the title bar of the requester.
  4545.  
  4546. Returns
  4547.     FILES/M
  4548.           The selected filenames from the requester, the filenames
  4549.           consists of both the FILEPART and PATHPART parts.
  4550.  
  4551. Errors
  4552.      rc = 0 if the operation was successful.
  4553.  
  4554.      rc = 10 if the operation failed for any reason or the user
  4555.      cancelled requester, rc2 will contain a string describing the
  4556.      problem. rc will also be set to 10 if no files are chosen.
  4557.  
  4558. Example
  4559.      The following puts up a multifile requester, with the results
  4560.      being put in the MULTIFILEINFO. stem:
  4561.  
  4562.           REQUEST_MULTIFILE STEM MULTIFILEINFO.
  4563.  
  4564.      The following puts up a multifile requester, with a default path
  4565.      of "Pics" and loops through all the selected files by putting them
  4566.      in message requesters:
  4567.  
  4568.           REQUEST_MULTIFILE PATHPART "Pics" STEM MULTIFILENFO.
  4569.           
  4570.           do l = 0 to (MULTIFILENFO.FILES.COUNT - 1)
  4571.              REQUEST_MESSAGE TEXT '"'MULTIFILENFO.FILES.l'"',
  4572.                 BUTTONTEXT '"More...|Cancel"' AUTOCANCEL
  4573.              end
  4574.  
  4575. Known bugs
  4576.      If no file is chosen, the command returns a "user cancelled"
  4577.      error. This is normal.
  4578.  
  4579. REQUEST_MULTIVALUE
  4580. ------------------
  4581.  
  4582. Command
  4583.      REQUEST_MULTIVALUE
  4584.  
  4585. Parameters template
  4586.      STRINGS/M, TITLE
  4587.  
  4588. Return template
  4589.      STRINGS/M
  4590.  
  4591. Description
  4592.      Opens a multivalue requester, allowing the user to change any of
  4593.      the listed values.
  4594.  
  4595.      The other ImageStudio windows are automatically blocked when the
  4596.      requester is opened and unblocked when the requester is closed.
  4597.  
  4598.      In common with all ImageStudio requesters, if the user presses
  4599.      `Cancel', an error message is returned. For the script to trap
  4600.      this error, global error checking must be turned off. See Error
  4601.      checking, for more information.
  4602.  
  4603. Parameters
  4604.     STRINGS/M
  4605.           A list of strings with the values to display in the
  4606.           requester. The strings are grouped in pairs, the first string
  4607.           of the pair being the text for the requester, the second
  4608.           being the default value for that string.
  4609.  
  4610.           For example, the following would place width and height
  4611.           values in the requester, with default values of 640 and 480
  4612.           respectively:
  4613.  
  4614.                STRINGS "Width" "640" "Height" "480"
  4615.  
  4616.           If there isn't an even number of strings, an error is
  4617.           returned.
  4618.  
  4619.     TITLE
  4620.           The text for the title bar of the requester.
  4621.  
  4622. Returns
  4623.     STRINGS/M
  4624.           A list of strings with the values to display in the
  4625.           requester. The strings are grouped in pairs, the first string
  4626.           of the pair being the text for the requester, the second
  4627.           being the returned value for that string.
  4628.  
  4629. Errors
  4630.      rc = 0 if the operation was successful.
  4631.  
  4632.      rc = 10 if the operation failed for any reason or the user
  4633.      cancelled requester, rc2 will contain a string describing the
  4634.      problem. rc will also be set to 10 if no files are chosen.
  4635.  
  4636. Example
  4637.      The following puts up a multivalue requester, allowing the user to
  4638.      change the width, height and depth of an image. The result is put
  4639.      in the MULTIVALUEINFO. stem:
  4640.  
  4641.           REQUEST_MULTIVALUE "Width" "640" "Height" "480",
  4642.              STEM MULTIVALUEINFO.
  4643.  
  4644.      The following puts up a multivalue requester, allowing the user to
  4645.      change the name and depth of an image. The result is put displayed
  4646.      in a message requester and the values recycled until the user
  4647.      cancels the requesters:
  4648.  
  4649.           INSTRINGS = 'Name ImageName.bmp Depth 4'
  4650.           
  4651.           do forever
  4652.              REQUEST_MULTIVALUE STRINGS INSTRINGS STEM MULTIVALUEINFO.
  4653.           
  4654.              REQUEST_MESSAGE TEXT BUTTONTEXT "OK|Cancel" AUTOCANCEL,
  4655.                 TEXT '"Name: '||MULTIVALUEINFO.STRINGS.1||'\n'||,
  4656.                 'Depth : '||MULTIVALUEINFO.STRINGS.3||'"'
  4657.           
  4658.              /* Construct the new INSTRINGS */
  4659.           
  4660.              INSTRINGS = ''
  4661.           
  4662.              do l = 0 to (MULTIVALUEINFO.STRINGS.COUNT - 1)
  4663.                 INSTRINGS = INSTRINGS||' '||MULTIVALUEINFO.STRINGS.l
  4664.                 end
  4665.           
  4666.              end
  4667.  
  4668. Known bugs
  4669.      None.
  4670.  
  4671. REQUEST_SCREENMODE
  4672. ------------------
  4673.  
  4674. Command
  4675.      REQUEST_SCREENMODE
  4676.  
  4677. Parameters template
  4678.      MODEID/N, WIDTH/N, HEIGHT/N, OVERSCAN/N, DEPTH/N,
  4679.      GADS_ENABLED/S, MAXDEPTH/N, MINWIDTH/N, MINHEIGHT/N
  4680.  
  4681. Return template
  4682.      MODEID/N, WIDTH/N, HEIGHT/N, OVERSCAN/N, DEPTH/N, TEXT
  4683.  
  4684. Description
  4685.      Opens a screenmode requester, allowing the user to select an Amiga
  4686.      screenmode. By specifying the GADS_ENABLED, the user may also
  4687.      select the width, height, depth and overscan values for the
  4688.      screenmode.
  4689.  
  4690.      The other ImageStudio windows are automatically blocked when the
  4691.      requester is opened and unblocked when the requester is closed.
  4692.  
  4693.      In common with all ImageStudio requesters, if the user presses
  4694.      `Cancel', an error message is returned. For the script to trap
  4695.      this error, global error checking must be turned off. See Error
  4696.      checking, for more information.
  4697.  
  4698. Parameters
  4699.     MODEID/N
  4700.           The default screenmode ID for the requester which will be
  4701.           selected in the requester. By default, LORES is selected.
  4702.  
  4703.     WIDTH/N
  4704.           The default screen width value to put in the requester. By
  4705.           default, the default width of the selected screenmode is used.
  4706.  
  4707.     HEIGHT/N
  4708.           The default screen height value to put in the requester. By
  4709.           default, the default height of the selected screenmode is
  4710.           used.
  4711.  
  4712.     OVERSCAN/N
  4713.           The default overscan value to put in the requester. The
  4714.           following values are valid: 1 for text size, 2 for graphics
  4715.           size, 3 for extreme and 4 for maximum overscan. By default,
  4716.           text size is used.
  4717.  
  4718.     DEPTH/N
  4719.           The default depth value to put in the requester. By default,
  4720.           a depth of 2 is used.
  4721.  
  4722.     GADSENABLED/S
  4723.           By default the screenmode requester only allows the selecting
  4724.           of the screenmode. By using this switch, the user may also
  4725.           set the width, height, overscan and depth of the screenmode.
  4726.  
  4727.     MAXDEPTH/N
  4728.           The maximum depth allowed by the depth gadget. This value is
  4729.           only relevant to the internal screenmode requester.
  4730.  
  4731.     MINWIDTH/N
  4732.           The minimum allowable width of the screenmode.
  4733.  
  4734.     MINHEIGHT/N
  4735.           The minimum allowable height of the screenmode.
  4736.  
  4737. Returns
  4738.     MODEID/N
  4739.           The chosen screenmode ID.
  4740.  
  4741.     WIDTH/N
  4742.           The screen width chosen in the requester. This value is only
  4743.           set if the GADSENABLED switch is used.
  4744.  
  4745.     HEIGHT/N
  4746.           The screen height chosen in the requester. This value is only
  4747.           set if the GADSENABLED switch is used.
  4748.  
  4749.     OVERSCAN/N
  4750.           The overscan value chosen in the requester. The following
  4751.           values are returned: 1 for text size, 2 for graphics size, 3
  4752.           for extreme and 4 for maximum overscan. This value is only
  4753.           set if the GADSENABLED switch is used.
  4754.  
  4755.     DEPTH/N
  4756.           The depth value chosen in the requester. This value is only
  4757.           set if the GADSENABLED switch is used.
  4758.  
  4759.     TEXT
  4760.           A text description of the screenmode chosen.
  4761.  
  4762. Errors
  4763.      rc = 0 if the operation was successful.
  4764.  
  4765.      rc = 10 if the operation failed for any reason or the user
  4766.      cancelled requester, rc2 will contain a string describing the
  4767.      problem.
  4768.  
  4769. Example
  4770.      The following puts up a screenmode requester, the result is put in
  4771.      the SCREENMODEINFO. stem:
  4772.  
  4773.           REQUEST_SCREENMODE STEM SCREENMODEINFO.
  4774.  
  4775.      The following puts up a screenmode requester, complete with the
  4776.      width, height, depth and overscan gadgets. The chosen screenmode
  4777.      text is put in a message requester:
  4778.  
  4779.           REQUEST_SCREENMODE GADSENABLED STEM SCREENMODEINFO.
  4780.           
  4781.           REQUEST_MESSAGE TEXT '"'SCREENMODEINFO.TEXT'"'
  4782.  
  4783. Known bugs
  4784.        1. There are two screenmode requesters that can be used by
  4785.           ImageStudio. If ImageStudio is running on a Workbench2.1+
  4786.           Amiga the system ASL screenmode requester is used, if the
  4787.           Workbench2.04 is running then ImageStudio will use its
  4788.           internal screenmode requester (Workbench2.04 doesn't have an
  4789.           ASL screenmode requester). Because of the two different
  4790.           requesters and the complex way in which the Amiga deals with
  4791.           screenmodes, the operation of the two can be subtly different.
  4792.  
  4793.           The most noticeable difference is in the handling of the
  4794.           Amiga's built in screenmodes. A built in screenmode is
  4795.           something like "LoRes" or "HighRes Interlaced" as opposed to
  4796.           a disk based screenmode like "MULTISCAN:Productivity" or
  4797.           "SUPER72:High Res".
  4798.  
  4799.           If you choose a built in screenmode in the ASL screenmode
  4800.           requester, the requester will return the screenmode ID
  4801.           something like "PAL:LoRes". This means that the requester
  4802.           specifies that the screenmode is "LoRes" and the monitor to
  4803.           be used is "PAL" (or "NTSC" in America). If you choose a
  4804.           built in screenmode in the internal screenmode requester, the
  4805.           requester will return the screenmode ID something like
  4806.           "LoRes", i.e. *it doesn't specify the monitor to be used*.
  4807.  
  4808.           This is not usually a problem, but we feel that our
  4809.           screenmode requester may be more compatible with older
  4810.           software which doesn't understand the system of specifying
  4811.           the monitor in the screenmode.
  4812.  
  4813.           The matter is further complicated if you are using a monitor
  4814.           with mode promotion. Here, the internal screenmode
  4815.           requester's screenmodes are promoted to the new double
  4816.           scanning modes (e.g. "HighRes" gets promoted to
  4817.           "DBLPAL:HighRes"). The ASL screenmodes *aren't* promoted, as
  4818.           they already contain the desired monitor information in the
  4819.           screenmode. This feature is either "desirable" or
  4820.           "undesirable" depending on your point of view. If you've ever
  4821.           wondered why some screenmodes don't promote, this is why -
  4822.           they have been told to be specifically "PAL" or "NTSC" in
  4823.           their screenmode.
  4824.  
  4825.           If major problems are found in the differences between the
  4826.           internal and ASL screenmode requesters, we will endevour to
  4827.           alter the internal screenmode requester, but we think this is
  4828.           unlikely to cause any real problems.
  4829.  
  4830.        2. To be safe in selecting a mode, you should always click on it
  4831.           in the requester. When you pass a default screenmode, the
  4832.           mode highlighted in the requester may not be exactly the same
  4833.           as the default screenmode given - it may be an equivalent.
  4834.           Clicking on the screenmode ensures that it returns that
  4835.           mode's real ID.
  4836.  
  4837. REQUEST_STRING
  4838. --------------
  4839.  
  4840. Command
  4841.      REQUEST_STRING
  4842.  
  4843. Parameters template
  4844.      TEXT1, TEXT2, TEXT3, STRING, TITLE
  4845.  
  4846. Return template
  4847.      STRING
  4848.  
  4849. Description
  4850.      Opens a string requester, allowing the user to type in one line of
  4851.      text.
  4852.  
  4853.      If a filename or directory name is required, it is suggested that
  4854.      either a special file or directory requester is used instead.
  4855.  
  4856.      The other ImageStudio windows are automatically blocked when the
  4857.      requester is opened and unblocked when the requester is closed.
  4858.  
  4859.      In common with all ImageStudio requesters, if the user presses
  4860.      `Cancel', an error message is returned. For the script to trap
  4861.      this error, global error checking must be turned off. See Error
  4862.      checking, for more information.
  4863.  
  4864. Parameters
  4865.     TEXT1
  4866.           The top line of description text in the requester. The text
  4867.           will be left justified.
  4868.  
  4869.     TEXT2
  4870.           The middle line of description text in the requester. The
  4871.           text will be left justified.
  4872.  
  4873.     TEXT3
  4874.           The bottom line of description text in the requester. The
  4875.           text will be left justified.
  4876.  
  4877.     STRING
  4878.           The default string to be used in the requester.
  4879.  
  4880.     TITLE
  4881.           The text for the title bar of the requester.
  4882.  
  4883. Returns
  4884.     STRING
  4885.           The string in the requester.
  4886.  
  4887. Errors
  4888.      rc = 0 if the operation was successful.
  4889.  
  4890.      rc = 10 if the operation failed for any reason or the user
  4891.      cancelled requester, rc2 will contain a string describing the
  4892.      problem.
  4893.  
  4894. Example
  4895.      The following puts up a string requester, allowing the user to
  4896.      type in some text. The returned string is put in RESULT:
  4897.  
  4898.           REQUEST_STRING TEXT2 '"Enter some text"'
  4899.  
  4900.      The following puts up a string requester with a default string of
  4901.      "A raytraced image". The description text is displayed over 3
  4902.      lines:
  4903.  
  4904.           REQUEST_STRING TEXT1 '"Enter the"' TEXT2 '"desired name"',
  4905.              TEXT3 '"for the image"' STRING '"A raytraced image"'
  4906.  
  4907. Known bugs
  4908.      None.
  4909.  
  4910. RGB_TO_HSV
  4911. ----------
  4912.  
  4913. Command
  4914.      RGB_TO_HSV
  4915.  
  4916. Parameters template
  4917.      R/N/A, G/N/A, B/N/A
  4918.  
  4919. Return template
  4920.      H/N, S/N, V/N
  4921.  
  4922. Description
  4923.      Converts a RGB colour value into a HSV colour value.
  4924.  
  4925.      See Colour representations, for more details on RGB and HSV colour
  4926.      representations.
  4927.  
  4928. Parameters
  4929.     R/N/A
  4930.           The red value of the colour to convert. Valid values are 0 to
  4931.           255.
  4932.  
  4933.     G/N/A
  4934.           The green value of the colour to convert. Valid values are 0
  4935.           to 255.
  4936.  
  4937.     B/N/A
  4938.           The red of the colour to convert. Valid values are 0 to 255.
  4939.  
  4940. Returns
  4941.     H/N
  4942.           The hue componant value of the colour.
  4943.  
  4944.     S/N
  4945.           The saturation componant value of the colour.
  4946.  
  4947.     V/N
  4948.           The value componant of the colour.
  4949.  
  4950. Errors
  4951.      rc = 0 if the operation was successful.
  4952.  
  4953.      rc = 10 if the operation failed for any reason, rc2 will contain a
  4954.      string describing the problem.
  4955.  
  4956. Example
  4957.      The following converts yellow from RGB to HSV representation,
  4958.      putting the result in RESULT:
  4959.  
  4960.           RGB_TO_HSV 255 255 0
  4961.  
  4962.      The following converts mid-grey from RGB to HSV representation,
  4963.      putting the result in the stem COLOUR.:
  4964.  
  4965.           RGB_TO_HSV 127 127 127 STEM COLOUR.
  4966.  
  4967. Known bugs
  4968.      None.
  4969.  
  4970. SAVE
  4971. ----
  4972.  
  4973. Command
  4974.      SAVE
  4975.  
  4976. Parameters template
  4977.      FILE/A, FORMAT, ARGS, FORCE/S
  4978.  
  4979. Return template
  4980.      None.
  4981.  
  4982. Description
  4983.      Saves the current image out to disk.
  4984.  
  4985.      See Save, for more details on saving images.
  4986.  
  4987. Parameters
  4988.     FILE/A
  4989.           The filename of the file to save.
  4990.  
  4991.     FORMAT
  4992.           The string containing the format of the file to save. By
  4993.           default, images are saved out as IFF-ILBM. See File formats,
  4994.           for more information on the available file formats.
  4995.  
  4996.     ARGS
  4997.           Any extra arguments that should be passed to the saver.
  4998.  
  4999.     FORCE/S
  5000.           By default the user will be warned if they are about to
  5001.           overwrite a file on the disk. Specifying this switch will
  5002.           stop such warnings.
  5003.  
  5004. Returns
  5005.      Nothing.
  5006.  
  5007. Errors
  5008.      rc = 0 if the operation was successful.
  5009.  
  5010.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5011.      string describing the problem.
  5012.  
  5013. Example
  5014.      The following saves the current image out as an IFF-ILBM:
  5015.  
  5016.           SAVE FILE "ram:Image.ilbm"
  5017.  
  5018.      The following saves the current image out as an IFF-ILBM, HAM6:
  5019.  
  5020.           SAVE FILE "ram:Image.ham6" ARGS '"SUBFORMAT HAM6"'
  5021.  
  5022.      The following saves out the current image as a JPEG, with a
  5023.      quality setting of 90:
  5024.  
  5025.           SAVE FILE "ram:Image.jpg" FORMAT "JPEG" ARGS '"QUALITY 90"'
  5026.  
  5027. Known bugs
  5028.      None.
  5029.  
  5030. SCALE
  5031. -----
  5032.  
  5033. Command
  5034.      SCALE
  5035.  
  5036. Parameters template
  5037.      X/N, Y/N, PERCENT/S, METHOD
  5038.  
  5039. Return template
  5040.      None.
  5041.  
  5042. Description
  5043.      Scales the current image either up or down using different methods
  5044.      optimised for speed or quality.
  5045.  
  5046.      The user need not specify both X and Y scales, so scaling an image
  5047.      to only alter its width or height is possible.
  5048.  
  5049.      See Scale, for more details on scaling images.
  5050.  
  5051. Parameters
  5052.     X/N
  5053.           Amount to scale the image in X (width) direction. By default
  5054.           this value is an absolute value in pixels, but by specifying
  5055.           the PERCENT option this value can be read as a percentage of
  5056.           the image's current width.
  5057.  
  5058.     Y/N
  5059.           Amount to scale the image in Y (height) direction. By default
  5060.           this value is an absolute value in pixels, but by specifying
  5061.           the PERCENT option this value can be read as a percentage of
  5062.           the image's current height.
  5063.  
  5064.     PERCENT
  5065.           Reads the X and Y values as percentages of the image's
  5066.           current width and height.
  5067.  
  5068.     METHOD
  5069.           A string describing the method of scaling to use. By default,
  5070.           FAST is used but AVERAGE can provide higher quality scales on
  5071.           24bit images at the cost of computing time.
  5072.  
  5073. Returns
  5074.      Nothing.
  5075.  
  5076. Errors
  5077.      rc = 0 if the operation was successful.
  5078.  
  5079.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5080.      string describing the problem.
  5081.  
  5082. Example
  5083.      The following scales the image to 800 by 600 pixels:
  5084.  
  5085.           SCALE 800 600
  5086.  
  5087.      The following doubles the size of the image:
  5088.  
  5089.           SCALE 200 200 PERCENT
  5090.  
  5091.      The following halves the height of the image, using colour average
  5092.      scaling:
  5093.  
  5094.           SCALE Y 50 PERCENT METHOD "AVERAGE"
  5095.  
  5096. Known bugs
  5097.      None.
  5098.  
  5099. SCREEN_BACK
  5100. -----------
  5101.  
  5102. Command
  5103.      SCREEN_BACK
  5104.  
  5105. Parameters template
  5106.      None.
  5107.  
  5108. Return template
  5109.      None.
  5110.  
  5111. Description
  5112.      Moves the ImageStudio screen behind all other open screens.
  5113.  
  5114. Parameters
  5115.      None.
  5116.  
  5117. Returns
  5118.      Nothing.
  5119.  
  5120. Errors
  5121.      rc = 0 if the operation was successful.
  5122.  
  5123.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5124.      string describing the problem.
  5125.  
  5126. Example
  5127.      The following moves ImageStudio's screen behind all other open
  5128.      screens:
  5129.  
  5130.           SCREEN_BACK
  5131.  
  5132. Known bugs
  5133.      None.
  5134.  
  5135. SCREEN_FRONT
  5136. ------------
  5137.  
  5138. Command
  5139.      SCREEN_FRONT
  5140.  
  5141. Parameters template
  5142.      None.
  5143.  
  5144. Return template
  5145.      None.
  5146.  
  5147. Description
  5148.      Moves the ImageStudio screen in front of all other open screens.
  5149.  
  5150. Parameters
  5151.      None.
  5152.  
  5153. Returns
  5154.      Nothing.
  5155.  
  5156. Errors
  5157.      rc = 0 if the operation was successful.
  5158.  
  5159.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5160.      string describing the problem.
  5161.  
  5162. Example
  5163.      The following moves ImageStudio's screen in front of all other
  5164.      open screens:
  5165.  
  5166.           SCREEN_FRONT
  5167.  
  5168. Known bugs
  5169.      None.
  5170.  
  5171. SELECT_ALL
  5172. ----------
  5173.  
  5174. Command
  5175.      SELECT_ALL
  5176.  
  5177. Parameters template
  5178.      None.
  5179.  
  5180. Return template
  5181.      None.
  5182.  
  5183. Description
  5184.      Sets the current region to the whole of the image being displayed
  5185.      in the preview window.
  5186.  
  5187.      Note that this doesn't always select the whole image; if the user
  5188.      has zoomed in on a region, only this region will be selected. If
  5189.      you want to be sure of selecting the whole image, issue a
  5190.      FULL_IMAGE command first.
  5191.  
  5192. Parameters
  5193.      None.
  5194.  
  5195. Returns
  5196.      Nothing.
  5197.  
  5198. Errors
  5199.      rc = 0 if the operation was successful.
  5200.  
  5201.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5202.      string describing the problem.
  5203.  
  5204. Example
  5205.      The following selects the whole of the currently viewed image:
  5206.  
  5207.           SELECT_ALL
  5208.  
  5209. Known bugs
  5210.      None.
  5211.  
  5212. UNDO
  5213. ----
  5214.  
  5215. Command
  5216.      UNDO
  5217.  
  5218. Parameters template
  5219.      None.
  5220.  
  5221. Return template
  5222.      None.
  5223.  
  5224. Description
  5225.      Un-does the last operation (see ARexx_REDO).
  5226.  
  5227. Parameters
  5228.      None.
  5229.  
  5230. Returns
  5231.      Nothing.
  5232.  
  5233. Errors
  5234.      rc = 0 if the operation was successful.
  5235.  
  5236.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5237.      string describing the problem.
  5238.  
  5239. Example
  5240.      The following un-does the last operation:
  5241.  
  5242.           UNDO
  5243.  
  5244. Known bugs
  5245.      None.
  5246.  
  5247. VIEW
  5248. ----
  5249.  
  5250. Command
  5251.      VIEW
  5252.  
  5253. Parameters template
  5254.      EXTERNAL/S
  5255.  
  5256. Return template
  5257.      None.
  5258.  
  5259. Description
  5260.      Views the current image using either the internal or external
  5261.      viewer.
  5262.  
  5263. Parameters
  5264.     EXTERNAL/S
  5265.           By default the image is shown using the internal viewer,
  5266.           however by including this parameter the external viewer as
  5267.           defined in the preferences (see Prefs) will be used.
  5268.  
  5269. Returns
  5270.      Nothing.
  5271.  
  5272. Errors
  5273.      rc = 0 if the operation was successful.
  5274.  
  5275.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5276.      string describing the problem.
  5277.  
  5278. Example
  5279.      The following views the current image using the internal viewer:
  5280.  
  5281.           VIEW
  5282.  
  5283.      The following views the current image using the external viewer:
  5284.  
  5285.           VIEW EXTERNAL
  5286.  
  5287. Known bugs
  5288.      None.
  5289.  
  5290. ZOOM_IN
  5291. -------
  5292.  
  5293. Command
  5294.      ZOOM_IN
  5295.  
  5296. Parameters template
  5297.      None.
  5298.  
  5299. Return template
  5300.      None.
  5301.  
  5302. Description
  5303.      Zooms in to the currently selected region in the preview window.
  5304.  
  5305.      A region has to be selected in order for this command to work.
  5306.  
  5307. Parameters
  5308.      None.
  5309.  
  5310. Returns
  5311.      Nothing.
  5312.  
  5313. Errors
  5314.      rc = 0 if the operation was successful.
  5315.  
  5316.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5317.      string describing the problem.
  5318.  
  5319. Example
  5320.      The following zooms in to the currently selected region:
  5321.  
  5322.           ZOOM_IN
  5323.  
  5324. Known bugs
  5325.      None.
  5326.  
  5327. ZOOM_OUT
  5328. --------
  5329.  
  5330. Command
  5331.      ZOOM_OUT
  5332.  
  5333. Parameters template
  5334.      None.
  5335.  
  5336. Return template
  5337.      None.
  5338.  
  5339. Description
  5340.      Zooms out by a factor of 3 times in the preview window.
  5341.  
  5342. Parameters
  5343.      None.
  5344.  
  5345. Returns
  5346.      Nothing.
  5347.  
  5348. Errors
  5349.      rc = 0 if the operation was successful.
  5350.  
  5351.      rc = 10 if the operation failed for any reason, rc2 will contain a
  5352.      string describing the problem.
  5353.  
  5354. Example
  5355.      The following zooms out by a factor of 3 times in the preview
  5356.      window:
  5357.  
  5358.           ZOOM_OUT
  5359.  
  5360. Known bugs
  5361.      None.
  5362.  
  5363. Reference
  5364. *********
  5365.  
  5366.    This chapter gives detailed explanations about various aspects of
  5367. the program.
  5368.  
  5369. File formats
  5370. ============
  5371.  
  5372.    Select the file format you wish to investigate.
  5373.  
  5374. IFF-ILBM
  5375. --------
  5376.  
  5377. Name
  5378.      IFF-ILBM
  5379.  
  5380. Load types
  5381.      Colour mapped, 24 bit, HAM6, HAM8, Extra halfbright.
  5382.  
  5383.      Compressed and uncompressed.
  5384.  
  5385. Save types
  5386.      Colour mapped, 24 bit, HAM6, HAM8, Extra halfbright.
  5387.  
  5388.      Compressed and uncompressed.
  5389.  
  5390. Description
  5391.      IFF-ILBM is the Amiga's native bitmap graphic file format.
  5392.  
  5393.      IFF-ILBM files are usually compressed using simple run-length
  5394.      compression, but they can be uncompressed for simplicity and speed.
  5395.  
  5396.      IFF-ILBM is ImageStudio's default save format.
  5397.  
  5398.      ImageStudio will load and save AGA images on a non-AGA machine.
  5399.  
  5400.      The original image's screenmode will be preserved, unless changed
  5401.      by the user (see View_screenmode).
  5402.  
  5403. ARexx OPEN command ARGS
  5404.      None.
  5405.  
  5406. ARexx SAVE command ARGS
  5407.      SUBFORMAT, DITHER, NOCOMPRESSION/S
  5408.  
  5409.     SUBFORMAT
  5410.           By default the image is saved out as the buffer, i.e. either
  5411.           a 2 to 256 colour colour-mapped image or as 24bit. By
  5412.           specifying the SUBFORMAT parameter, the user can select HAM6,
  5413.           HAM8 or EHB as extra save formats. The image will be
  5414.           converted into the chosen subformat before saving. The image
  5415.           in ImageStudio remains unchanged.
  5416.  
  5417.     DITHER
  5418.           If the SUBFORMAT option is used, DITHER can be set to FS to
  5419.           give Floyd-Steinberg dithering of the HAM6, HAM8 or EHB image.
  5420.  
  5421.     NOCOMPRESSION/S
  5422.           By default the IFF-ILBM image is compressed using simple
  5423.           run-length compression. Use this switch to save uncompressed
  5424.           data.
  5425.  
  5426. Example
  5427.      The following saves out the current image in the same format as
  5428.      the buffer:
  5429.  
  5430.           SAVE FILE "Image.ilbm"
  5431.  
  5432.      The following saves out the image as HAM6:
  5433.  
  5434.           SAVE FILE "Image.ilbm" ARGS '"SUBFORMAT HAM6"'
  5435.  
  5436.      The following saves out the image as Floyd-Steinberg dithered
  5437.      Extra halfbright:
  5438.  
  5439.           SAVE FILE "Image.ilbm" ARGS '"SUBFORMAT EHB DITHER FS"'
  5440.  
  5441. BMP
  5442. ---
  5443.  
  5444. Name
  5445.      BMP
  5446.  
  5447. Load types
  5448.      Colour mapped, 24 bit.
  5449.  
  5450. Save types
  5451.      Colour mapped, 24 bit ("Windows" format).
  5452.  
  5453. Description
  5454.      BMP files are commonly found on PCs running Microsoft Windows.
  5455.  
  5456.      BMP images are usually uncompressed and come in 2 flavours -
  5457.      `Windows' and `OS/2'.
  5458.  
  5459. ARexx OPEN command ARGS
  5460.      None.
  5461.  
  5462. ARexx SAVE command ARGS
  5463.      None.
  5464.  
  5465. Example
  5466.      None.
  5467.  
  5468. EPS
  5469. ---
  5470.  
  5471. Name
  5472.      EPS
  5473.  
  5474. Load types
  5475.      None.
  5476.  
  5477. Save types
  5478.      Greyscale, 24 bit.
  5479.  
  5480. Description
  5481.      EPS files are ASCII text files written in the PostScript language.
  5482.      They can be printed out directly to a PostScript printer or
  5483.      imported into word processing or DTP packages.
  5484.  
  5485.      EPS files are an ineffecient method of storing files, as they are
  5486.      uncompressed and are stored as ASCII text as opposed to binary
  5487.      data.  Unless colour is specifically required it is recommended
  5488.      that EPS files be saved in the greyscale format, as they are one
  5489.      third of the size of a colour EPS file.
  5490.  
  5491. ARexx OPEN command ARGS
  5492.      None.
  5493.  
  5494. ARexx SAVE command ARGS
  5495.      DPI/N, COLOUR
  5496.  
  5497.     DPI/N
  5498.           The resolution of the image in dots per inch. By default, 300
  5499.           dpi is used.
  5500.  
  5501.     COLOUR
  5502.           By default the output image is 256 greyscale. Specifying this
  5503.           option outputs the image as 24bit colour.
  5504.  
  5505. Example
  5506.      The following saves out a COLOUR EPS file:
  5507.  
  5508.           SAVE FILE "Image.eps" FORMAT "EPS" ARGS "COLOUR"
  5509.  
  5510.      The following saves out a 600 by 300 file at 150 dpi, given a
  5511.      printable size of 4inches by 2inch:
  5512.  
  5513.           SAVE FILE "Image.eps" FORMAT "EPS" ARGS '"DPI 150"'
  5514.  
  5515. GIF
  5516. ---
  5517.  
  5518. Name
  5519.      GIF
  5520.  
  5521. Load types
  5522.      Colour mapped ("GIF87a" and "GIF89a" formats).
  5523.  
  5524. Save types
  5525.      None.
  5526.  
  5527. Description
  5528.      GIF is a common format for images upto 256 colours.
  5529.  
  5530.      GIF is a trademark of Compuserve Incorporated.
  5531.  
  5532.      GIF images are normally smaller than their equivalent IFF-ILBM
  5533.      counterparts due to GIF's LZW compression algorithm. GIF files are
  5534.      always compressed.
  5535.  
  5536.      GIF comes in 2 flavours - `GIF87a' and `GIF89a'. GIF87a is the
  5537.      most popular format; ImageStudio should load in both GIF87a and
  5538.      GIF89a although the latter is untested as we couldn't find any
  5539.      genuine GIF89a files.
  5540.  
  5541.      Due to recent patent licensing arrangements, GIF save has been
  5542.      removed from ImageStudio. It may be added to later versions of the
  5543.      program when the legal situation becomes fully clear, but for the
  5544.      moment GIF saving is not possible within ImageStudio.
  5545.  
  5546.      It should be pointed out that due to the restrictions imposed on
  5547.      the use of GIF files by CompuServe and the licensing fee imposed
  5548.      by Unisys, the GIF file format is likely to be soon superceeded by
  5549.      a patent free format. We will endevour to implement this new file
  5550.      format as soon as it becomes available.
  5551.  
  5552. ARexx OPEN command ARGS
  5553.      None.
  5554.  
  5555. ARexx SAVE command ARGS
  5556.      None.
  5557.  
  5558. Example
  5559.      None.
  5560.  
  5561. JPEG
  5562. ----
  5563.  
  5564. Name
  5565.      JPEG
  5566.  
  5567. Load types
  5568.      Greyscale, 24 bit ("JFIF" format).
  5569.  
  5570. Save types
  5571.      Greyscale, 24 bit ("JFIF" format).
  5572.  
  5573. Description
  5574.      JPEG allows the storage of 24-bit images as very small files due
  5575.      to its lossy compression algorithm. Whereas the compression
  5576.      algorithms used by other file formats loose none of the image
  5577.      information, JPEG trades off a little loss in image quality for a
  5578.      high degree of compression.
  5579.  
  5580.      As JPEG is a relatively new format, an exact format of the JPEG
  5581.      file was only agreed on recently. This format is called `JFIF' and
  5582.      these are the most commonly used JPEG format files - and the
  5583.      format that ImageStudio loads and saves. It is highly unlikely
  5584.      that any old JPEG files are still being circulated, but should you
  5585.      find one it is uncertain whether ImageStudio would accept it.
  5586.  
  5587.      A high degree of compatibility is obtained with our JPEG loader /
  5588.      saver routines, as they are based in part on the work of the
  5589.      Independant JPEG group's routines.
  5590.  
  5591. ARexx OPEN command ARGS
  5592.      None.
  5593.  
  5594. ARexx SAVE command ARGS
  5595.      QUALITY/N, GREYSCALE/S
  5596.  
  5597.     QUALITY/N
  5598.           The quality of the jpeg output file. A quality value of 75 is
  5599.           given by default, resulting in an acceptable degredation of
  5600.           image quality. For higher degree of compression choose a
  5601.           lower value(1). For a higher degree of quality, choose a
  5602.           higher value; values of 85 to 90 result in an almost
  5603.           unnoticable loss of quality.
  5604.  
  5605.     GREYSCALE/S
  5606.           By default the JPEG output is 24bit colour. By using this
  5607.           option, the image can also be saved in a greyscale format,
  5608.           where the colour information is lost but the output file size
  5609.           is correspondingly smaller.
  5610.  
  5611. Example
  5612.      The following saves out the current image as JPEG:
  5613.  
  5614.           SAVE FILE "Image.jpg" FORMAT "JPEG"
  5615.  
  5616.      The following saves out the current image as JPEG, with a high
  5617.      degree of compression:
  5618.  
  5619.           SAVE FILE "Image.jpg" FORMAT "JPEG" ARGS '"QUALITY 50"'
  5620.  
  5621.      The following saves out the current image as greyscale JPEG:
  5622.  
  5623.           SAVE FILE "Image.jpg" FORMAT "JPEG" ARGS '"GREYSCALE"'
  5624.  
  5625.    ---------- Footnotes ----------
  5626.  
  5627.    (1)  Values less than 25 may cause problems with some JPEG readers
  5628.  
  5629. PCX
  5630. ---
  5631.  
  5632. Name
  5633.      PCX
  5634.  
  5635. Load types
  5636.      Colour mapped (2 to 16, 256 colours), 24 bit.
  5637.  
  5638. Save types
  5639.      Colour mapped (256 colours), 24 bit.
  5640.  
  5641. Description
  5642.      PCX files are commonly found on PCs running Microsoft Windows.
  5643.  
  5644.      PCX files are always compressed using a very inefficient
  5645.      run-length encoding algorithm. This algorithm can, in some cases,
  5646.      lead to an increase in file size over an uncompressed image. PCX
  5647.      is included in ImageStudio for compatibility with other platforms,
  5648.      but we do not recommend the general storing of images in this
  5649.      format.
  5650.  
  5651.      ImageStudio only saves 256 colour PCX files as these are the most
  5652.      compatible accross programs. The specification is a little vague
  5653.      as to how to handle 2 to 16 colour PCX files.
  5654.  
  5655. ARexx OPEN command ARGS
  5656.      None.
  5657.  
  5658. ARexx SAVE command ARGS
  5659.      None.
  5660.  
  5661. Example
  5662.      None.
  5663.  
  5664. Targa
  5665. -----
  5666.  
  5667. Name
  5668.      TARGA
  5669.  
  5670. Load types
  5671.      Colour mapped (2 and 256 colours), 15, 16, 24 and 32bits.
  5672.  
  5673.      Compressed and uncompressed.
  5674.  
  5675. Save types
  5676.      Colour mapped (256 colours), 24 bit.
  5677.  
  5678.      Uncompressed.
  5679.  
  5680. Description
  5681.      Targa is usually used for storing 24-bit images, although it can
  5682.      also handle colour-mapped images as well. The data is usually
  5683.      stored as simple uncompressed data, however it can also be
  5684.      run-length encoded to allow compression.
  5685.  
  5686. ARexx OPEN command ARGS
  5687.      None.
  5688.  
  5689. ARexx SAVE command ARGS
  5690.      None.
  5691.  
  5692. Example
  5693.      None.
  5694.  
  5695. Effects
  5696. =======
  5697.  
  5698.    Select the effect you wish to investigate.
  5699.  
  5700. Dynamic range
  5701. -------------
  5702.  
  5703. Works with
  5704.         - Full colour-mapped images.
  5705.  
  5706.         - Full and regions of 24bit images.
  5707.  
  5708. Description
  5709.      Expands the dynamic range of the image to the maximum possible,
  5710.      without altering the colour balance. This is useful for
  5711.      automatically increasing the contrast of poor contrast images,
  5712.      e.g. the output from a scanner.
  5713.  
  5714. ARexx EFFECT command ARGS
  5715.      None.
  5716.  
  5717. Flip X
  5718. ------
  5719.  
  5720. Works with
  5721.         - Full and regions of colour-mapped images.
  5722.  
  5723.         - Full and regions of 24bit images.
  5724.  
  5725. Description
  5726.      Flips the whole image or selected region horizontally.
  5727.  
  5728. ARexx EFFECT command ARGS
  5729.      None.
  5730.  
  5731. Flip Y
  5732. ------
  5733.  
  5734. Works with
  5735.         - Full and regions of colour-mapped images.
  5736.  
  5737.         - Full and regions of 24bit images.
  5738.  
  5739. Description
  5740.      Flips the whole image or selected region vertically.
  5741.  
  5742. ARexx EFFECT command ARGS
  5743.      None.
  5744.  
  5745. Greyscale
  5746. ---------
  5747.  
  5748. Works with
  5749.         - Full colour-mapped images.
  5750.  
  5751.         - Full and regions of 24bit images.
  5752.  
  5753. Description
  5754.      Reduces a colour image to a greyscale image. The actual greyscale
  5755.      values (or more correctly, luminosity) value is calculated as 30%
  5756.      of the red component + 59% of the green component + 11% of the
  5757.      blue component.
  5758.  
  5759. ARexx EFFECT command ARGS
  5760.      None.
  5761.  
  5762. Highlight
  5763. ---------
  5764.  
  5765. Works with
  5766.         - Full colour-mapped images.
  5767.  
  5768.         - Full and regions of 24bit images.
  5769.  
  5770. Description
  5771.      Turns all colours with greater than the given luminance value to
  5772.      white.
  5773.  
  5774. ARexx EFFECT command ARGS
  5775.      LUMINANCE/N/A
  5776.  
  5777.     LUMINANCE/N/A
  5778.           The luminance value above which pixels should be turned white.
  5779.  
  5780. Negative
  5781. --------
  5782.  
  5783. Works with
  5784.         - Full colour-mapped images.
  5785.  
  5786.         - Full and regions of 24bit images.
  5787.  
  5788. Description
  5789.      Negates the colour values of the image.
  5790.  
  5791. ARexx EFFECT command ARGS
  5792.      None.
  5793.  
  5794. Random
  5795. ------
  5796.  
  5797. Works with
  5798.         - Full and regions of 24bit images.
  5799.  
  5800. Description
  5801.      Adds random noise to the image. The greater the random value, the
  5802.      greater the noise.
  5803.  
  5804. ARexx EFFECT command ARGS
  5805.      RANDOMNESS/N/A
  5806.  
  5807.     RANDOMNESS/N/A
  5808.           The amount of randomness to apply to the image. Values range
  5809.           between 1 and 255.
  5810.  
  5811. Remove isolated pixels
  5812. ----------------------
  5813.  
  5814. Works with
  5815.         - Full and regions of colour-mapped images.
  5816.  
  5817.         - Full and regions of 24bit images.
  5818.  
  5819. Description
  5820.      Removes any single pixels that are a different colour to their
  5821.      neighbours. Useful in removing some of the noise in black and
  5822.      white scans.
  5823.  
  5824. ARexx EFFECT command ARGS
  5825.      None.
  5826.  
  5827. Roll X
  5828. ------
  5829.  
  5830. Works with
  5831.         - Full and regions of colour-mapped images.
  5832.  
  5833.         - Full and regions of 24bit images.
  5834.  
  5835. Description
  5836.      Rolls the whole image or selected region horizontally, wrapping
  5837.      the image around.
  5838.  
  5839. ARexx EFFECT command ARGS
  5840.      DISTANCE/N/A
  5841.  
  5842.     DISTANCE/N/A
  5843.           The distance, in pixels, to move the image. A positive value
  5844.           moves the image to the right, a negative value moves the
  5845.           image to the left.
  5846.  
  5847. Roll Y
  5848. ------
  5849.  
  5850. Works with
  5851.         - Full and regions of colour-mapped images.
  5852.  
  5853.         - Full and regions of 24bit images.
  5854.  
  5855. Description
  5856.      Rolls the whole image or selected region vertically, wrapping the
  5857.      image around.
  5858.  
  5859. ARexx EFFECT command ARGS
  5860.      DISTANCE/N/A
  5861.  
  5862.     DISTANCE/N/A
  5863.           The distance, in pixels, to move the image. A positive value
  5864.           moves the image down, a negative value moves the image up.
  5865.  
  5866. Pixelise
  5867. --------
  5868.  
  5869. Works with
  5870.         - Full and regions of colour-mapped images.
  5871.  
  5872.         - Full and regions of 24bit images.
  5873.  
  5874. Description
  5875.      Replaces all pixels in the whole image or selected region with
  5876.      larger pixels.
  5877.  
  5878. ARexx EFFECT command ARGS
  5879.      PIXELSIZE/N/A
  5880.  
  5881.     PIXELSIZE/N/A
  5882.           The size, in pixels, of the larger pixel blocks.
  5883.  
  5884. Shadow
  5885. ------
  5886.  
  5887. Works with
  5888.         - Full colour-mapped images.
  5889.  
  5890.         - Full and regions of 24bit images.
  5891.  
  5892. Description
  5893.      Turns all colours with less than the given luminance value to
  5894.      black.
  5895.  
  5896. ARexx EFFECT command ARGS
  5897.      LUMINANCE/N/A
  5898.  
  5899.     LUMINANCE/N/A
  5900.           The luminance value below which pixels should be turned black.
  5901.  
  5902. Image types
  5903. ===========
  5904.  
  5905.    ImageStudio works internally with either "colour-mapped" or "24-bit"
  5906. images. A description of the workings of both methods follows.
  5907.  
  5908. Colour-mapped images
  5909.      Colour-mapped (palette based) images are used by the standard
  5910.      (non-HAM) screenmodes on the Amiga. A set of colours (palette) is
  5911.      chosen for the image and every pixel in the image can have one of
  5912.      these colours.
  5913.  
  5914.      Colour-mapped images have the advantage of being a fairly compact
  5915.      way of storing image information and with a large palette (greater
  5916.      than 64 colours) high quality images can be produced. They have
  5917.      the disadvantage that the colours in the image are limited to the
  5918.      colours in the palette - with a small palette it becomes a complex
  5919.      task choosing the correct colours to best portray the image.
  5920.  
  5921. 24-bit images
  5922.      24-bit images allow every pixel in the image to be an individual
  5923.      colour - this is essential for high quality images.
  5924.  
  5925.      24-bit images have the disadvantage that they are typically at
  5926.      least 3-times larger than colour-mapped images and require
  5927.      sophisticated display hardware to show them in their true glory.
  5928.  
  5929. When should I use each type of image?
  5930.      In general, try to leave the image in the format in which it came.
  5931.      If, for example, you load in a colour-mapped image try and perform
  5932.      all your operations directly to the colour-mapped image; only
  5933.      change to a 24-bit image if absolutely necessary (e.g. to apply a
  5934.      convolution filter).
  5935.  
  5936. Colour representations
  5937. ======================
  5938.  
  5939.        ImageStudio works internally with the R,G,B format of colour
  5940. representation. This is the most common method of storing colour
  5941. information on computers, as it represents the amounts of intensities
  5942. applied to the 3 colour guns of a computer monitor.
  5943.  
  5944.        H,S,V stands for Hue, Saturation and Value. The hue is the basic
  5945. colour (e.g. red, yellow, green, purple etc...), saturation is the
  5946. amount of that colour (e.g. weak red, strong red etc...) and the value
  5947. is the brightness of the colour.
  5948.  
  5949. Tooltypes
  5950. =========
  5951.  
  5952.    ImageStudio supports the configuring of the program via tooltypes
  5953. from either the Workbench or CLI.
  5954.  
  5955.    It is recommended that the user who starts the program from
  5956. Workbench uses the "Prefs" requester of ImageStudio to configure it
  5957. (see Prefs), whereas the CLI user should be aware of the tooltype
  5958. options.
  5959.  
  5960.    Boolean tooltypes can have values `ON' or `YES' for a positive
  5961. value, `OFF' or `NO' for a negative values. Numeric tooltypes are
  5962. positive and negative integers; floating point values are not allowed.
  5963.  
  5964. BALANCE
  5965. -------
  5966.  
  5967. Name
  5968.      BALANCE
  5969.  
  5970. Type
  5971.      Boolean
  5972.  
  5973. Description
  5974.      Determines whether the balance floating palette should be open at
  5975.      startup.
  5976.  
  5977. BALANCELEFT
  5978. -----------
  5979.  
  5980. Name
  5981.      BALANCELEFT
  5982.  
  5983. Type
  5984.      Numeric
  5985.  
  5986. Description
  5987.      The top position to open the balance floating palette.
  5988.  
  5989. BALANCETOP
  5990. ----------
  5991.  
  5992. Name
  5993.      BALANCETOP
  5994.  
  5995. Type
  5996.      Numeric
  5997.  
  5998. Description
  5999.      The left position to open the balance floating palette.
  6000.  
  6001. CONVOLVE
  6002. --------
  6003.  
  6004. Name
  6005.      CONVOLVE
  6006.  
  6007. Type
  6008.      Boolean
  6009.  
  6010. Description
  6011.      Determines whether the convolve floating palette should be open at
  6012.      startup.
  6013.  
  6014. CONVOLVELEFT
  6015. ------------
  6016.  
  6017. Name
  6018.      CONVOLVELEFT
  6019.  
  6020. Type
  6021.      Numeric
  6022.  
  6023. Description
  6024.      The top position to open the convolve floating palette.
  6025.  
  6026. CONVOLVETOP
  6027. -----------
  6028.  
  6029. Name
  6030.      CONVOLVETOP
  6031.  
  6032. Type
  6033.      Numeric
  6034.  
  6035. Description
  6036.      The left position to open the convolve floating palette.
  6037.  
  6038. EFFECT
  6039. ------
  6040.  
  6041. Name
  6042.      EFFECT
  6043.  
  6044. Type
  6045.      Boolean
  6046.  
  6047. Description
  6048.      Determines whether the effect floating palette should be open at
  6049.      startup.
  6050.  
  6051. EFFECTLEFT
  6052. ----------
  6053.  
  6054. Name
  6055.      EFFECTLEFT
  6056.  
  6057. Type
  6058.      Numeric
  6059.  
  6060. Description
  6061.      The top position to open the effect floating palette.
  6062.  
  6063. EFFECTTOP
  6064. ---------
  6065.  
  6066. Name
  6067.      EFFECTTOP
  6068.  
  6069. Type
  6070.      Numeric
  6071.  
  6072. Description
  6073.      The left position to open the effect floating palette.
  6074.  
  6075. SCRIPTS
  6076. -------
  6077.  
  6078. Name
  6079.      SCRIPTS
  6080.  
  6081. Type
  6082.      Boolean
  6083.  
  6084. Description
  6085.      Determines whether the scripts floating palette should be open at
  6086.      startup.
  6087.  
  6088. SCRIPTSLEFT
  6089. -----------
  6090.  
  6091. Name
  6092.      SCRIPTSLEFT
  6093.  
  6094. Type
  6095.      Numeric
  6096.  
  6097. Description
  6098.      The top position to open the scripts floating palette.
  6099.  
  6100. SCRIPTSTOP
  6101. ----------
  6102.  
  6103. Name
  6104.      SCRIPTSTOP
  6105.  
  6106. Type
  6107.      Numeric
  6108.  
  6109. Description
  6110.      The left position to open the scripts floating palette.
  6111.  
  6112. PREVIEWLEFT
  6113. -----------
  6114.  
  6115. Name
  6116.      PREVIEWLEFT
  6117.  
  6118. Type
  6119.      Numeric
  6120.  
  6121. Description
  6122.      The top position to open the preview window.
  6123.  
  6124. PREVIEWTOP
  6125. ----------
  6126.  
  6127. Name
  6128.      PREVIEWTOP
  6129.  
  6130. Type
  6131.      Numeric
  6132.  
  6133. Description
  6134.      The left position to open the preview window.
  6135.  
  6136. PREVIEWWIDTH
  6137. ------------
  6138.  
  6139. Name
  6140.      PREVIEWWIDTH
  6141.  
  6142. Type
  6143.      Numeric
  6144.  
  6145. Description
  6146.      The width to open the preview window.
  6147.  
  6148. PREVIEWHEIGHT
  6149. -------------
  6150.  
  6151. Name
  6152.      PREVIEWHEIGHT
  6153.  
  6154. Type
  6155.      Numeric
  6156.  
  6157. Description
  6158.      The height to open the preview window.
  6159.  
  6160. SCREENMODEID
  6161. ------------
  6162.  
  6163. Name
  6164.      SCREENMODEID
  6165.  
  6166. Type
  6167.      Numeric
  6168.  
  6169. Description
  6170.      The screenmode to open the ImageStudio screen. This value is the
  6171.      value returned by the REQUEST_SCREENMODE ARexx command in the
  6172.      MODEID value (see ARexx_REQUEST_SCREENMODE).
  6173.  
  6174. SCREENOVERSCAN
  6175. --------------
  6176.  
  6177. Name
  6178.      SCREENOVERSCAN
  6179.  
  6180. Type
  6181.      Numeric
  6182.  
  6183. Description
  6184.      The overscan to use with the ImageStudio screen. Valid values are
  6185.      1 for text overscan, 2 for graphics size, 3 for extreme and 4 for
  6186.      maximum.
  6187.  
  6188.      Note, this tooltype has changed from v1.x.x, where it was a string
  6189.      type.
  6190.  
  6191. SCREENDEPTH
  6192. -----------
  6193.  
  6194. Name
  6195.      SCREENDEPTH
  6196.  
  6197. Type
  6198.      Numeric
  6199.  
  6200. Description
  6201.      The depth of the ImageStudio screen. Valid values are 1 to 8.
  6202.  
  6203. SCREENWIDTH
  6204. -----------
  6205.  
  6206. Name
  6207.      SCREENWIDTH
  6208.  
  6209. Type
  6210.      Numeric
  6211.  
  6212. Description
  6213.      The width of the ImageStudio screen. Valid values are greater than
  6214.      640.
  6215.  
  6216. SCREENHEIGHT
  6217. ------------
  6218.  
  6219. Name
  6220.      SCREENHEIGHT
  6221.  
  6222. Type
  6223.      Numeric
  6224.  
  6225. Description
  6226.      The height of the ImageStudio screen. Valid values are greater
  6227.      than 200.
  6228.  
  6229. BLANKSCRIPT
  6230. -----------
  6231.  
  6232. Name
  6233.      BLANKSCRIPT
  6234.  
  6235. Type
  6236.      String
  6237.  
  6238. Description
  6239.      The filename of the Blank ARexx script to use a template when a
  6240.      new script is created in the `Scripts' floating palette.
  6241.  
  6242. CONVOLVEDIR
  6243. -----------
  6244.  
  6245. Name
  6246.      CONVOLVEDIR
  6247.  
  6248. Type
  6249.      String
  6250.  
  6251. Description
  6252.      The directory to scan on startup for convolution filters to
  6253.      include in the `Convolves' floating palette.
  6254.  
  6255. EXTERNALVIEWER
  6256. --------------
  6257.  
  6258. Name
  6259.      EXTERNALVIEWER
  6260.  
  6261. Type
  6262.      String
  6263.  
  6264. Description
  6265.      The external program to run to view the image. The string is in
  6266.      the format that would be typed from the command line, with a `%s'
  6267.      where the image filename should be placed.
  6268.  
  6269.      It is recommended that the string be prefixed with a "run" to
  6270.      allow the external viewer to run in the background, otherwise
  6271.      ImageStudio has to wait for the program to finish. For example:
  6272.  
  6273.           sys:Utilities/VT <NIL: >NIL: %s
  6274.  
  6275.      would leave ImageStudio waiting until ViewTek had finished, whereas
  6276.  
  6277.           run sys:Utilities/VT <NIL: >NIL: %s
  6278.  
  6279.      would run ViewTek in the background. The "<NIL:" and ">NIL:" are
  6280.      used to stop error messages being printed to the console.
  6281.  
  6282. HELPFILE
  6283. --------
  6284.  
  6285. Name
  6286.      HELPFILE
  6287.  
  6288. Type
  6289.      String
  6290.  
  6291. Description
  6292.      The full filename of the AmigaGuide help file to provide online
  6293.      help.
  6294.  
  6295.      Note, the *full* filename must be provided, a filename taken from
  6296.      the current directory will not work. For example:
  6297.  
  6298.           Docs/ImageStudio.guide
  6299.  
  6300.      will not work, whereas
  6301.  
  6302.           Work:Graphics/ImageStudio/Docs/ImageStudio.guide
  6303.  
  6304.      will work fine.
  6305.  
  6306.      If you do wish to specify the current directory, you may use the
  6307.      `PROGDIR:' volume assignment. PROGDIR: is set to be the current
  6308.      directory of the current program, each program having its own
  6309.      PROGDIR: value that can only be used within the program.
  6310.      Therefore, the above AmigaGuide helpfile can be refered to as:
  6311.  
  6312.           PROGDIR:Docs/ImageStudio.guide
  6313.  
  6314.      See Tooltype_HELP, for more information on AmigaGuide help.
  6315.  
  6316. IMAGEDIR
  6317. --------
  6318.  
  6319. Name
  6320.      IMAGEDIR
  6321.  
  6322. Type
  6323.      String
  6324.  
  6325. Description
  6326.      The default directory to use for images when ImageStudio is loaded.
  6327.  
  6328. KEYFILE
  6329. -------
  6330.  
  6331. Name
  6332.      KEYFILE
  6333.  
  6334. Type
  6335.      String
  6336.  
  6337. Description
  6338.      The filename of the keyfile to use to unlock ImageStudio to use
  6339.      full sized images. Keyfiles are obtaining by registering (see How
  6340.      to register).
  6341.  
  6342. PALETTEDIR
  6343. ----------
  6344.  
  6345. Name
  6346.      PALETTEDIR
  6347.  
  6348. Type
  6349.      String
  6350.  
  6351. Description
  6352.      The default directory to use for palettes when ImageStudio is
  6353.      loaded.
  6354.  
  6355.      See Palette, for more details on loading palettes into ImageStudio.
  6356.  
  6357. PORTNAME
  6358. --------
  6359.  
  6360. Name
  6361.      PORTNAME
  6362.  
  6363. Type
  6364.      String
  6365.  
  6366. Description
  6367.      The name of the ARexx portname used by the program.
  6368.  
  6369.      If a portname by that name already exists, the name is incremented
  6370.      until a free portname is found. For example, if `IMAGESTUDIO' was
  6371.      already in use, the following sequence of names would be tried:
  6372.      `IMAGESTUDIO.1', `IMAGESTUDIO.2', `IMAGESTUDIO.3' ...
  6373.  
  6374.      When choosing an ARexx portname, try to keep it fairly short.
  6375.  
  6376. REXXOUTPUT
  6377. ----------
  6378.  
  6379. Name
  6380.      REXXOUTPUT
  6381.  
  6382. Type
  6383.      String
  6384.  
  6385. Description
  6386.      The name of the filename to use for ARexx scripts' output. See
  6387.      Basic ARexx, for more information on this file.
  6388.  
  6389. SCREENNAME
  6390. ----------
  6391.  
  6392. Name
  6393.      SCREENNAME
  6394.  
  6395. Type
  6396.      String
  6397.  
  6398. Description
  6399.      The name of ImageStudio's public screen. This name must be unique,
  6400.      otherwise the screen won't open.
  6401.  
  6402. SCRIPTSDIR
  6403. ----------
  6404.  
  6405. Name
  6406.      SCRIPTSDIR
  6407.  
  6408. Type
  6409.      String
  6410.  
  6411. Description
  6412.      The default directory that will be scanned for ARexx script files
  6413.      to put in the `Scripts' floating palette list. Any file with the
  6414.      chosen ARexx script extension (see Tooltype_SCRIPTSEXT) will be
  6415.      placed in the list.
  6416.  
  6417. SCRIPTSEXT
  6418. ----------
  6419.  
  6420. Name
  6421.      SCRIPTSEXT
  6422.  
  6423. Type
  6424.      String
  6425.  
  6426. Description
  6427.      The default filename extension for the ImageStudio ARexx scripts.
  6428.      Only scripts with this extension will be added to the list in the
  6429.      `Scripts' floating palette.
  6430.  
  6431. TEMPDIR
  6432. -------
  6433.  
  6434. Name
  6435.      TEMPDIR
  6436.  
  6437. Type
  6438.      String
  6439.  
  6440. Description
  6441.      The directory in which ImageStudio can put its virtual memory
  6442.      temporary swap files. This should be some location on your hard
  6443.      disk, as the data will be accessed a lot during some operations.
  6444.      If you have lots of RAM, the temporary directory can be placed in
  6445.      the ram disk for maximum speed.
  6446.  
  6447. TEXTEDITOR
  6448. ----------
  6449.  
  6450. Name
  6451.      TEXTEDITOR
  6452.  
  6453. Type
  6454.      String
  6455.  
  6456. Description
  6457.      The text editor used to edit ARexx scripts from the `Scripts'
  6458.      floating palette. The string is in the format that would be typed
  6459.      from the command line, with a `%s' where the image filename should
  6460.      be placed.
  6461.  
  6462.      It is recommended that the string be prefixed with a "run" to
  6463.      allow the text editor to run in the background, otherwise
  6464.      ImageStudio has to wait for the program to finish. For example:
  6465.  
  6466.           sys:Tools/Memacs <NIL: >NIL: %s
  6467.  
  6468.      would leave ImageStudio waiting until Microemacs had finished,
  6469.      whereas
  6470.  
  6471.           run sys:Tools/Memacs <NIL: >NIL: %s
  6472.  
  6473.      would run Microemacs in the background. The "<NIL:" and ">NIL:"
  6474.      are used to stop error messages being printed to the console.
  6475.  
  6476. CLIPUNIT
  6477. --------
  6478.  
  6479. Name
  6480.      CLIPUNIT
  6481.  
  6482. Type
  6483.      Numeric
  6484.  
  6485. Description
  6486.      The system clipboard used to copy (see Copy) and paste (see Paste)
  6487.      by the program. There is very little need to change this from the
  6488.      default value of 0.
  6489.  
  6490. PAGESIZE
  6491. --------
  6492.  
  6493. Name
  6494.      PAGESIZE
  6495.  
  6496. Type
  6497.      Numeric
  6498.  
  6499. Description
  6500.      The size, in K, of the virtual memory pages. The larger this
  6501.      number, the more real RAM is used but the less frequent the
  6502.      accesses to the swap files (see Tooltype_TEMPDIR).
  6503.  
  6504.      At most, two of these pages will be allocated in RAM at any one
  6505.      time.
  6506.  
  6507. UNDOBUFFERS
  6508. -----------
  6509.  
  6510. Name
  6511.      UNDOBUFFERS
  6512.  
  6513. Type
  6514.      Numeric
  6515.  
  6516. Description
  6517.      The number of levels of undo / redo available. The larger this
  6518.      number, the more disk space is needed for the virtual memory swap
  6519.      files (this doesn't change the amount of RAM required).
  6520.  
  6521. APPICON
  6522. -------
  6523.  
  6524. Name
  6525.      APPICON
  6526.  
  6527. Type
  6528.      Boolean
  6529.  
  6530. Description
  6531.      Turns the AppIcon on the Workbench on or off. By having an
  6532.      AppIcon, users may double-click on the icon to bring the
  6533.      ImageStudio screen to the front or drop image files on it to load
  6534.      them.
  6535.  
  6536. HELP
  6537. ----
  6538.  
  6539. Name
  6540.      HELP
  6541.  
  6542. Type
  6543.      Boolean
  6544.  
  6545. Description
  6546.      Turns AmigaGuide help on or off. Turning on AmigaGuide help uses
  6547.      more RAM as some pages are kept in memory.
  6548.  
  6549.      See Known bugs, for more information on a known problem with
  6550.      AmigaGuide help.
  6551.  
  6552. PREVIEWDITHER
  6553. -------------
  6554.  
  6555. Name
  6556.      PREVIEWDITHER
  6557.  
  6558. Type
  6559.      Boolean
  6560.  
  6561. Description
  6562.      Turns ordered dithering on or off in the preview window. Turning
  6563.      preview dithering off uses slightly less memory and is slightly
  6564.      faster than the ordered dither.
  6565.  
  6566. PREVIEWREDRAW
  6567. -------------
  6568.  
  6569. Name
  6570.      PREVIEWREDRAW
  6571.  
  6572. Type
  6573.      Boolean
  6574.  
  6575. Description
  6576.      Turns the redrawing of the image on or off in the preview window.
  6577.      Normally this is kept on, but ARexx scripts may wish to turn this
  6578.      off (see ARexx_PREF_SET) to speed up some processing.
  6579.  
  6580. SPLASHWINDOW
  6581. ------------
  6582.  
  6583. Name
  6584.      SPLASHWINDOW
  6585.  
  6586. Type
  6587.      Boolean
  6588.  
  6589. Description
  6590.      Turns on or off the opening of the `About' window when the program
  6591.      starts up.
  6592.  
  6593. SCREENFRONT
  6594. -----------
  6595.  
  6596. Name
  6597.      SCREENFRONT
  6598.  
  6599. Type
  6600.      Boolean
  6601.  
  6602. Description
  6603.      ImageStudio starts up by keeping its screen behind all others. By
  6604.      turning this tooltype on, the screen is brought to the front after
  6605.      the startup initialisations have taken place.
  6606.  
  6607. Known bugs
  6608. ==========
  6609.  
  6610.    Known bugs:
  6611.  
  6612.    * There seems to be a bug in the AmigaGuide library which causes
  6613.      memory to be lost (typically a few hundred bytes) when an
  6614.      AmigaGuide document is opened. If this really bothers you, turn
  6615.      AmigaGuide help off (see Tooltype_HELP).
  6616.  
  6617.    * At the moment ImageStudio doesn't handle IFF-ILBM files with an
  6618.      interleaved stencil. Make sure when saving from an paint package
  6619.      that the stencil is turned off.
  6620.  
  6621.    * Calling AmigaDos commands from an ARexx script running from the
  6622.      `Scripts' floating palette sometimes causes the machine to freeze
  6623.      if the command fails and tries to print some text. To fix this,
  6624.      pipe the input and output of all commands to `NIL:' (see Common
  6625.      ARexx problems).
  6626.  
  6627.    * There is a bug in the AGA graphics hardware which causes some
  6628.      screens to be displayed corrupted. This either manifests itself as
  6629.      a fast flickering (usually with small screens) or not displaying
  6630.      the extreme edges of the screen (usually with large screens). This
  6631.      doesn't happen very often and we're powerless to do anything about
  6632.      it. It doesn't corrupt any data, it's simply annoying.
  6633.  
  6634.    * At the moment it is possible to run more than one ARexx script
  6635.      from outside ImageStudio and this will lead to the ARexx commands
  6636.      from the multiple scripts being mixed together. We don't know if
  6637.      it's possible to only run one script at a time externally. If you
  6638.      run all your scripts from inside ImageStudio, this will never
  6639.      happen.
  6640.  
  6641. Problems with datatypes
  6642. =======================
  6643.  
  6644.    If ImageStudio is running on a Workbench 2.1+ Amiga it will utilise
  6645. the built in datatypes for image conversion; the user should be made
  6646. aware of differences between the datatypes and the built-in ImageStudio
  6647. loaders.
  6648.  
  6649.    The datatypes are only used as a "last resort" if the ImageStudio
  6650. loaders fail to recognise the incoming image. Datatypes have the
  6651. following disadvantages:
  6652.  
  6653.    * The do not utilize virtual memory. Therefore when loading a large
  6654.      image, large amounts of RAM are required.
  6655.  
  6656.    * They can be slow. The datatype first has to convert the image to
  6657.      IFF-ILBM, which ImageStudio has to read in and convert to its own
  6658.      internal format.
  6659.  
  6660.    * Datatypes convert the image to a colour-mapped image. 24-bit image
  6661.      formats (e.g. JPEG) therefore are reduced in quality.
  6662.  
  6663.    * Some datatypes we have tried are fundementally bugged - crashing
  6664.      with odd sized images or different file layouts. ImageStudio has
  6665.      no control over the quality of the installed datatypes.
  6666.  
  6667.    Datatypes though can be useful to load in image formats not yet
  6668. supported by ImageStudio, and are therefore made available to the user.
  6669.  
  6670. Common questions
  6671. ****************
  6672.  
  6673.    If you have any questions about ImageStudio, make sure that it
  6674. hasn't already been answered below:
  6675.  
  6676. Common question 1
  6677. =================
  6678.  
  6679.      "Why doesn't ImageStudio support TIFF?"
  6680.  
  6681.    TIFF is a powerful and flexible image format, but that is also its
  6682. downfall. TIFF supports so many compression algorithms, for example,
  6683. that it would require a very large amount of code to deal with even a
  6684. modest range of TIFF files.
  6685.  
  6686.    TIFF will probably get added later when the loader / savers become
  6687. external modules.
  6688.  
  6689. Common question 2
  6690. =================
  6691.  
  6692.      "Will you be adding SHAM, PCHG ..."
  6693.  
  6694.    At the moment we have no plans to add SHAM or CTBL formats due to
  6695. their hardware dependence. PCHG will probably be added later when the
  6696. loaders / savers become external modules.
  6697.  
  6698. Common question 3
  6699. =================
  6700.  
  6701.      "Can I turn virtual memory off?"
  6702.  
  6703.    ImageStudio will always work with virtual memory. If you are lucky
  6704. enough to have lots of RAM and you wish to use that instead of your
  6705. hard disk, simply put the temp. files in the ram disk (see
  6706. Tooltype_TEMPDIR). The overhead of using virtual memory from RAM is
  6707. negligible.
  6708.  
  6709. Common question 4
  6710. =================
  6711.  
  6712.      "Why is there not a colour preview window?"
  6713.  
  6714.    Even with a relatively small amount of greyscales, a good
  6715. approximation of the image can be obtained (balance, contrast, etc...).
  6716. With a small number of colours, a poor representation of the image is
  6717. the result. A greyscale preview is also faster.
  6718.  
  6719. Common question 5
  6720. =================
  6721.  
  6722.      "What other programs have the authors written?"
  6723.  
  6724.    Andy has written "StickIt" - an Amiga equivalent of the `PostIt'
  6725. note; useful for reminding you of things to do.
  6726.  
  6727.    Graham has written "MultiSample" and "MooseDrive". Multisample is a
  6728. utility for converting to and from common Amiga / PC / Atari ST sound
  6729. sample formats. MooseDrive is a frantic "viewed from the top" car
  6730. racing game with multiple large scrolling tracks and the ability to
  6731. upgrade your car as you win races.
  6732.  
  6733.    All the above programs are available from PD libraries as well as
  6734. the Internet's `Aminet' servers.
  6735.  
  6736. Common question 6
  6737. =================
  6738.  
  6739.      "How much disk space do the swap files use?"
  6740.  
  6741.    If the image is colour-mapped, 1 byte per pixel is used. Therefore,
  6742. the total number of bytes used is calculated as:
  6743.  
  6744.      bytes used = image_width x image_height
  6745.  
  6746.    If the image is 16 million colours, 3 bytes per pixel are used.
  6747. Therefore, the total number of bytes used is calculated as:
  6748.  
  6749.      bytes used = image_width x image_height x 3
  6750.  
  6751. Common question 7
  6752. =================
  6753.  
  6754.      "What is the .dvi and .ps documentation?"
  6755.  
  6756.    ".dvi" files are created with TeX program and can be viewed or
  6757. printed with appropriate utilities. This allows any user with the TeX
  6758. system installed to print the documentation out on any type of printer.
  6759.  
  6760.    ".ps" files are raw PostScript and can be printed on any PostScript
  6761. printer simply be sending them directly to the printer.
  6762.  
  6763. Common question 8
  6764. =================
  6765.  
  6766.      "Will you be adding support for animations?"
  6767.  
  6768.    Adding animation support is possible, but very very low on our list
  6769. of priorities. If you require image processing of animations with
  6770. ImageStudio, we recommend that you obtain a copy of Marcus Moenig's
  6771. `MainActor' program. With a bit of ARexx glue, MainActor could split
  6772. the animation, pass the frames to ImageStudio for processing and then
  6773. join them back into an animation afterwards.
  6774.  
  6775.    MainActor is a shareware program available from all good PD houses.
  6776.  
  6777. Common question 9
  6778. =================
  6779.  
  6780.      "Can you write a general virtual memory program?"
  6781.  
  6782.    We have been asked many times about writing a general purpose
  6783. virtual memory program that can be used with *all* Amigas (i.e. doesn't
  6784. require an MMU). To the best of our knowledge, this is not possible.
  6785. Our virtual memory routines don't require a MMU because they are
  6786. internal to ImageStudio and ImageStudio knows which parts of memory it
  6787. is currently using and which are safe to swap out to disk.
  6788.  
  6789.    A general purpose virtual memory program has to trap processor
  6790. instructions and decide whether that particular part of memory needs to
  6791. be loaded in. It also has to make smart decisions as to which part of
  6792. least used memory can be swapped out. In order to trap these processor
  6793. memory accesses, a MMU is vital.
  6794.  
  6795. Common question 10
  6796. ==================
  6797.  
  6798.      "Why don't you use a MUI for your windows design"
  6799.  
  6800.    `MUI', or `Magic User Interface', is a tool written by Stefan Stuntz
  6801. for designing font sensitive GUIs for Amiga programs.
  6802.  
  6803.    We do not use MUI for the same reason that we don't use any other
  6804. third party GUI software that requires runtime libraries. There are 2
  6805. main problems in using third party utilities:
  6806.  
  6807.   1. The user of ImageStudio is then expected to install extra software
  6808.      on their system just to get ImageStudio to run. In the case of
  6809.      MUI's installation, this can be be several hundred kilobytes of
  6810.      extra files.
  6811.  
  6812.   2. If at a later date a new version of the Amiga's operating system
  6813.      causes these third party products to fail, ImageStudio will also
  6814.      fail. We have been very careful in writing ImageStudio to adhere
  6815.      to Commodore's programming guidelines and therefore we see no
  6816.      reason why ImageStudio should fail to work with further operating
  6817.      system versions. Relying on third party products does not give us
  6818.      that confidence.
  6819.  
  6820.      In the very worst case that the author of third party product was
  6821.      unable or unwilling to update his / her software for the new
  6822.      operating system, ImageStudio would need to be re-written - not
  6823.      something we have any wish to do.
  6824.  
  6825. The authors
  6826. ***********
  6827.  
  6828.    ImageStudio was written by Andy Dean and Graham Dean.
  6829.  
  6830.    Queries and orders (see How to register) should be sent to Graham at:
  6831.  
  6832.      Graham Dean,
  6833.      14 Fielding Avenue,
  6834.      Poynton,
  6835.      Stockport,
  6836.      Cheshire.
  6837.      SK12 1YX
  6838.      ENGLAND
  6839.  
  6840.    Andy can be reached for queries (no orders) via Internet Email at:
  6841.  
  6842.      adean@eleceng.ucl.ac.uk
  6843.  
  6844.    The rate at which ImageStudio progresses depends on a few things:
  6845.  
  6846.   1. You. If you like and use the program, please register it. If you
  6847.      like the program but think it is missing something that isn't
  6848.      already in our future additions list (see Future additions) *let
  6849.      us know!*.
  6850.  
  6851.   2. Other work. Graham is studying `A' levels and Andy is doing a PhD
  6852.      and this work will take priority (sad, but true).
  6853.  
  6854.    If you find a bug in ImageStudio that is not convered in the `Known
  6855. bugs' list (see Known bugs), inform the authors at the above addresses.
  6856. Be sure to include as much information as possible, the version of
  6857. ImageStudio being used, a description of the Amiga system you are
  6858. running (model, amount of RAM, Workbench version, any expansion cards).
  6859.  
  6860.    If you are having problems loading a particular file into
  6861. ImageStudio, test whether it will load into any another package and if
  6862. possible whether other files created by the same program also give
  6863. problems. We cannot really test every faulty file, but if files created
  6864. by one particular program only give problems on ImageStudio then we'll
  6865. look into that.
  6866.  
  6867. How to register
  6868. ***************
  6869.  
  6870.    To receive the full version of ImageStudio, send 10 pounds sterling
  6871. (20 US dollars overseas) to:
  6872.  
  6873.      Graham Dean,
  6874.      14 Fielding Avenue,
  6875.      Poynton,
  6876.      Stockport,
  6877.      Cheshire.
  6878.      SK12 1YX
  6879.      ENGLAND
  6880.  
  6881.    We will accept the following methods of payment:
  6882.    * 10UK pounds cash.
  6883.  
  6884.    * A 10UK pounds cheque, drawn on a UK bank.
  6885.  
  6886.    * A 10UK pounds postal order, purchased in the UK.
  6887.  
  6888.    * 20US dollars cash.
  6889.  
  6890.    * International money order.
  6891.  
  6892.    We *don't* accept any foreign cheques drawn on non-UK banks and we
  6893. *don't* accept any foreign postal orders. We also cannot accept
  6894. Eurocheques for any value (USdollars or UKpounds).
  6895.  
  6896.    Note: Make sure that when sending cash, it is well wrapped in the
  6897. envelope.
  6898.  
  6899.    In return you will receive the latest version of ImageStudio, along
  6900. with a personal keyfile to unlock the package. Each keyfile is unique
  6901. to the registered user, please do not distribute the keyfile to others
  6902. as it can be traced back to you. Allow a resonable time to allow cheque
  6903. clearance, the processing of the order, etc...
  6904.  
  6905.    Upgrades will be offered to registered users free of charge. As we
  6906. are now operating a keyfile concept, upgrades can be obtained by
  6907. getting the latest version from the Internet, Aminet, BBS's, PD houses
  6908. etc... If your local provider doesn't have the latest version, pester
  6909. them until they get it!
  6910.  
  6911.    Upgrades will not now be given by contacting the authors directly,
  6912. unless there is a very good reason for it (we're sorry, but we don't
  6913. have the resources to deal with lots of registered users all wanting
  6914. upgrades at the same time!).
  6915.  
  6916.    The version number of ImageStudio (see About) is to be interpreted
  6917. as:
  6918.  
  6919.      version.revision.subrevision
  6920.  
  6921.    The `version' shows the main version of the program, `revision' will
  6922. be increased as small additions and improvements are made to the
  6923. program. The `subrevision' value is incremented with bug fixes. All the
  6924. values are simple decimal, not floating point, so version 1.9.0 would
  6925. be followed by version 1.10.0.
  6926.  
  6927.    New versions will be distributed with every change in revision
  6928. number, bug fixes are likely to be distributed as "patches" (more
  6929. details to follow).
  6930.  
  6931. Credits
  6932. *******
  6933.  
  6934.    The authors would like to thank:
  6935.  
  6936.    * Commodore-Amiga.
  6937.  
  6938.    * David Cusick, Don Cox and Julie Brandon for beta testing
  6939.      ImageStudio.
  6940.  
  6941.    * Our parents, for their support (especially our mum for also
  6942.      helping with the posting and packing!!!).
  6943.  
  6944.    * Matt Dillon, for the `Dice' C compiler.
  6945.  
  6946.    * SAS Institute, for the `SAS/C' C compiler.
  6947.  
  6948.    * Ian OConner, for `The Designer' - used to do all the GUI windows
  6949.      design.
  6950.  
  6951.    * Michael Balzer, for `ARexxBox' - used to implement the ARexx port.
  6952.  
  6953.    * Jonathan Forbes, for `LX' - used to decompress the .lha files in
  6954.      the distribution.
  6955.  
  6956.    * All the public domain / freeware / shareware authors, for loads of
  6957.      great software.
  6958.  
  6959.    * The Independant JPEG Group, for their essential JPEG code and
  6960.      information.
  6961.  
  6962.    * All those involved with the excellent TeX and `TeXinfo' packages.
  6963.  
  6964.    ImageStudio has been tested on:
  6965.  
  6966.    - A500, Workbench 2.04, 1Mbyte CHIP RAM, 2Mbyte FAST RAM, A590
  6967.      85Mbyte SCSI hard drive, Microbotics VXL*30 accelerator (no 32-bit
  6968.      RAM).
  6969.  
  6970.    - A1200, Workbench 3.0, 2Mbyte CHIP RAM, 4MByte FAST RAM, Power
  6971.      PC1204 expansion card, 68882 FPU, 270Mbyte IDE hard drive.
  6972.  
  6973.    - A4000/EC030, Workbench 3.0, 2Mbyte CHIP RAM, 8MByte FAST RAM,
  6974.      68882 FPU, 130Mbyte + 420Mbyte IDE hard drives.
  6975.  
  6976. Future additions
  6977. ****************
  6978.  
  6979.    The following features will probably be added to future versions of
  6980. the packages (roughly in order):
  6981.  
  6982.    * Making the loader / savers external modules.
  6983.  
  6984.    * "Clear unused buffers" option.
  6985.  
  6986.    * Making the effects external modules.
  6987.  
  6988.    * Write a separate program used to build ARexx batch processing
  6989.      scripts by simply clicking on the actions you wish to perform.
  6990.  
  6991.    * ARexx macro record.
  6992.  
  6993.    * Spare buffer.
  6994.  
  6995.    * Alpha channel buffer.
  6996.  
  6997.    * Halftoning operators.
  6998.  
  6999.    * Image rotation.
  7000.  
  7001.    * Aspect ratio correction in the preview window.
  7002.  
  7003.