[Coco] Compressed pictures

Arthur Flexser flexser at fiu.edu
Sat Apr 28 19:05:35 EDT 2007


It is unclear why you would find LOADMing a 6K screen "too much";  it shouldn't
take much time to load, and the fact that it is 3 times longer than the main
program seems to me not particularly relevant.  If you want to compress the
picture, a decent algorithm is to use byte, rather than bit, repetitions and
think of the screen as a series of 8-bit wide byte columns.  The same byte
repeats very frequently in vertically adjacent positions in a typical graphics
screen.  A program I co-wrote years ago, MAXCMP.BAS, uses this and may be online
somewhere in a CoCo archive. (That one took the additional step of converting
the resulting screen to printable ASCII bytes and embedding the resulting
encoding into a generated BASIC program that when run displayed the picture.  
It was listed and written up in some issue of Rainbow, in one of Marty Goodman's
columns.  It should also be in the Delphi archives, along with a detailed
description of its compression algorithm.)

Art

On Sat, 28 Apr 2007, Diego wrote:

> While writing some of my BASIC programs, I thought about adding a intro
> screen. The options were add the drawing commands to the program (slow,
> limited) or load a graphic screen. But even a PMODE 3 screen is 6Kb, a bit
> to much for a 2 Kb program So I came up with a very simple compression
> rutine. 2 bit for color, 6 bits for how many pixels of that color. Some
> sample simple screens came down to just under 1 Kb (I know that some complex
> screens can become a lot larger than the original) My question: Is there
> some format/way to get a screen picture+loader in less than 2 Kb thatls
> already out there somewhere?
> 
> Diego
> 
> 
> -- Coco mailing list Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
> 




More information about the Coco mailing list