Subject: Re: A small IPX hardware hack
To: None <port-sparc@NetBSD.org>
From: Matt Dainty <matt@bodgit-n-scarper.com>
List: port-sparc
Date: 11/15/2003 22:51:38
--0F1p//8PRICkK4MW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
* der Mouse <mouse@Rodents.Montreal.QC.CA> [2003-11-15 22:06:29]:
> > Note though, that the oem-logo is 64x64 (I think?) in 1-bit B&W, mine
> > is 100x100 in glorious 8-bit colour ;-)
>=20
> Yes, I've been meaning to ask: what is the packing scheme to get full
> colour into 8bpp? Is there a fixed colourmap in use? What is it? Is
> the colourmap encoded somewhere in image? You did describe it as being
> well over the 10000 bytes that would be necessary for a raw 100x100
> 8bpp image - and in fact very close to 100x100 8bpp plus a 3x256
> colourmap (10768 - IIRC you said 10777). But then you wrote of some
> trivial conversion to a PPM image, and PPM is 24bpp non-colourmapped,
> so I find myself a bit confused.
I think you're just missing the width and height bytes at the beginning
to make 10770 bytes. IIRC the 3*256 palette comes next followed by the
100*100 image data. I *think* the background colour is the first value
in the palette, although I could be wrong.
The PPM format is trivial to convert to as for each pixel value, you
just write out the R, G & B values from the palette table, after the
image header. So yes, it's converting up to 24-bit, but it's just a step
to make sure you've got the right data, any image format could be used
for this step.
I'm still not entirely sure how the palette in the image plays with the
CG6, I wasn't sure if either the background or foreground text colour
may get altered as usually happens when you try and view an image with a
full 8-bit palette on an existing 8-bit display, but I appear to have
been lucky.
Matt
--=20
"A violent man will respond poorly to a gift of flowers."
--0F1p//8PRICkK4MW
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (NetBSD)
iD8DBQE/tq36KP58eR+X2TMRAsGBAJ9Hr2z0MMMnhk6wff4iyxDFBWbI/ACfdOLt
8FFrXU7zNR9Yk2kj6MBrrt0=
=v7NH
-----END PGP SIGNATURE-----
--0F1p//8PRICkK4MW--