Re: Project Bid
- Posted by Tommy Carlier < tommy.carlier at pandora.be > Apr 10, 2004
- 542 views
I just uploaded a new version of Win32Dib (0.4.0) to my website (http://users.pandora.be/tommycarlier/eu). This new version has some features that might be useful for your project: -> translucency: drawDibToDib and drawTransDibToDib (transparent bitmap) now have an extra argument 'alpha'. This is an integer between 0 and 255. 0 means fully transparent, 255 is fully opaque, and anything in between is translucent (partially transparent). Check out the demo tiledib.exw to see the effect. -> applyDibBrightnessToDib: this new procedure is just like drawDibToDib, but it doesn't draw the source bitmap colors to the destination bitmap: it just copies its brightness/lighting. You could use this to apply a pattern to a flat-shaded bitmap. In your project, you could apply the original lighting of the wall to the new pattern. Check out the demo manip.exw: 'Apply Brightness' applies the brightness of a bitmap (containing horizontal lines) to the original bitmap. PS: EuMario: I haven't added a bit depth reducer (yet), but now there is a saveDibGray-function that saves a bitmap as an 8-bit grayscale BMP-file. The advantage: smaller file + you don't have to make the bitmap gray yourself (bitmap itself stays intact).