ConGo5-HowTo II

3 Conversion to PC

This is pretty simple - you either open the image by double clicking it and save it afterwards or you use the batch processing as described below.

4 Conversion to 64 formats

This is the area where ConGo offers the most options - so many in fact that they sometimes might seem confusing. So let's start with a little theory first. No, you don't have to know that theory, feel free to skip to chapter 4.1 if you hate mathematics.

You may know that there are different ways to do graphics on the Commodore 64. The two ways that Commodore invented are the Hires and the Multicolour mode. In both modes (and in nearly every other too) an image is 320 pixels wide and 200 pixels high. Internally, a C64 image consists of so called cards, cells of 8 by 8 pixels. It's basically the colour restrictions of those cells that define a certain graphics mode for the C64. In Hires, in one card there can only be two different colours (from the total of 16 C64 colours). In Multicolour, there are three colours to be selected for each cell. Additionally, there is a background colour that's the same for the whole picture. The downside to Mulricolour is that each pixel is effectively two pixels wide (that's why Hires is called "high resolution"). I cannot go into further details of all the 64's graphics modes (see www.editorix.org/congo/ for my growing list of C64 image formats). Suffice it to say that "conversion" means to ConGo applying the different colour restrictions of those modes to an image.

So how does ConGo do that? Basically, the program calculates what C64 colour is the nearest to the PC colour of a pixel. To do that, it compares the red, green and blue components ("RGB") of the available C64 colours with the RGB values of the current pixel. Imagine a 3D-space based on R, G and B (instead of x,y,z). Then the 16 C64 colours are 16 points in that space. And the current pixel is another point. No our task is to find the C64 point that is nearest to our pixel point - we have to calculate the distance. The problem is, the C64 palettes are not symmetrical - some points are nearer to each other than others. So if we take any pixels, chances are higher that it fits to a certain C64 colour than to some other. The computer does not know how "blueish" or "redish" a colour looks, it would always stupidly chose the nearest colour even if that is more "grayish" than "blueish" while some blue colour would (visually) fit much better.

How do we solve this problem? ConGo offers three possibilities:

a) You can make ConGo show cards that are "critical" (by using the colour warning grid, see 2.2) and work on these cards manually with the drawing tools (see 2.3). Advantage: you get the most pleasing results. Disadvantage: it's a pretty slow process.

b) You can give the computer little hints which colours it should love or hate more. And here come the "colour level" options: in the option screen, you can define four factors that are called Graylevel, Redlevel, Greenlevel and Bluelevel. What they do is: to give those colours a little advantage (value smaller than 1.0) or disadvantage (value larger than 1.0) over other colours. For example, for a Redlevel value of 2.0, the distances of all red colours to your pixel colour are doubled before these distances are compared with others. This decreases the chances that ConGo sees a certain pixel as "red". Advantage: it's a fast and simple process, disadvantage: it needs some experimentation and may not fit all you images.

c) You can manually tell ConGo which RGB values it should replace by which C64 colours. This is done with so called "manual" colour lookup tables (LUT) - do not confuse them with "automatic" colour lookup tables that ConGo can calculate to speed up the conversion. This is especially useful if you are working with 255 (or 16) colour images that are all based on the same palette. In this case, you can re-use your LUT for all your images.

4.1 Conversion hints

- Try out different C64 palettes. They may all have their benefit for some pictures. Myself, I find that the "Deekay"-palette often gives the best results. By pressing the button in the main menu, you can edit all palettes or even create new ones. They are saved into the congo.ini file in your WINDOWS directory. If you did so, please mail the RGB values to me so I can include it with ConGo.

- Play around with dithering (drop down the conversion buttons to switch on/off dithering for each graphics mode separately). In the option form you can change the dithering algorithm (use "nearest" for no dithering) and the dithering percentage. For Multicolour and Hires, dithering isn't such a good idea in most cases because it makes meeting card restrictions harder. You could, though, activate the "dither by cell" option. It makes ConGo use dithering separately for each card so colours do not "spread" to other nearby cards and the total number of colours in a card does not change that much.

- For Multicolour and Hires, try one of the restricted colour modes. You find them in the option screen in the "colour groups" area. Using only four or two colours in a picture may even look better because there are less or no artifacts anymore.

- For Hires, try out the "Hires tolerance" option. It tells ConGo to look at the surroundings of a card to determine the two colours it is using in that card. This might be useful to reduce the number of artifacts: Imagine some very small red and green spot in a blue lake. If ConGo doesn't look at the blue surroundings, it uses red and green in this card, resulting in a red/green-square in an otherwise blue area. If ConGo sees that there is all blue around this spot, it might use red and blue in this card. It "forgets" green but the result is looking better because you now have red pixels (not a whole 8x8 square) in the blue area. 

