File: AmosIff2Aga.Lha Version: 1.0 Purpose: To import pictures into AMOS AGA Author: Andrew Igoe eMail: thane@globalnet.co.uk Distribution: Public Domain Tech. Support: via eMail AMOS AGA IFF 2 AGA Introduction ------------ Up until now the excellent AMOS AGA would only allow you to plot, draw or bar graphics to the screen, which I think you will agree is rather limiting. The purpose of this program is to import pictures into a format which AMOS AGA can read. This program is merely version 1.0, and provided I get some positive interest there will be some newer versions which get over some of the limitations currently present. Limitations ----------- You cannot however, due to limitations within AMOS itself, load actual AGA IFF pictures. The conversion process provides a work around to this by letting you load in seperate Red, Green and Blue slides of your image in 32 colours, and remapping them to 256. Unfortunately, due to the way AMOS works, the program is not able to load Ehb or HAM successfuly, although the pictures will load, on converting them to an AGA display the colours will appear very wrong indeed. I hope to be able to work around this as an ideal solution to load a screen would be in HAM. The program only supports lo-res PAL at the moment, 320x256. If there are any NTSC users out there who would really like to have a copy of this program to work on their system then eMail me and if there are enough of you I will do so, but I wrote this program with myself in mind and being English I have PAL Amiga's. How to convert an Image ----------------------- We'll start by loading up a lo-res 32 colour image and converting this for use in Amos AGA. o Click on Load IFF Then select a lo-res 32 colour picture. o Click Render AGA Your picture will appear line by line, but the colours seem wrong, there are a number of ways to get around this. You will have to wait until the process is completely finished before continuing. If you have a slow Amiga - put the kettle on. o Click on Make Palette The screen will briefly flash a number of coloured bars then return to the menu. This process copies the pictures palette into the first 32 colours of the AGA palette. Even if you only load a 16 colour image, the program will copy 32 colours, you can see this clearer if you click on... o Click on View Palette Each line of the display shows one palette colour, you will notice that most of the screen is black, these are the colours which your picture has not used. o Click Render AGA Now you should see a perfect reincarnation of your picture, but what if you want to remap your picture to another palette, lets say to the default AMOS AGA palette as used in the AGA Demo. o Load Iff, again Although our picture is loaded already, if you wish to ammend the palette in any way after rendering, you will need to reload the picture, unless you are not using any form of palette remap. o Click on Load Palette The palette format used in the program is different to the format used by AMOS AGA, this is because I experienced a number of crashes using their format. Instead, I have provided two procedures for loading and saving palettes in the source code. o Toggle Remap to Hue The saturation mode isn't that reliable for choosing the correct colour, so we will remap using a Hue bias. If you do not experience a good result, try the Saturation mode instead. The results arn't as good as some commercial programs granted, but they should suffice for the time being. Of course, these pictures arn't really AGA, although they are in AGA format, they will be using at most only 32 colours. To achieve true 256 colour pictures under AMOS AGA you need a little patience, even with this program. First of all, load up an AGA art package and choose the picture you want to convert. First of all, go through the ENTIRE palette and remove all the Green and the Blue, then save the file with a ".Red" extension. Now reload the picture and repeat the process for both ".Green" and ".Blue". You cannot short cut this process by simply remapping as the other two colours need to be REMOVED from the image, not simply remapped to a different hue at the same saturation. Once this is done you will have to remap each "colour slide" to a 32 colour scale going from dark to full colour. ie. the red picture should have colour 0 as black and colour 31 as red 255, green 0, blue 0. This takes time and requires patience and a lots of clicking in your art package. Once your have your three colour slides, load them in using "Load RGB" and then click "Make Palette", if you have loaded an RGB picture set the function of Make Palette is slightly changed. Using three 32 colour images there are 32,768 possible combinations of colour, if you have used more than 256 on your picture then the palette maker will cut short after doing the first 256, the first colour will always be black, the colours which are not added to the palette will be automatically remapped during rendering. You can only view the Red frame with the View IFF feature, the green and blue will only be visible whilst loading. Render AGA is also slightly different under RGB mode. Remapping MUST always be done because although your picture may have only 256 colours, the program works in 15bit (32,768), if no form of remapping is selected then the program defaults to saturation remapping. I have only tested the RGB feature with a very low number of colours as I didn't have the patience to strip the colour from a 256 colour picture. If anyone experiences problems with this routine, please send your RGB slides to my eMail address and I will fix the problem. What the future holds --------------------- If there is enough interest in the program I will increase the supported graphics modes to Hires and Interlace. I hope I will be able to convert Ehb's over but I know that HAM will not work. As I have already stated, if I get enough requests I will write an NTSC version, otherwise - tough. Known Bugs ---------- The program has a tendancy to crash if you try to view a palette or picture before one is loaded or rendered. This is because I have included absolutely no error checking yet.