[Coco] [Color Computer] Convert image to Coco compatible image
Joel Ewy
jcewy at swbell.net
Tue Apr 2 21:07:35 EDT 2013
On 04/02/2013 03:17 PM, John W. Linville wrote:
> On Tue, Apr 02, 2013 at 07:33:00PM +0000, T. Franklin wrote:
>> Easy? No. What I've done in the past is create a custom palette
>> table in Photoshop and let it do the conversion to an 8 bit 16 color
>> BMP. Then I strip the header info off the BMP file and rename it to
>> BIN. Then after importing it to a DSK image, I read it into the CoCo
>> using a custom loader. But don't tell anyone. Let's keep this our
>> little secret.
> The above process sounds similar to what I think Joel Ewy does as well.
Here's approximately what I would do for a 16-color image. I have a
palette in GIMP called CoCo3 64, which is (approximately) the 64 colors
the CoCo 3 can produce natively. Close enough, anyway. I first scale
the original image to 320x192 (or 200), possibly cropping it to preserve
aspect ratio. (Doing all this in GIMP.) Then convert the image to
indexed, mapping it onto the 64 color palette, and using F/S dithering.
Then I promote the image back to RGB, and convert it to indexed again,
this time quantizing it to an optimal 16-color palette from the 64
colors to which it had already been reduced. This gets pretty darn
close to the CoCo's actual display capabilities.
A trick I've found for bringing out more detail in converted digital
photos is to use GIMP's 'Cartoon' script (Filters -> Artistic ->
Cartoon... in GIMP 2.6.8 under Ubuntu 10.04) after scaling the image and
before quantizing the palette down to 64 colors. This has the effect of
outlining areas of detail that would otherwise become pretty indistinct
when the image is dithered. It makes faces, for example. much more
clear in the final 16-color image, and ultimately makes for a more
recognizable, better looking picture, that still has as much of the
appearance of a digitized photo as can be expected in a 16-color picture.
Then save the image as a (16-color) .gif. Some of the CoCo programs
that display GIF files don't like comments, so un-check GIMP's comment.
Some of the CoCo programs don't like GIF-89 format, which is kinda dumb
because for a simple, single image there really is no difference. That
can be fixed once you have it on the CoCo. Use a disk editor to change
the '9' to a '7' in the first few bytes of the file.
I use "os9 copy picture.gif diskimage.dsk,picture.gif" to get the
picture file on a disk image, and then serve it up to the CoCo with
DW4. Then I can view the image with view 4.4, available at:
ftp://os9archive.rtsi.com/OS9/OS9_6X09/GRAPHICS/view44.ar
view will display the 16-color GIF file directly, with no need for
flickering displays, since it is already in 16 colors, and even 16
colors that already match the CoCo's palette, as well. With view, you
can convert the image into VEF, MGE, or CM3 formats, which will load
slightly faster on the CoCo because they don't use computationally
intensive (for the CoCo) compression.
If you are ultimately going to use the image under DECB, CM3 format
might be a good choice. I know there was a program that would load
CoCoMax 3 images into DECB's graphics memory blocks where it could be
saved with a BASIC program. Look for it on CoCoMax 3 disk images.
If anybody knows of a good place to put them, I can share the
CoCo-oriented GIMP palette files I have. I think there's a way to
convert them to .pal files that can be used in other programs, but I
didn't see how in the few minutes I fiddled with it this evening.
JCE
> I think Robert Gault has described doing something similar. In fact,
> I think that is what he is describing in the "Coco3 Graphics to BMP
> and Back" articles here:
>
> http://aaronwolfe.com/robert.gault/Coco/Unpublished/Unpublished.htm
>
> I have written code to do this sort of thing, although I don't think I
> have anything easily applicable for exactly the task at hand. Some of
> the older code in my cocovid project would apply, but nothing in the
> current version:
>
> http://git.infradead.org/users/linville/cocovid.git
>
> Actually, the cc3slides256 code is probably closer -- but, still not
> quite on target:
>
> http://git.infradead.org/users/linville/cc3slides256.git
>
> Well, maybe the above is helpful? Or maybe it just confuses things...
>
> Would people want a special-purpose tool for converting images to
> 16-color mode on the CoCo3? We have the technology... :-)
>
> John
More information about the Coco
mailing list