Here i use BitBlt(destDC,x,y,w,h,srcDC,x,y,SRCCOPY) to copy srcDC into
destDC.
i think GetPixel(destDC,x,y) can get the Pixel info at Point(x,y).
and my question is :
can i get bytes info from destDC directly ?
because i think get bytes directly is faster than GetPixel()'s way.
why do i bring out this question?
i have read a msdn help 'How to save a true color bitmap into a Gif file'
which tells me how to get the pixelinfo and save the bitmap into a gif
file.And the help says while doing pixels processing,the LockBits() method
is more efficient than GetPixel()'s way.
so i think whether there is a way to get bytes info from DC directly like
LockBits() do.
Niki Estner - 18 Apr 2004 18:34 GMT
I'm not sure if I got your question right, I think this has nothing to do
with the .net-framework:
If you want to get the raw pixels of a plain GDI DC (no
GDI+-Graphics-object), you have to create a memory DC, put a memory-bitmap
in it, bitblt from your DC into the memory DC, and use GetDIBits to get the
raw data from that memory-bitmap.
Life is a lot easier with GDI+.
You might consider using the unmanaged GDI+-headers...
Niki
> Here i use BitBlt(destDC,x,y,w,h,srcDC,x,y,SRCCOPY) to copy srcDC into
> destDC.
[quoted text clipped - 14 lines]
> so i think whether there is a way to get bytes info from DC directly like
> LockBits() do.