home *** CD-ROM | disk | FTP | other *** search
-
- Batchconverter 1.0
-
- by Ramiro Garcia
-
- 25 May 1996
-
-
- ------------------------------- What is it? ------------------------------
-
- Batchconverter 1.0 is an AREXX script that uses ADPro for format conversion.
- Once you point it towards a directory full of pictures, and select the
- options you want, it will convert them all to IFF, GIF, or JPEG files
- automatically.
-
- Requesters appear for all choices.
-
- If you would like a version of this program in Spanish, email me. I
- make no promises, however.
-
- Si ud. quisiera una copia de este programa en espaƱol, escribeme,
- pero no puedo prometirte nada.
-
- ------------------------------ Requirements ------------------------------
-
- 1. ADPro version 2.5.
- 2. AREXX (Part of Workbench 2.+)
- 3. RexxMast should be running.
- 4. AmigaDOS 2.+
- 5. Enough empty space on a destination device to store the processed
- pictures.
- 6. A directory containing only the pictures you want to convert.
-
- This program uses ADPro, and ADPro runs best with lots of RAM and an
- accelerated machine.
-
- ------------------------------ Installation ------------------------------
-
- If you're going to use Batchconverter by clicking on the icon, you can drag it
- onto the hard disk anywhere that you want.
-
- If you're going to use Batchconverter from the shell (which I recommend),
- copy Batchconvert.rexx to the s: directory. One way to do this is by typing
- "copy Batchconvert.rexx to s:" in a shell.
-
- --------------------------- How do you use it? ---------------------------
-
-
- Type the following in a shell: "sys:rexxc/rx s:Batchconvert.rexx"
- or click on the icon. (Go ahead and use the shell. It's For Your Own Good.
- You'll Thank Me When You're Older. 8^D)
-
- Requesters will appear asking you what you want to do.
-
- They will ask what format you want the output files in, (IFF, IFF-HAM,
- GIF, or JPEG), where the directory with the files you want processed is,
- where you want the finished pictures to go, and a few other things. The
- destination directory (where the processed files will go) must be different
- from the source directory (where the originals are).
-
- If you select IFF format, you will be asked how many colors you wish the
- final pictures to have. You can enter 2, 4, 8, 16, 32, 64, 128, 256, EHB,
- or HAM8.
-
- If you select IFF-HAM format, you will be asked if you wish to shrink them in
- half horizontally, since ECS HAM (4096 color, 6-bit HAM) is usually displayed
- in low-resolution.
-
- If you select JPEG format, you will be asked to pick the "Quality".
- The higher this number is, the larger the output files will be, and the
- closer in content to the original file. A quality of 1000 will preserve
- most (not all) of the data in the original file, at the cost of bulkiness.
- Even so, it will be half the size of a comparable 24-bit file. The
- default Quality is 32, which is what ADPro sets it at.
-
- This program was rigorously tested: it usually ran OK on my Amiga,
- Sir CrashAlot.
-
- I also tried it on two machines other than my own, and it failed on both.
- 8^D. But it's really really really fixed now. Honest. (How many really's
- was that?)
-
- ------------------------------ Having Problems? --------------------------
-
- 1) If you pick the same directory for source and destination, the program
- won't work. Incidentally, this program will not rename the output
- pictures.
-
- 2) If REXXMast isn't running, you may get a message like this:
-
- rexxmast: Unknown command
- rexxmast failed returncode 10
- ARexx server not active
-
- The solution to that is, run rexxmast. Typing "run sys:system/rexxmast"
- ought to work, or click on rexxmast's icon/
-
- 3) If ADPro: isn't assigned, Batchconverter won't be able to find ADPro and
- start it up. However, ADPro itself requires the ADPro: assignment
- to run.
-
- 4) This program doesn't require much RAM:, but ADPro: does. You should
- have 4.5 Megabytes of contiguous free fastmem. If you're not sure
- how much you have, type "avail" in a shell, and look in the "Largest"
- column. You want to have a number there that's "4500000" or greater.
- If your pictures are no larger than 800x600 pixels, you might get
- by with "2500000" in the "Largest" column.
-
- 5) Color pictures more than 1350 x 1100 pixels in size will choke the
- program. Change the line:
-
- ADDRESS COMMAND "run < nil: > nil: adpro:adpro MAXMEM=4500000 MINIMIZED LISTINTERFACE NL NS"
-
- to:
-
- ADDRESS COMMAND "run < nil: > nil: adpro:adpro MINIMIZED LISTINTERFACE NL NS"
-
- This allows ADPro to grab almost all the free RAM on your system.
- If you have enough available RAM, then ADPro will be able to load
- the picture. If not, you can buy more RAM, or try the program VMEM.
- It's on Aminet (util/boot/VMem.lha).
-
- 6) If you use a version of ADPro earlier than 2.5, the results are
- unpredictable. Don't.
-
- 7) The source directory should have only pictures, although this program
- should ignore icons in the source directory. If you have anything other
- than icons or pictures in the source directory, however, the program
- will quit.
-
- 8) You need to know how to use a file requester. Click on the "VOLUMES"
- button for a list of choices. You can also type a full path name into
- the "File" part of the requester, and then click on "OK".
-
- 9) I tested Batchconverter with "PatchReq V 1.4", which replaces some requesters
- with the req.library requester, and "RTPatch V 1.4", which brings in the
- ReqTools requester. It works, but you might try getting rid of them if
- you're having problems.
-
- 10) If the source directory is empty, the program will fail. Make sure
- there are pictures to convert in the source directory.
-
- 11) This program uses the AmigaDOS commands "dir" and "list". If you have
- deleted or renamed them, the program can fail.
-
- 12) This program uses the AmigaDOS library "rexxsyslib.library". This is
- normally located in the "Libs:" directory. If you have deleted this
- library (but why would you do that?), the program cannot talk to ADPro.
-
- 13) T:pic.list is an ASCII (text file) generated by Batchconvert, listing
- the names of the files to be processed, one per line. If you're
- having problems, looking at this file may provide a clue.
-
- 14) If you're running Batchconverter over and over for troubleshooting,
- you can go to the end of the program and comment out the lines:
-
- ADPRO_EXIT
- address command 'wait 3 secs'
-
- like so:
-
- /* ADPRO_EXIT */
- /* address command 'wait 3 secs' */
-
- This leaves ADPro running, so it doesn't have to be loaded from disk
- each time you run Batchconvert.
-
-
- Send me email if you're having trouble, and maybe I can help you out.
- I know how frustrating it is trying to get something to work properly.
-
- email: ramiro@calweb.com
-
-
- ---------------------------------- Bugs ----------------------------------
-
- None that I know of. It won't work without RexxMast running, without the
- ADPro: assignment, with earlier versions of ADPro, with AmigaDOS 1.3,
- etc., but that's normal behavior.
-
- If (hah, "if") there are bugs, let me know so I can feed them to my
- house spiders.
-
- ---------------------------- Legal Disclaimer ----------------------------
-
- I've tried my very best to make this program foolproof. Unfortunately, in
- these litigious times, good will isn't good enough.
-
- I won't accept responsibility for any damage done to your system or data
- lost, directly or indirectly, as a result from using Batchconverter or any of
- its associated files. You use the program entirely at your own risk.
-
- If you *do* experience problems please let me know. I can't promise
- anything, but it's worth a try.
-
- Batchconverter and its associated files are not public domain. They may be
- distributed freely as long as no unreasonable charge is imposed. It may
- not be included within any commercial package without express written
- permission from the author; the exceptions from this are the AmiNet CDs
- and Fred Fish's utility collections. Batchconverter and its associated utilities
- may only be distributed if all files contained within the original archive
- are present.
-
- ------------------------------- Credits-----------------------------------
-
- I got chunks of the code from the examples that come with ADPro 2.5.
-
- Daniel J. McCoy's DoThumbnails.rexx was a big help in providing examples
- of how AREXX and ADPro work.
-
- Petri Nordlund's Register.rexx (Part of his Executive.lha archive) showed me
- a better way of controlling console highlighting.
-
- Merril Callaway's "The AREXX Cookbook" was invaluable.
-
- Martin Taillifer's "TurboText 2.0", my Favorite, Great text editor.
-
- My wonderful Amiga, which didn't lock up or crash once until I tried this
- with ADPro 2.2. Caveat Emptor.
-
- Applied Computer Systems, for letting me test Batchconverter on their machine.
- ("Ramiro, what did you do to the machine?" "Nothing, nothing. Just let
- me reboot, and it will be fine again.")
-
- Chris Brenner, from ACS, for getting me thinking about keeping ADPro on the
- Workbench Screen.
-
- BattleField Band, The Tannahill Weavers, The Hillbillies from Mars,
- Chorovaya Akademia's "Ancient Echoes", Claudio Arrau's Chopin Nocturnes,
- and John O'Connor's John Fields Nocturnes.
-
- Pepperidge Farm Sausalito cookies. (Many bags).
-
-
- ------------------------------ Shareware ---------------------------------
-
- This program has to be quite a bit better than it is now before I have the
- nerve to ask for money for it.
-
- I would be delighted, however, to get email from anyone using the program,
- or a postcard if you don't have internet access. I write about three Snail
- Mail letters a year, and those go to my relatives.
-
- -------------------------------- Author ----------------------------------
-
- f
- i
- n p
- g u
- e f b k
- Snail Mail: Ramiro Garcia email: ramiro@calweb.com
- 10055 Terra Loma #6 e r i y
- Rancho Cordova CA 95670 c
- USA
-
-
-
-
- I'm a member of the Sacramento Amiga Computer Club. Our home page is:
-
- http://www.calweb.com/~kab.
-
- This is my first program for the public. I hope it's useful to people.
- Someday, I hope to write good enough code that someone will offer me a job.
-
-
- Remember:
-
- Time flies like an arrow.
- Fruit flies like a banana.
-
- ------------------------------- History ----------------------------------
-
- Version 1.00 (05 May 1996)
-
- Called program BatchIFF.
- Writes 2-256 color IFFs only.
-
- Version 1.01 (06 May 1996)
-
- Added bug to directory handling.
-
- Version 1.02 (07 May 1996)
-
- Added Interlace/NonInterlaced requester
-
- Version 1.2 (09 May 1996)
-
- Fixed bug in directory handling.
- Added EHB, HAM, and HAM8, and GIF to output format.
- Added JPEG to output format (I thought).
- Added Scale-in-half choice for HAM.
- Made output to shell prettier.
- Reorganized code to modular format.
-
- Version 1.3 (10 May 1996)
-
- JPEG output format works now.
- Eliminated render step for JPEG option-big speedup.
- Spruced up file listing, destination directory.
- Added check for identical source and destination directory.
-
- Version 1.4 (10 May 1996)
-
- Added console highlighting for Aminet release.
- Commented out MAXMEM = 4500000 limit. If you're batch processing
- pictures, it's safer to leave the system alone anyway.
- Directory parsing failed the minute I tried it on the local
- Amiga dealer's machine. Back to the drawing board.
-
- Version 1.5 (18 May 1996)
- Put "MAXMEM = 4500000" limit back in.
- Improved directory parsing. It's fixed now. Honest. 8^D.
- Added more sanity checks, and meaningful error feedback.
- Tightened code and increased robustness.
- Rewrote and reformatted docs.
- First public release.
-
- Version 1.6 (27 May 1996) (BatchIFF)
- Version 1.0 (27 May 1996) (Batchconverter)
-
- Changed program name to "Batchconverter"
- Reformatted source for legibility.
- Changed JPEG GetString requester to GetNumber.
- ADPro now quits after program runs.
- Force minimized ADPro onto WB Screen.
- "All done!" notifications.
- Added some more "Problems" to docs. (Not
- more problems, mind you.)
- First Aminet release.
-