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.
Tuesday, March 10, 2009
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.
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.
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.
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.
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.
Subscribe to:
Posts (Atom)
Blog Archive
About Me
- Stephen Tetley
- 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.