GetPixelRGB from bitmap : how to ?
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
Date: Fri, 26 Mar 2004 12:20:25 +0100
Hi all ,
I have created an application that capture the Screen with CreateDC().
Now I must get rgb (COLORREF) of all pixel .
With :
getRGB(hdc,xpos,ypos)
It's very very slow .
4sec for 640x480 image pixel :
I don't know the reason but it's too slow .
Any workaround for speed up this routine ?
I have think that if a create a Bitmap and using BitBlt
I can speed up the routine .
But the question is :
in wich way i can get the COLORREF of every pixel in BITMAP ?
tnx all !
c.l.
Relevant Pages
- Re: Get Window Pixel
... Otherwise, to capture an entire screen, see my essay on my MVP TIps site on doing screen ... You can omit the steps that manipulate the clipboard. ... I have a pixel on the screen that I'm trying to obtain the color. ... I've tried many ways to obtain the pixel, but I cannot attain the COLORREF ... (microsoft.public.vc.mfc) - =?iso-8859-1?Q?Re:_CopyFromScreen_Bitmap_als_Bild_speichern_und_Gr=F6=DFe?= =?iso-8859
... wenn du mit der Auflösung festlegst, dass in einem Zoll 96 Pixel darzustellen sind, dann belegen 200 Pixel etwa 55 mm. ... Dim bmp As Bitmap = New Bitmap ... g.DrawImage(bmp, 0, 0, breite, hoehe) ... Wie Du erkennen kannst ist die Linke Grafik nur noch halb so breit wie die Obere, ... (microsoft.public.de.german.entwickler.dotnet.vb) - Re: count colors in bitmap
... But on my own two machines your code DOES crash on a 1024 x 768 bitmap! ... And it also DOES crashes on a 3200 x 2400 pixel bitmap. ... Why don't you just believe me, and check things out further yourself, perhaps on the machines of other people you might know, specifically on machines that might be differently configured and running different vesions of the OS than your own. ... Private Declare Function LoadImage Lib "user32" Alias _ ... (microsoft.public.vb.general.discussion) - Re: count colors in bitmap
... But on my own two machines your code DOES crash on a 1024 x 768 bitmap! ... And it also DOES crashes on a 3200 x 2400 pixel bitmap. ... on both of my own machines your app CRASHES on both a 1024 x 768 bitmap and on a 3200 x 2400 pixel bitmap. ... Private Declare Function LoadImage Lib "user32" Alias _ ... (microsoft.public.vb.general.discussion) - Re: count colors in bitmap
... But on my own two machines your code DOES crash on a 1024 x 768 bitmap! ... And it also DOES crashes on a 3200 x 2400 pixel bitmap. ... Private Declare Function LoadImage Lib "user32" Alias _ ... (microsoft.public.vb.general.discussion) |
|