home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
559b.lha
/
MonoHAM_v0.85
/
MonoHAM.Doc
< prev
next >
Wrap
Text File
|
1991-09-27
|
11KB
|
270 lines
M o n o H A M
version 0.85
The IFF to monochome-HAM converter
for AMIGA computers with composite mono ports
by Roman Thomas Valderrama
September 30, 1991
This program is NOT in the Public Domain.
Permission is hereby granted to freely distribute
this program as long as archive contents are intact
and unchanged.
Program code is copyrighted 1991 by
by AV Systems; All Rights Reserved.
If you like this program; Use it! I don't require a trial period
or some ludicrous requests like "Delete this program if you
use it for 2 weeks without sending money". Go Ahead- Play,
frolic- fold it into funny hats... Have fun!
Archive contents:
MonoHAM.ReadMe - Make sure you've read this first.
MonoHAM - The executeable
MonoHAM.Doc - You're reading it
Gurth.iff - A picture showing what MonoHAM did.
DISCLAIMER: THIS PROGRAM IS PROVIDED "AS IS"; NO WARRANTIES ARE MADE
REGARDING ITS USE. ALL USE IS AT YOUR OWN RISK, AND NO LIABILITIES OR
RESPONSIBILITY IS ASSUMED.
IN ENGLISH: Although it takes little knowledge more then common sense
(something seriously wacko has to happpen to blow something up), all
disclaimers apply. If anything bad happens I'm not responsible!
(And neither is AV Systems)
A QUICK INTRODUCTION (TRY THIS NOW!)
CONNECTING MONOCHROME OUTPUT TO COMPOSITE INPUT
1. Turn everything off.
2. Get an RCA cable (you could borrow the one that connect to
your audio ports if you don't have one laying around)
3. Connect one side of the cable to the MONO-OUT near the RGB port.
4. Connect the other side to the cable to the COMPOSITE-IN of
the monitor (On 1084 monitors this is labled CVBS/L on
the back).
5. Turn on the monitor. Turn on your Amiga.
6. Press the CVBS/RGB switch on the 1084 monitor; the screen should
look the same but in black & white. If the text looks a little
fuzzy on 1084 monitors then hit the CVBS/LCA switch on the back-
text should look clear in B&W.
7. Using a standard IFF viewer, take a look at Gurth.iff...
It should look like my pet skull I bought from Disneyland.
Notice his shadow in the background is very gradiant-- in
the normal 16 shades of grey it's banded badly-- but here
it's real smooth. It's what's possible in the many levels
of grey you can get under MonoHAM.
WHAT IS MonoHAM?
MonoHAM will allow you to view IFF, IFF-24, and RAW (explained below)
pictures in what looks like hundereds of shades of grey; near-photographic
B&W images without the need of dithering, custom hardware, or funny
machine-code tricks. All it needs is any Amiga with a Monochome-Output
capability (all A500s, most A2000), and anything capable of composite
input (Expensive TV's, any VCR, Commodores 1084, any old Apple II monitor,
Video Toasters, DCTV, Digi-View, 'snapshot' video-thermal transfers, ect)
although the easiest way would be to have/use another monitor. Paper-white
monochrome would be best.
WHAT IT CAN DO:
MonoHAM will read and convert any IFF-ILBM (most IFF picture files) to it's
monochome HAM equivalent. Although it'll look like a colorful mess in
RGB color, the composite mono-out will give an accurate representation of the
same picture in it's luminance (B&W) intensity.
MonoHAM will read standard IFF (including HAM & EHB), IFF-24 with CMAP
(color palette - up to 256 colors or greyscale), IFF-24 'pure', and a
special RAW format that I've made.
MonoHAM will save the HAM image as normal IFF-HAM; for use with HAM paint
programs/animators and most Amiga IFF picture viewers. There are no
special considerations in a saved MonoHAM picture; it's just a typical
IFF-HAM picture (the trick is to just use the composite monochome output)
One useful application is creating a B&W animation from a series of
MonoHAM pictures, since each picture can be pretty close to B&W video.
WHY MonoHAM --- Why I made it;
Thanks to wonderful Commodore quality control, My 1084S RGB monitor blew up
2 weeks after buying it- My dealer was nice enough to replace it, but in
the mean time I noticed the composite Mono out at the back of my A500.
Never to pass up an oppertunity, I plugged my old Apple II monitor into it-
and there it was; a black & white Amiga. Although using an Amiga in B&W
seemed sacralige, I noticed that I was getting a lot more then 16 shades of
grey; in fact, the manual stated "4,096 shades of grey" using the composite
mono port. I later found this to be an exaggeraton-- after some
calculations and mulling over, I found 150 shades of grey was a more
accurate number; most of the RGB shade combinations are repeated shade
values.
Anyways, I found that this is a cheap and effective way to gets tons of
greyscale without the resorting to some of those elaborate graphic enhancers
out today.
HOW TO USE:
MonoHAM [<switches>] <source-file> [<destination-file>]
Switches:
-r RAW format: 320x200 (See below)
-i RAW format: 320x400 interlaced (See below)
-l Lighten picture by 1/3rd
-x Don't use palette colors
-a Antialienise/Smoothen pixels
Note that if a destination-file isn't given, you must press [ESC] to
clear the picture.
THE RAW FORMAT:
The raw format is pretty simple. It's just a collection of
unsigned integers ranging from 0 to 65535 (0x0000-0xFFFF) and kept in a
320x200 (128,000 byte) or 320x400 (256,000 byte) file. For those who
aren't sure, an unsigned integer is a two-byte value, in most-least
(MSB/LSB) order. The file is read in from the top down; sweeping left to
right... this is the easiest and most obvious form of storing a raw raster
picture file. The reason I implimented this is so that anyone can make
a program for creating/displaying pictures in the MonoHAM format.
320
o-------> Integers are lined up this way--->
| 2 BYTE| First from left to right
|INTEGER| Then down 1 line and left to right again.
V-------+ -- until all lines are done.
200 lines (400 interlaced)
- WORTHLESS TECHNICAL NOTE -
I'm using a integer scale (0-65535) instead of a byte scale (0-255) because
the luminance accuracy is dependant on a fractional basis; this is to
derive the 'best-fit' out of 150 shades of grey from 256 shades...
Originally I was going to use a floating point algorithm but found that
it would be unbearably slow; so instead I just used an integer math
expression and just 'overscaled' it a bit.
OTHER SWITCHES
-l Lighten picture;
There is pretty much for printing pictures; most printer
drivers (especially preferences) tend to print picture
files too dark. In order to 'loosen' some of the darker,
more subtle contrasts, I've put this switch in to
lighten them up during the conversion.
-x Don't use palette colors
You'll probrobly never need to use this, but I've found
some interesting color results by not using the normal
palette and just use HAM pixels. It's more of an
art effect (like image processing) then a needed
technique- Useful for whatever.
-a Antialias/Smoothen picture.
This will weigh each pixel with the one next to it and
reduce the contrast between them. This works best with
heavily dithered IFF pictures, making it look softer and
less 'dithery'. The reduce in contrast will give digitized
pictures a 'soft' look.
-f Print order form form to printer (PRT:) device.
This is only 1 page long so don't get too anxious.
(Make sure printer is online and ready though!)
Donate however much you feel, but donations $20 or more will
receive the latest revision of MonoHAM. (Most likely with
some of the features I'm either working on or considering below)
EXAMPLES OF USE:
1> monoham barb.iff barb.mham
This will convert and display "barb.iff" onscreen, and then
save it as an IFF-HAM image "barb.mham".
1> monoham -l raytrace.24
This will convert and display "raytrace.24" with a
lightend effect. Since no save name was given, the picture will
be displayed until you press [ESC]. This is useful for doing
a screen dump to printer (using WorkBench GraphicDump).
1> monoham -a fred.iff fred.mham
This will convert and display "fred.iff", using the antialias/
smoothen feature, and then save it as IFF-HAM image "fred.mham".
1> monoham -r -a objects things.mham
This will convert the 320x200 RAW file "objects", utilizing
antialias/smoothing- and then save it as "things.mham".
1> monoham -p
This will print out your donation form.
It's only 1 page -- Make sure your printer is ready!
USE LIMITS: version 0.85
LOADS FROM:
IFF, IFF-24, IFF-HAM, and IFF-EHB:
(Note that Digi-View 4.0 saves RAW as IFF-24)
Lo-res images up to 368x480
Hi-res images up to 738x480 (MonoHAM converts them to lo-res);
SAVES AS:
IFF-HAM (uncompressed)
FOR BEST RESULTS WITH DIGI-VIEW GOLD 4.0
Have Digi-View digitize with no color. Set the Camera scan rate option
to "Slow/Color Camera", and turn off dithering. Digitize your picture.
Save picture using "Save RAW" (which is actually save IFF-24 for DV Gold 4.0).
View/Convert your saved picture using MonoHAM; That's it!
Note that DV tends to save RAW IFF-24 a little dark; see below
THE MORE REASONS TO DONATE 20 BUCKS DEPARTMENT:
WHAT'S IN STORE FOR THE FUTURE: (in most to least order of possibility)
* Faster, more accurate conversion algorithm. I'm already
working on this one.
* Shade-corrected Digi-View 4.0 RAW IFF support.
DV4 seems to save RAW IFF's in a lower scale then IFF-24;
(like 0-192 shade values instead of 0-255)... This
makes the pictures a little darker then how they should appear.
A little experimentation and I'll fix this easy..
* Saving Compressed HAM pics. I had a little trouble with my
ILBM compression routine, so I had it disabled-- No problem to
re-enable after I fix it.
* Conversion that doesn't use a custom screen, thus
freeing up CHIP RAM and utilizing FAST RAM only. This is easy.
* Direct-read of other formats; GIF, RAW RGB (Sculpt) files.
* Direct-write of IFF-8 Greyscale (256 grey); maybe GIF.
* A better printer dump program. Although the -l option lightens
the picture enough to produce an decent printout, the system
Preferences driver does a horrible job with MonoHAM pics.
It seems that PrefDriver only sees 16 shades of grey-- not the
150 shades you'll see onscreen. The only way I could fix this
is to make my own custom print-dump program. Of course, since
the Amiga OS is catered to device-independance, my print dump
program would work with any graphics-capable Preferance printer.
* A gadget freaked moused out Intuition Based user interface.
This is a good and bad; while an Intuition based program offers
ease of use, CLI-based programs offers flexability and low memory
consumption. Actually the best way would be to use ARexx- but
I don't have ARexx, and most everybody I know dosn't have it either.
* Depending on how much intrest this program creates,
possibly a Paint program based on it (Mono-Paint?).
I can't imagine this being a really special project as far
paint programs go, but the features I would make would be
concentrated on real-world monochomatic drawing effects such
as charcoal, pencil, lead, eraser blurs, ink blots, paper burns ect.
This is undoubtedly the heaviest project to consider, so don't
count on me doing it.