[comp.os.os2.programmer] Color Palletter for OS/2

huq@ocsmd.ocs.com (Ashraful Huq) (10/24/90)

Has anybody successfully used the GpiRealizeColorTable and 
GpiUnrealizeColorTable successfully. I am trying to put up a color bitmap 
(256 Colors) using OS/2 1.2 under PM. I have an 8515 with the 8514/A 
adapter and memory. I cannot seem to get the right colors. It comes close 
but not good enough. I can bring up the bitmap under DOS and the color 
are fine. 
   
Somebody has said once that the GpiReal.. have not been implemented, others 
said that it was fixed up on the CSD's. I have the latest CSD (4073) on 
OS/2 1.2 SE. Is the problem with the 8514 PM driver or there are some other 
problems. 
   
Any help would be greatly appreciated. 

cfreas@libserv1.ic.sunysb.edu (Terry Freas) (10/25/90)

In article <1100@ocsmd.ocs.com> huq@ocsmd.ocs.com (Ashraful Huq) writes:
>Has anybody successfully used the GpiRealizeColorTable and 
>GpiUnrealizeColorTable successfully. I am trying to put up a color bitmap 
>(256 Colors) using OS/2 1.2 under PM. I have an 8515 with the 8514/A 
>adapter and memory. I cannot seem to get the right colors. It comes close 
>but not good enough. I can bring up the bitmap under DOS and the color 
>are fine. 
>   
>Somebody has said once that the GpiReal.. have not been implemented, others 
>said that it was fixed up on the CSD's. I have the latest CSD (4073) on 
>OS/2 1.2 SE. Is the problem with the 8514 PM driver or there are some other 
>problems. 

I am having the same problems with a GIF viewer I'm trying to write.  It
seems that GpiRealizeColorTable is not enough for a device driver to make
the switch.  This may be wrong, but it's what I've gathered from various
articles on the subject.  Petzold mentioned in some article in PC Magazine
that OS/2 2.0 will provide either another function (set?) or driver support
for true palette switching at the board level.  From the tests I have run,
the various functions only seem to serve in setting up proper dithering
patterns based on the colors you would like to see.  With out this setup,
single pixel writes (GpiSetPel? or something) would simply apply the closest
color, but after a setup, it would somehow choose part of the dithering
pattern.  Perhaps I was just seeing things, or maybe it was a bug. :-)

-- 
oo            - I live for the day earth becomes a domain name -            oo
\/ Jeremy Wohl / wohl@max.physics.sunysb.edu / cfreas@csserv1.ic.sunysb.edu \/