Michel Fortin wrote: > I played with it yesterday and never found why the blue channel > didn't work!
Yeah, I noticed that too after posting it. Here's the problem: this(int a, int b, int c) { r = cast(ubyte) a; g = cast(ubyte) b; b = cast(ubyte) c; } Those quick one letter variable names in a barely necessary constructor ended up shadowing each other - that last line wrote to the local parameter instead of to the struct member like I meant... Stupid me. Make it this.b = ... and it works. > I also made a working OS X implementation (Cocoa). Cool! > Can't we make things flexible enough for [different colorspaces] > by using a template? Yeah, probably. > I'd like it better if image.display(win) was replaced with > "window.image = image" however. Hmm, maybe. I'm thinking image.display(win) could be some kind of rendering function that then calls out to bitblt or whatever to draw in any location though, offering some flexibility that the property wouldn't provide. So it's more like image.drawAt(drawable_surface, x, y); Where the drawable_surface could be a window or another image, and the image renders itself to that destination. Default parameters would tell it to assume upper left of a new window, keeping the simple display() call just working.