Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / April 2004

Tip: Looking for answers? Try searching our database.

can i get bytes info from DC directly ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
?????????? - 18 Apr 2004 13:17 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.