On Fri, 08 Jun 2007 09:54:01 -0700, Jon Parry
<Jo******@discu ssions.microsof t.comwrote:
[...]
My question is whether letting the Picturebox do the bitmap resizing is
the
most efficient mechanism, or whether it would be preferable to perfrom
the
resizing myself before passing the modified image to the Picturebox?
Depends on what you are asking and how often the given image will be
redrawn.
You aren't likely to be able to scale the bitmap once faster than .NET.
However, if you want to be able to efficiently handle resizing or
redrawing the same image repeatedly (for example, changing the size of the
PictureBox, or dealing with other windows getting moved on top of your
PictureBox, etc.) then caching a resized version of the Bitmap and using
that for the PictureBox may be better.
Of course, that assumes that PictureBox doesn't make it's own cached
version of the original bitmap. I haven't tested that, and maybe it does.
I certainly wouldn't bother doing any caching unless I actually ran into
some sort of UI performance problem.
Pete