Re: Efficient visualization of pixmaps

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



Peter Duniho wrote:
On Fri, 17 Jul 2009 18:42:35 -0700, Jon Harrop <jon@xxxxxxxxxxxxxxxxx>
wrote:
The ray tracing aspect is certainly demanding but it requires a huge
amount
of computation just to get the color of a single pixel. Hence I was
amazed
to see that Microsoft's pixel setting routines were the bottleneck of my
entire app. [...]

How are you trying to set the pixel? Are you using the Bitmap.SetPixel()
method?

I was, yes.

If so, then sure...that's very slow. So, don't do that.

Again, without a code example it's impossible to provide any good,
specific advice. But, most likely what you need to be doing is getting a
buffer of the bitmap data and accessing it directly. Your own code not
only has enough information to do that best without having to go through
all the same machinations that Bitmap.SetPixel() does, you avoid
unnecessary transitions between your client code and the OS's lower
layers.

That can achieve 15fps here. Unless there is anything better, that will have
to do.

Stop blaming the tools, just because you don't yet know all the best ways
to use them. I doubt that it is literally impossible for you to rendering
the results of your ray-tracing as quickly as you're able to compute them.

I can do it with XNA, just not with WinForms or WPF. Apparently Silverlight
is much worse still...

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u
.



Relevant Pages

  • Re: resizing JPEGs (with Img and photo image)
    ... variable for the amount to expand by.... ... # check coef ... # weight each initial pixel by cx & cy ... satellite imagery superimposed over ...
    (comp.lang.tcl)
  • Re: Calculating Area of Scanned Image
    ... the fact that a pixel is red or any other colour doesn't affect ... the file size - every pixel has the same amount of colour information and it ... > For example, if I were to draw circles on a sheet of paper, scan the paper ... is there a way to find out the area on the screen that the red paint ...
    (microsoft.public.excel.misc)
  • =?iso-8859-1?Q?Re:_=5BNMZ=5DSch=FClerzirkus?=
    ... Amount: 150% ... Radius: 0,3 Pixel ... Nun hast Du eine moderate Nachschärfung, ohne aber das Rauschen im Bild zu verstärken und ohne starke Schärfungstreppchen oder Artefakte. ...
    (de.rec.fotografie)
  • Re: Efficient visualization of pixmaps
    ... of computation just to get the color of a single pixel. ... to see that Microsoft's pixel setting routines were the bottleneck of my ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Expanding all the boundaries in width and height.
    ... all I need is to replace every pixel in the input ... image with a circle of pixels with radius d (the amount of increase ...
    (comp.graphics.apps.gimp)