Re: DirectDraw overlays and color key range?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: JahMic (jahmic_at_HotPOP.com)
Date: 04/20/04


Date: 20 Apr 2004 04:35:04 -0700


...
> box: on my GF4400 card, the RGB565 overlay could not be created, so I had to
> use a UYVY one. This also brought on the challenge of converting the DX logo
> bitmap from RGB to YUV, but it's not a big deal.
>
> If required I can post actual code that can be compiled.

Actually, I'd like to see this code. Complete code not necessary,
but, at least, where you convert the bitmap and create the overlay.

Thanks, J

"Marton Anka" <marton@03am.com> wrote in message news:<Od5o7AoEEHA.580@TK2MSFTNGP11.phx.gbl>...
> Hello,
>
> I'm trying to implement an overlay where the color key would be a color
> range (such as RGB(0, 0, 0,) to RGB(10, 10, 10)) instead of a single color.
>
> Is this possible? Instead of doing this:
>
> g_OverlayFX.dckDestColorkey.dwColorSpaceLowValue =
> DDColorMatch(g_pDDSPrimary, RGB(255, 0, 255));
> g_OverlayFX.dckDestColorkey.dwColorSpaceHighValue =
> DDColorMatch(g_pDDSPrimary, RGB(255, 0, 255));
>
> I'd like to do something like this:
>
> g_OverlayFX.dckDestColorkey.dwColorSpaceLowValue =
> DDColorMatch(g_pDDSPrimary, RGB(0, 0, 0));
> g_OverlayFX.dckDestColorkey.dwColorSpaceHighValue =
> DDColorMatch(g_pDDSPrimary, RGB(255, 255, 255));
>
> I've downloaded the DX7 sdk for the DDOVERLAY sample. It's available at:
> http://www.microsoft.com/downloads/details.aspx?FamilyId=3FAE2DBE-1D47-4F03-97D3-3274BFF70E8D&displaylang=en
>
> After a few quick patches to get the sample to compile with the DX9 SDK
> (mostly what's needed is replacing V7-specific interfaces and structures
> with the generic counterparts) it works if both the low and the high color
> spaces are the same. If I specify a range, however, the overlay is not
> displayed. (It probably is, it just cannot be seen.)
>
> Also note that the DDOVERLAY sample did not work for me right out of the
> box: on my GF4400 card, the RGB565 overlay could not be created, so I had to
> use a UYVY one. This also brought on the challenge of converting the DX logo
> bitmap from RGB to YUV, but it's not a big deal.
>
> If required I can post actual code that can be compiled.
>
> Thanks in advance!



Relevant Pages

  • Re: ? O-ishT: Designing an About Box
    ... I also put the logo for Flash and things like that. ... I have a button that pops up a dialog with all the DLLs my program loads and finds and the version and location on disk of the DLL. ... Text is drawn onto the top of the bitmap including copyright and version information from the VERSIONINFO. ... I thoroughly expect to sell millions of copies to people who will be able to amuse themselves for hours on end without ever opening a document window! ...
    (microsoft.public.vc.mfc)
  • Re: to Cut a file in 2 parts
    ... Imagine an other BMP with a face: ... I want to modify bmp with no software for pictures ... an can rebuild the " RGB RGB... ... Do the modification directly in the original bitmap file. ...
    (alt.lang.asm)
  • Re: to Cut a file in 2 parts
    ... A bmp use an header, ... an can rebuild the " RGB RGB... ... Do the modification directly in the original bitmap file. ... If your bitmap has a different header size, modify ...
    (alt.lang.asm)
  • Re: Raw RGB pixel data into a bitmap
    ... Since a bitmap is aligned on an unsigned integer boundary you need to ... or bitfield array of 3 unsigned integers if your image uses RGB masks. ... I first tried converting the byte array to a memorystream, ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Building a bitmap and displying it
    ... This is how I deal with the bitmap. ... Or maybe there is another way to display an RGB ... Can you please tell me how you are setting the picture to the picturebox ... I have the stream from the camera and I know ...
    (microsoft.public.win32.programmer.gdi)