Tuesday, March 10, 2009

ZBitmap

Copperbox revision 503.

I've implemented the pixel data writing as a array operation rather than a ShowS style bit of function composition. Hopefully this optimizes things if only slightly - I don't envisage using ZBitmap with huge bitmaps where it might make a real difference. The previous solution did seem a bit lacking in style.

ZBitmap

Copperbox revision 502.

Writing bitmaps with palettes now seems to work. So that leaves writing arbitrary buffers to do...

ZBitmap

Copperbox revision 501.

Work towards seeing why writing fails. Bmp headers can now be parsed without their payload, so you can at least look at the headers of invalid files rather than unhelpfully being told a parse error has occured.

Monday, March 9, 2009

ZBitmap

Copperbox revision 500!

Writing bmp files is re-enabled, though there is a bug where the output bitmap isn't the same as the input bitmap. As ZBitmap doesn't do any translation it should be. It does seem to work okay for 24 bit colour, but not for other ones.

Also this is just writing bmp files. There is no code yet to enable writing an arbitrary buffer containing bitmap data to a bmp file, which is really the most important bit.

ZBitmap

Copperbox revision 499.

Some tidying up before I attempt to re-integrate the WriteBmp module.

Sunday, March 8, 2009

ZBitmap

Copperbox revision 498.

This revision has a new approach to handling index overlays into the array of bitmap data. Different bitmap resolutions have different size requirements for a pixel - for a mono bitmap its a bit, for a 16 bit bitmap it is 3 x 5 bits, etc. I want to keep this data intact rather than marshaling to an unboxed tuples to represent RGB colours, so I need a scheme to allow different indexing according to resolution. Today's code implements a scheme that I hope will be suitable.

Thursday, March 5, 2009

Hawa

Copperbox revision 497.

Some prototypes for PostScript output combinators. The (mostly-) typed version TypedPostScript almost has a nice type tracking scheme patterned after Chris Okasaki's postfix combinator paper. Unfortunately PostScript has some operators that do nefarious things to the stack (copy, index, roll, cleartomark) and these will be hard to type without type-level numerals or some more advanced trick. The typed combinators have these operators (so they can generate appropriate PostScript) but they don't track the state change they cause.

The other serious short-coming of the prototypes is that they do nothing about pretty-printing, so the output is just a linear sequence.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.