Author Topic: Image Alpha + Transparency  (Read 4384 times)

jep

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 421
    • View Profile
Image Alpha + Transparency
« on: 2011.06.14, 14:00:03 »
Hello,

I've written a simple C++ class to take care of displaying images that contain transparency and/or alpha with the help of GBM by Heiko Nitzsche. I've also tried to make it more robust and forgiving than the examples I've seen elsewhere, so that it can handle situations/configurations where e.g. transparency support isn't available (SVGA graphics driver).

I've borrowed one of the images that come with the screen saver that display a nice clock made by Doodle.

I do however need your help with the provided example to:
a) Get smoother edges as compared to if you remove // in front of the line MeterImage.mapTransparancy2Color( CLR_PALEGRAY );
b) Reduce memory consumption as the code has to be rewritten to take care of it better.
c) A function to allow it to drawAt( HPS hps, int x, int y )
d) Allow it to share bitmaps to mix several images together
...

Your help is greatly appreciated
//Jan-Erik

Compiler: OpenWatcom
Linker:
Lib-directories: ?:\...\GBM\lib.wat
Libraries: gbm.lib,gbmmem.lib,gbmscale.lib
C++ compiler:
Inlude-directories: ...;?:\...\gbmos2

jep

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 421
    • View Profile
Re: Image Alpha + Transparency
« Reply #1 on: 2011.07.05, 11:29:06 »
6 of you have tried it... any hint on how to adjust it (near line 450 perhaps) so that it look better?!
« Last Edit: 2011.07.08, 15:48:26 by jep »