TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Nick Knight
from: Dean Roddey
date: 1994-10-25 07:19:12
subject: Bitmap color question

Thanks Nick for your msg about Bitmap color question, on 21
10-21-1994

NK> How can I change the colors of a bitmap?  I can get the 
NK> colors using GpiQueryBitmapBits.  So far I haven't been 
NK> able to determine the magic required for GpiSetBitmapBits 
NK> to change the colors.  Any advice?
NK> 

There are a couple of options. If you use GpiSetBitmapBits() or
any other mechanism by which you set the bits directly, then you
are dependedent upon the color format of the data. But, if you are
setting the entire image from data, then it is probably the best.
You basically have to indicate what format your source data is in
(i.e. how are you defining a pixel's color.)

Another option is to just draw onto the bitmap. You can make the
bitmap the drawing surface of a presentation space and then just
use GpiXxxx() APIs to draw directly onto the bitmap image. This
would be a better method if it would be easier to make the
modifications by drawing them. The first version is better if you
already have some image data but just want to process it in bulk
and convert it into the bitmap format.

___
 X KWQ/2 1.2b X If at first you don't succeed, put out another version (KWQ 1.2).

--- Maximus/2 2.01wb

* Origin: Fernwood - your source for OS/2 files! (1:141/209)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 809
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.