home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
1st Canadian Shareware Disc
/
1st_Canadian_Shareware_Disc_1991.ISO
/
graphics
/
imagmakr
/
imagmakr.doc
< prev
next >
Wrap
Text File
|
1988-08-18
|
17KB
|
331 lines
ImageMaker(c)
Copyright 1988
by
Kerry E. Wilkinson
INTRODUCTION:
Well, ImageMaker(c) is finally out. Its been several months in
the making and as my first programming project on the PC I have put it
out with numerous reservations. I know that the lions on the edge of
the shareware world are going to chew me up for the way certain things
are done in this program. But please remember, this program is NOT a
'Paint' program. It won't insert those little spreadsheet graphs, or
the digitized picture of your dog (yet). No pictures of the space
shuttle or some valve either. ImageMaker(c) is a programmer's tool.
After purchasing my first MS-DOS machine, I wanted to play around with
the EGA graphics a little and learn the intricacies of programming on
a PC at the same time. I purchased Turbo-C (c), by Borland, since I
was already familiar with 'C' from some MC68000 machines I had worked
with, and set about trying to write a medieval war game. I used a
paint program and started creating some small graphic images, thinking
that there would be an easy way to port them over to my program when I
was done. I was wrong. I checked several BBS's around the country, and
found nothing that would suit this purpose (not to say that other
programs don't exist, I just couldn't find them). Thus, the idea for
ImageMaker(c) was born. A simple to use yet powerful image editting
program.
LEGALITIES:
ImageMaker(c) is copyrighted by me, Kerry E. Wilkinson. You are
free to distribute this crippled version (does not allow you to save
your images) in any way you like as long as all copyright notices are
kept intact, and all support files are distributed with the program.
Under no circumstances is it to be sold to any individual or
corporation without personal approval by myself in writing. It may not
be distributed by the various companies that sell public domain
software disks. You may purchase a non-crippled version of
ImageMaker(c) by sending a check or money order of $25.00 to:
Kerry E. Wilkinson
712 Ascot Lane
Blacksburg, Va 24060
Make all checks payable to Kerry E. Wilkinson.
You have the first release version of ImageMaker(c). I know that
there will be a few bug fixes in the future. So please, if you find
anything that doesn't work quite right, or have any criticisms or
compliments feel free to contact me either via mail or through the MBT
BBS at 1-703-552-8767 (1200-2400 baud, 24 hrs, 7 days a week, 3
nodes). Andrew Roy is the sysop of the MBT, and runs an excellent
multi-conference BBS with over 270 Megs online. If you do desire to
1
leave a message just do so in the General conference and address it to
Kerry Wilkinson. Even if ImageMaker(c) doesn't suit your needs give
the MBT a call, you won't regret it. By the way, this program is
partially dedicated to Andrew Roy, who shares my amazement at some of
the things 'Management' does and can appreciate a quadruple negative
when he hears one. And to Lei for being able to drag my rear out of
the computer room, and to Robbie King, for being a 'grit' and one heck
of a programmer.
IMPLEMENTATION:
You need an EGA card (or VGA card, see below), with 256k
installed on it and a Microsoft(c) compatible mouse to run
ImageMaker(c). Imagemaker(c) should work with PC compatibles with as
little as 256k of ram. If you have a VGA only type adapter
ImageMaker(c) will shift it into medium resolution mode (just happens
to be 640x350, same as EGA high resolution). I have tried to make the
program as user friendly as possible with my own dialog and file-
select boxes (here come those 'look and feel' lawsuits).
USES:
ImageMaker(c) can be used to create up to 18 images, with a
maximum pixel range of 60 pixels on the X axis, and 48 pixels on the Y
axis. These can be icons for a MAC-like interface, or schematic
symbols, or a series of animation sequences for your latest arcade
game. They are all saved in a putimage() and getimage() format. What
this means is that you can create your images, save them to disk, and
just load them into your image buffer during runtime, and use
putimage() to display them on the screen. No messy conversion process,
and it allows you to alter the looks of your programs without having
to recompile your source program. Those of you familiar with mouse and
desktop environments will see the similarity with this concept and
that of using resources. Since there is a difference between image
formats between Microsoft(c) and Borland(c) languages I will be
releasing a conversion program to registered users.
USING THE PROGRAM:
ImageMaker(c) comes with the program file IMAGMAKR.EXE, and
several *.IMB files, which are sequences of images which you can view
from the program. ICONS.IMB is the image file for the program's icons.
An intertesting note about ImageMaker(c) is that it created its own
icons. You can see these images by loading up the ICONS.IMB file.
To use the program you must first make sure that the program and
all of its support files are in the same directory. The executable
file is IMAGMAKR.EXE. You can tell the program which image file you
would like to use by typing IMAGMAKR [filename.ext]. The file must be
a valid image file. If it isn't, the program will zero all of its
internal image buffers, and you can start from scratch. If no file is
requested at start up the program will then search for the default
image file named IMAGE.IMB. You can hit the filing cabinet icon and
you will be given a directory of all the image files (shows all files
with the extension of .IMB, whether they are in actuality a valid
ImageMaker(c) file or not). You can then enter in the name of the file
you would like to edit and click 'OK'. The program will then clear all
of its internal buffers and load the image file you selected.
2
Once you are in the program you will see an exploded view of the
image to the left and center of the screen and its actual size image
to the right and above. The several boxes of colors at the bottom of
the screen indicate the possible color choices from the default EGA
palette. You can make any of these the active drawing color by just
pointing to the square and clicking the LEFT mouse button. The box
will be outlined in RED to show that it is the active color. When
drawing, both buttons are active, with the RIGHT button generally used
to edit out mistakes with the present background color. If you need a
different color for the RIGHT button just select the different color
with that button (it works the same as the LEFT primary button, with
the exception of not showing a red square around its color). In the
following descriptions I will refer to several different colors, these
are the correct colors if you are using the default EGA palette but
will vary if you change from the default.
To the left and below center screen you will see two rows of
numbers, with values ranging 1 through 18. These are the buffers that
the program can have in memory at the same time. If the number is a
LIGHT CYAN color it means that it is the current image being
displayed. If it is a DARK BLUE it means that the buffer has an image
allocated to it, but is not currently being displayed. If the number
is GRAY, it means the there is presently no image in that particular
buffer. You can jump to any other buffer by simply pointing to its
number and clicking the mouse (as long as it has an image in it), or
by using the right and left arrow keys. These two keys will move you
forward or backward through the 'film', showing the next or previous
image. The only way to create a new image for an empty buffer is to
hit the right arrow key until it moves to the new buffer. The program
will then create a blank image, with its X and Y pixel size patterned
after the previous image. This speeds up the process of creating an
animation sequence.
On the right side of the screen you will see several icons for
the various functions that ImageMaker(c) uses. Just simply move the
mouse cursor to rest on the icon and click the LEFT mouse button to
activate it. When an icon's function is active it will be shown in
reverse colors.
The top left icon shows a movie projector. By clicking on this
icon the program activates the movie projector function and starts to
animate the images in memory. It does this by flipping through the
images and displaying them on the image area of the screen (where the
normal size image is usually shown). You can increase or decrease the
rate at which it displays the images by pressing the RIGHT mouse
button to speed up, and the LEFT button to slow down. You may have to
play with this a little while to get a feel for how it works. It
samples the mouse each time it displays a new image, so if it is slow
it will take a little while to speed it up. You can stop the animation
at any time by hitting any key on the keyboard. It will then return
you to the image that you were editing before you activated the
projector. I implemented this function for the sole purpose of giving
you the ability to see what your animation images will look like in
your program.
The top right icon is the 'Erase Image' icon. It does exactly
that, erases the image. It does not delete the image from the strip,
3
it just takes all of the image's pixels and changes them to BLACK. Use
with caution.
The next four icons are the various 'Arrow' icons. By pressing
any of these you move the image up,down,right,left depending on the
icon. This is not a destructive move of the image, meaning that if you
move the image up,for example, the top row will subsequently appear at
the bottom of the grid.
The next two icons are used for flipping the image either along
the horizontal or the vertical axis. This is useful for changing the
direction your image is facing. Take your kungfu master image, flip
him along the vertical axis, then change the color of his robe. You
now have an opponent for him.
The next icon is my poor rendition of a paint bucket. This
function is used to change the colors of your active image. This is
NOT a standard 'fill' routine. I implemented it as a color swap. Just
point to the the color that you want to change, click the mouse
button, then point to color that you want to change it to. All
occurences of the first color in the image will be changed to the
second color. By the way, it is fairly dumb, you can point to a color
palette square, or a grid pixel, or any location on the screen. It
just reads the color of the pixel that you have pointed to.
The next icon is used to change the size of your image. Remember,
the image can be any range from a 2 by 2 pixel box, up to 60 by 48.
Once you hit this icon, four other icons will appear next to the icon
column. These should be self explanatory, two to increase the X and Y
size, and two to decrease the X and Y size. If you reach the maximum
or minimum value the program will keep. I must apologize for the speed
of this process though, it does take quite some time when the image
gets rather large. I have tried in all ways to make the program as
fast as possible, even at the expense of size. Unfortunately some
functions such as this one are doing too many things internally for
this to be helped.
The icon that says 'Copy To' does just that. Activate this icon
and then just point to another buffer number that has an image (i.e.
that is DARK BLUE), and click the LEFT button. This will copy the
present active image's in- formation to that buffer. This is
practically mandatory for doing any type of animation sequence.
Remember, the only way to create a new empty buffer is to hit the
right arrow key until you hit the new image. It will then change from
GRAY to LIGHT CYAN, indicating that there is a image there and that it
is the current active image. To create an animation sequence, for
example, just run the program without a filename or IMAGE.IMB, then
create your first image. Click the 'FWD' icon to the next one. This
will create a new blank image. Then move back to the previous image
that you drew, either by the left arrow, or by just pointing to the
number and clicking the LEFT button. Then click 'Copy To', and then
point to the second, blank, image. This will copy the first image over
to the second. Change the second image a little, like moving the
kungfu master's leg, and proceed to copy that to the next image etc.
Change each image a little at a time, hitting the projector icon every
so often to view your work. Pretty soon you will have your own
'slapboard' hero!
'Delete Image' will actually remove the image from the strip. You
can only delete the last image in the buffer list, so if you have
4
eight buffers with images, you can only remove the eighth image. It
will delete it and move backwards to the previous image, making the
buffer's number that you just deleted GRAY, indicating no image for
that buffer.
To quit ImageMaker(c) just click on the EXIT icon. ImageMaker(c)
will prompt you to save your file or abandon it. The save file
function will be deleted in the non-registered version.
CONCLUSION:
I sincerely hope that you find this program useful. Future
upgrades for registered users will include more graphic resolutions
(i.e. VGA high res and possible 256 color mode), more buffers allowed,
useful programming routines that will take care of the loading and
animation of the images in your programs, possible source code
generator that will enable you to include your images at compile time
rather than runtime.
If you are a registered user please feel free to upload any
images that you have come up with to BBS's. I have very little
artistic talent (as can be seen by the images that come with
ImageMaker), and would really appreciate some good examples of images
or animation.
If you do send for a registered copy of ImageMaker(c), you will
receive the latest FULLY working version with documentation and
examples on how to use it in your own programs. The main strength of
this program will always be in its ease of use. You will be able, with
very little effort, to add images to all kinds of programs.
MS-DOS is a registered trademark of Microsoft Corporation.
MAC is a registered trademark of Apple Computers.
Turbo-C is a registered trademark of Borland International.
5