Re: I used to use VB but...
- From: "Michael C" <mike@xxxxxxxxxx>
- Date: Wed, 21 Nov 2007 17:10:06 +1100
"Mike Williams" <mikea@xxxxxxxxxxxxxxxxx> wrote in message
news:eDsi0PALIHA.4228@xxxxxxxxxxxxxxxxxxxxxxx
You can do it pretty fast in VB6 using GetDIBits to dump it into an array
and working on the array, and you can do it even faster still by getting
the address of the existing bitmap in memory and pointing a SAFEARRAY
structure at it so that you are working directly on the bitmap data in
memory without needing to move it anywhere.
Using the latter method in VB6 I can (for example) modify either the R, G
or B component of a 1024 x 768 pixel 24 bit bitmap on a pixel by pixel
basis in about 27 milliseconds on my fairly standard (and slow by today's
standards) AMD 2.2Ghz machine. That's almost 40 such bitmaps per second,
or about 28 megapixels per second. What sort of "pixel by pixel" speed
are you talking about in Dot net?
I haven't got an exact speed but will give it a try. With C# at least (not
vb.net) you can do pointer manipulation directly so I believe you will get
similar speed to C++. With VB6 and GetDIBits you are doing a copy of the
bitmap (according to help on GetDIBits) so C# should be around twice as
fast.
Michael
.
- Follow-Ups:
- Re: I used to use VB but...
- From: Ralph
- Re: I used to use VB but...
- From: Mike Williams
- Re: I used to use VB but...
- References:
- I used to use VB but...
- From: david . smith
- Re: I used to use VB but...
- From: Bob Butler
- Re: I used to use VB but...
- From: Michael C
- Re: I used to use VB but...
- From: Karl E. Peterson
- Re: I used to use VB but...
- From: Michael C
- Re: I used to use VB but...
- From: Karl E. Peterson
- Re: I used to use VB but...
- From: Michael C
- Re: I used to use VB but...
- From: Mike Williams
- I used to use VB but...
- Prev by Date: Re: I used to use VB but...
- Next by Date: Re: I used to use VB but...
- Previous by thread: Re: I used to use VB but...
- Next by thread: Re: I used to use VB but...
- Index(es):
Relevant Pages
|