Click here to Skip to main content
15,888,286 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: (DirectDraw)How to set the color key of an overlay surface(YUY2 16bits)? Pin
linhui4-Dec-08 14:52
linhui4-Dec-08 14:52 
QuestionCalculating Homography Pin
VincentOng2-Dec-08 23:51
VincentOng2-Dec-08 23:51 
Questionthis.webBrowser1.Document.Body.InnerHtml +=@"&lt br/ &gt" not working Pin
Manish Majithia2-Dec-08 2:41
Manish Majithia2-Dec-08 2:41 
Question[wxWidgets] Managing on click mouse event Pin
EternallyConfuzzled1-Dec-08 6:24
EternallyConfuzzled1-Dec-08 6:24 
QuestionGraph layout [OK] Pin
ventomito26-Nov-08 8:05
ventomito26-Nov-08 8:05 
AnswerRe: Graph layout Pin
Drew Stainton30-Dec-08 11:49
Drew Stainton30-Dec-08 11:49 
GeneralRe: Graph layout Pin
ventomito7-Jan-09 9:39
ventomito7-Jan-09 9:39 
Question¿Quién sabe? alphablending 2 bitmaps Pin
Chesnokov Yuriy26-Nov-08 2:00
professionalChesnokov Yuriy26-Nov-08 2:00 
There 2 32bpp bitmaps with some images:

bitmap1
bitmap2

and graphics object g1 created from bitmap1

I set individualy alpha values in bitmap2 using LockBits:

C++
Gdiplus::BitmapData bitmapData;
Gdiplus::Status s = pBitmap->LockBits(&Gdiplus::Rect(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()),
                                      Gdiplus::ImageLockModeWrite | Gdiplus::ImageLockModeRead,
                                      PixelFormat32bppRGB, &bitmapData);
if (s == Gdiplus::Ok) {
        unsigned int* pPixels = (unsigned int *)bitmapData.Scan0;
        for (unsigned int i = 0; i < bitmapData.Height; i++) {
                for (unsigned int j = 0; j < bitmapData.Width; j++) {
                        if (mask(i, j) > 0)
                                pPixels[j] &= 0xFFFFFFFF;
                        else
                                pPixels[j] = 0x00FFFFFF;
                }
                pPixels += bitmapData.Stride / 4;
        }
        pBitmap->UnlockBits(&bitmapData);
}


And then draw it on bitmap1 using g1. But the alpha blending does not happen?


chesnokov

AnswerRe: ¿Quién sabe? alphablending 2 bitmaps Pin
Mark Salsbery26-Nov-08 5:43
Mark Salsbery26-Nov-08 5:43 
AnswerRe: ¿Quién sabe? alphablending 2 bitmaps Pin
Chesnokov Yuriy26-Nov-08 19:50
professionalChesnokov Yuriy26-Nov-08 19:50 
QuestionSome problems with DirectSound library Pin
andrei_b25-Nov-08 4:50
andrei_b25-Nov-08 4:50 
AnswerRe: Some problems with DirectSound library Pin
Mark Salsbery25-Nov-08 9:16
Mark Salsbery25-Nov-08 9:16 
Questionhelp! usb camera filter Driver Pin
hongqibudao24-Nov-08 14:29
hongqibudao24-Nov-08 14:29 
AnswerRe: help! usb camera filter Driver Pin
Smithers-Jones14-Jan-09 23:13
Smithers-Jones14-Jan-09 23:13 
QuestionIs there an easy way to record and modify whole screen before output? Pin
chenfu23-Nov-08 20:18
chenfu23-Nov-08 20:18 
Questionproblem of Rendering mesh with texture in DirectX 9.0 Pin
Md. Ali Naser Khan23-Nov-08 2:14
Md. Ali Naser Khan23-Nov-08 2:14 
QuestionExtract Alpha from .png Pin
Xmen Real 21-Nov-08 5:29
professional Xmen Real 21-Nov-08 5:29 
QuestionZooming bitmap like Paint Pin
jgershonw119-Nov-08 20:31
jgershonw119-Nov-08 20:31 
AnswerRe: Zooming bitmap like Paint Pin
Alan Balkany20-Nov-08 3:23
Alan Balkany20-Nov-08 3:23 
GeneralRe: Zooming bitmap like Paint Pin
jgershonw120-Nov-08 7:17
jgershonw120-Nov-08 7:17 
GeneralRe: Zooming bitmap like Paint Pin
jgershonw120-Nov-08 7:40
jgershonw120-Nov-08 7:40 
AnswerRe: Zooming bitmap like Paint Pin
Randor 20-Nov-08 4:39
professional Randor 20-Nov-08 4:39 
QuestionHow to create gif file from bmp using GDI+ Pin
sandeepkavade19-Nov-08 18:56
sandeepkavade19-Nov-08 18:56 
QuestionHow to manage data from Directshow filter? Pin
Van Ly Doc Hanh19-Nov-08 7:11
Van Ly Doc Hanh19-Nov-08 7:11 
AnswerRe: How to manage data from Directshow filter? Pin
Mark Salsbery21-Nov-08 6:01
Mark Salsbery21-Nov-08 6:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.