Re: SetPixel() / GetPixel() for Format64bppArgb in VB using LockBits

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



Hi folks,
Sorry I'm late to the party but I'm actually sitting in a tent in western
France - ostensibly on holiday :-)) -

I see from the thread that most of the problems are solved, the only
question really is why duplicate such horrible behaviour as GetPixel and
SetPixel. As you know by now, these lock the bitmap, change the data and
then unlock it. This is horribly inefficient.

A performance boost can probably be had if you only lock the one pixel of
the bitmap by providing the rectangle such as new Rectangle(x,y,1,1). This
might save you from having to lock a couple of megabytes fro one lousy
pixel.

ciao!

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



"pamela fluente" <pamelafluente@xxxxxxxxx> wrote in message
news:1156239912.246600.84140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi dears,

I need an exact replacement of SetPixel() and GetPixel() functions
(VB.NET),
only for the specific format PixelFormat.Format64bppArgb, using
LockBits.

I have already browsed Bob's site, but I am too unfamiliar with this
stuff to attempt to produce myself these 2 functions.

I need those. Any help would be much appreciate. Thank you very much.

-Pam



.



Relevant Pages

  • Re: Custom Zoom & Performance
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... the scaled pixel ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Printing graphics/text that span multiple pages
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... You need to figure out how many pages you need and then render your ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Hotspots in graphic
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > What is the best way to draw that image on the screen? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Hotspots in graphic
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > What is the best way to draw that image on the screen? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Drawing backgeound image slows down form performance
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > I have a windows form application that draws the background with a color ...
    (microsoft.public.dotnet.framework.drawing)