Classic Computer Magazine Archive ANTIC VOL. 3, NO. 5 / SEPTEMBER 1984

Easy Graphic Converter

Mix and match graphics from four popular products

By CHARLES JACKSON
Antic Staff Writer

SYNOPSIS

This program which converts picture files between different drawing software products, requires BASIC, a disk drive, and a minimum of 32K RAM. It runs on all Atari computers. Antic disk subscribers RUN "D:CONVERT.BAS".

Have you ever wished you could use Micro-Painter to create backgrounds and shapes for your Movie Maker files?

Are you looking for a graphics utility program that lets you draw with your lightpen and joystick and KoalaPad and Power Pad? Have you ever wanted to use Fun With Art drawing functions with your Micro Illustrator pictures? If such possibilities arouse your curiosity and creativity, graphics conversion utilities are for you. Graphics conversion programs modify your pictures files so they may be used with other drawing programs. Such a program, for example, might accept a Micro Illustrator picture file and use it to make a compatible Fun With Art picture file. This BASIC program converts picture files created by Micro Illustrator (Tech-Sketch, Chalkboard, and Koala), Micro-Painter (Datasoft), Movie Maker Reston), and Fun With Art (Epyx).

HOW TO USE THE GRAPHICS CONVERTER

Type in Graphics Converter, check it with TYPO, and SAVE an extra copy for backup.

The computer will prompt you for the type and name of your source file (the file you want to convert). Type in the correct number from the menu, [RETURN], then type the filename. Don't type [D][:], just the filename. Next, the computer will ask you the same two questions about your output file (the file you're converting into).

When you've answered all four questions, the computer will spend between three and six minutes creating a converted file and storing it in disk memory. The program will NOT alter or erase your original picture file if you specify a name for the output file that's different from the input file.. When the computer is through, it will print the name of the converted file on the screen.

Note that there are two ways to store and retrieve Micro Illustrator picture files: using its built-in STORAGE routines, and pressing the [CLEAR] and [INSERT] keys. When creating a Micro Illustrator picture for the converter, never use the menu's storage selection! To save such a picture properly in compatible standard mode, make sure your picture is on the screen, then press the [INSERT] key. Your drawing will be stored in a file called "PICTURE." To retrieve a picture saved this way, remove the menu from the screen and press the [CLEAR] key.

Pictures converted to Micro Illustrator should always be given the filename "PICTURE."

HOW IT WORKS

The program uses a two-step conversion process. First, your original picture file is converted to Micro-Painter format (if it's not already in that form), and stored on the disk as a temporary file called "TEMP." Micro-Painter picture files are 7684 bytes long-7680 bytes outline the picture and four bytes define background and playfield colors. These "color" bytes are always the last four bytes in a Micro-Painter file. They don't exist in a Micro Illustrator file saved by pressing [INSERT], so in this case this program uses the default colors of red, green, blue, and black for the background.

Finally, the program converts the Micro-Painter file into a compatible output file, adds all appropriate file headers, footers and flags, and erases the temporary file.

MOVIE MAKER APPLICATIONS

You can easily create colorful backgrounds for your Movie Maker animations with the aid of the converter. It is just as easy to create Movie Maker SHAPE files. Draw your shape with one of the above graphics programs and convert it to a Movie Maker BACKGROUND file. Boot the Movie Maker disk and use Movie Maker's built-in editing functions to copy your shape from the BACKGROUND screen to the SHAPE screen.

First load the converted file as a Background. Go to Compose, then press [ESC] to see the background. Use M to form a window, and (B] and the joystick to enlarge the windowto cover about one fifth of the screen. Don't make it bigger, or you won't be able to use the Duplicate function properly. Position the window, then press [D] to duplicate. Then press [ESC] to get back to the Shape screen, then press the joystick button to deposit the image in the same place. Press [ESC] again, press the space bar to clear the window, move the window to an adjacent section of the background, and continue in this fashion until you've moved the entire picture, or as much of it as you want to use on the Shape page. If you don't move the joystick when going from the background to the Shape page, you'll wind up with an exact duplicate of the background on the Shape page.

EXPANDING THE CONVERTER

Experienced programmers can expand this converter utility to accept many more types of picture files. After deciding what type of file you'd like to add, you must discover how that type of file is put together. Run DOS's COPY function to print the picture file to the screen, or use a disk utility to examine the composition of the file. Some important questions to keep in mind include: Does the file use a header, such as Fun With Art files? Does it use footers, like Micro-Painter files? How are color registers saved? Is your picture saved in full form, like Micro Illustrator files stored with the [INSERT] key? Is it saved in compacted form, like conventionally saved Micro Illustrator files? Once you've figured out the file's structure, write a BASIC routine to change your file to Micro-Painter format, and a routine to change it back. Your routines should be similar to the routines you'll see in the converter program. When you're done, ENTER your routines on top of the converter program.

Now, compose three short routines to use the Micro Illustrator, Movie Maker and Fun With Art conversion routines, and add them to the converter. Model the two-line routines after the routine in lines 570-580. Finally, increase NUM by one at line 180 and add the starting line numbers of your new routine to the computed GOSUB at line 440.

The Graphics Converter unlocks the door to a wider spectrum of uses for your graphics software, and is an invaluable brush in any electronic paintbox.

Listing: CONVERT.BAS Download