Re: SetPixel() / GetPixel() for Format64bppArgb in VB using LockBits
- From: "pamela fluente" <pamelafluente@xxxxxxxxx>
- Date: 23 Aug 2006 14:13:05 -0700
Thanks. I didn't know that one can lock just some parts of the bitmap.
So you mean if one has to set 1 pixel, just lock 1 pixel? Then one
might
naturally ask, WHY then is the gdi method get/set so slow. Couldn't
just they
do the same?? Or we are missing something here...
Perhaps it's to give us topics to discuss on!
Happy camping!
-P
PS
Do you carry the ps also under the tent :) ?
Bob Powell [MVP] ha scritto:
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
.
- References:
- SetPixel() / GetPixel() for Format64bppArgb in VB using LockBits
- From: pamela fluente
- Re: SetPixel() / GetPixel() for Format64bppArgb in VB using LockBits
- From: Bob Powell [MVP]
- SetPixel() / GetPixel() for Format64bppArgb in VB using LockBits
- Prev by Date: Re: Mouse wheel
- Next by Date: Re: Mouse wheel
- Previous by thread: Re: SetPixel() / GetPixel() for Format64bppArgb in VB using LockBits
- Next by thread: using CMYK colors - is it possible?
- Index(es):
Relevant Pages
|