- For IFLI, try out the 16 colour mode. It offers an increased 320x200 resolution instead of >16 colours.

- To speed up the conversion, activate the "use lookup tables" option. But take care - each time you change one of the colour levels (like Graylevel etc.) or select a different C64 palette, the lookup table has to be calculated again resulting in a speed loss. So if you are experimenting with colour levels or palettes, switch the "use lookup tables" option off.

4.2 Defining new manual colour lookup tables

To manually select which RGB values are converted to which C64 colour, click the button (with an active image window). ConGo reads out the RGB values of this image and shows a 16x16 matrix like this:

In each row in the middle part (1) you see the PC RGB value in the upper half of the square and the C64 RGB value in the lower half of the square. Chose the sort mode with the drop down box (2). When you open this window, all C64 values are calculated based on the current palette and options. Now let's take a lok at the example picture on the square next to the "4" sign. It tells you that ConGo would convert the light blue PC colour to a white. Well, we see that a light blue would fit much better. So you now select "Colour 3" on the right side selection (3) and right-click in the square that you want to change (4). Voila, from now on ConGo will convert this white value to light blue. If you want to use that LUT for many images, save it via "Save LUT" and enter it's position in the option window .

4.3 Batch conversion

When describing the main screen, I already described how to start the batch processing, also called "conversion assistant" because it is a crossbreed of assistant and batch form. It is very useful either when you want to play around with several options without opening the option screen again and again or if you want to treat a lot of images in the same way. Together with what you learned about conversion, there is not much more to say here. Some minor details: your computer shouldn't be too old if you want to use the conversion assistant as it often tries to do a life preview. If you open the conversion assistant from a single image, you can only APPLY the result to the currently open image window. If you opened it via the task list, you must first select your target format. If you did that, only those options are available that are useful for that specific format.

5 Defining new C64 formats

There is a pretty small icon in the browser windows that's well suited for adventurous people. There might be a time when ConGo does not recognize a C64 image from your collection. In this case, you click on the image (first) and on the icon (second). Now you can define the memory format of the image. It would be easy if you already knew where things like bitmap, videoram etc. are located. But even if you don't, you can slowly change all the values (with "preview" activated) and try to get some recognizable image in the preview window. It might be a good idea to go for the bitmap first - the bitmap most often (but not always) starts at some "round" value. The screen can help you for all multicolour, hires, multicolour fli and hires fli formats, including those that are packed with a certain packbit. And: if you were successful, please mail me your results!

6 Using plugins

ConGo supports two different kinds of plugins: ConGo's own kind (*.cpg) and Photoshop compatible plugins (*.8bf). When the program starts, it is looking for both types in it's \plugins sub directory. Photoshop plugins may then be called via the Picture -> Photoshop Plugins menu. There advantage is that many of those plugins are readily available, even many free ones. But being Photoshop plugins, they cannot access C64 specific image attributes. When you apply a PS-Plugin to an image, it will always go to "PC" mode. Therefore you should use PS-plugins BEFORE converting an image to C64 formats.

ConGo plugins CAN access all C64 image attributes. They exist in two different flavours - effect plugins are found in the main toolbar (on the right side of the font dropdown box) and in the Picture -> ConGo Plugins directory. Load plugins cannot be explicitely called - they register themselves for certain filetypes. You can check the existence of ConGo load plugins via the Help -> Filetypes menu.

To create new plugins, I have included the source of two example plugins in the SDK sub directory. This is Delphi source but the plugins may be coded in every language that can create DLLs (a CPG is simply a DLL). Unfortunately I didn't yet find someone that could provide a C++ sample so if you know someone with working C++ knowledge who's willing to help...

Last words

Please support ConGo by submitting bugs, feature requests, self defined palettes, new image formats etc. pp. and by registering (it's free, of course, and anonymous, if you want it so). Registering really helps because I have to decide which parts of ConGo are worth to be worked upon and which I can forget in the future. Also, consider registering the ConGo Photoshop Plugins if you want to support all ConGo development.

Other ConGo products (see www.editorix.org/congo/):

- ConGo Shell Extension: makes Windows Explorer show all C64 file formats, makes Explorer show D64/71/81 as folders (free).

- ConGo Photoshop Plugins: import / export / conversion plugins for Adobe Photoshop plugin compatible programs (free trial version)

Werbung: Product reviews for computer, laptop and tft monitor with price comparison at dooyoo.co.uk

[ConGo] [ConGo-Description] [ConGo5-Howto I] [ConGo5-HowTo II] [Supported File Formats] [ConGo-History] [C64 Image Formats, Part I] [C64 Image Formats, Part II] [ConGo Shell Extension] [ConGo Plugins] [DemoAmp] [Delphi Components] [All Downloads]