[Mono-dev] Bitmap manipulation - am I doing it right?
stifu at free.fr
Wed Apr 1 10:34:42 EDT 2009
Yes, I do mean the Clone method.
And that's what I was asking you: how do you mean a copy of the relevant
image part? When doing searches on that, I saw people advised the use of the
Clone method to achieve it.
And yes, I'm using Graphics.DrawImage.
By the way, I already use LockBits to create the Bitmaps (through an unsafe
Bitmap class), but that's another matter altogether, it doesn't affect how I
render them on screen.
Anyway, it looks like I'll simply be able to drop all my Cloning and go for
alpha blending instead, which will hopefully work the way I want it and be
Andreas Nahr wrote:
> I don't know what you mean by "Clone" (I hope you don't meant the "Clone"
> Method, you shouldn't use this).
> Just make a copy of the relevant image part. If this is slower than making
> a Clone of the entire bitmap object you are doing something VERY wrong
> indeed. You are using Graphics.DrawImage for the copying, right?
> You could also use LockBits which is even faster, but that is unsafe and
> substantially more work.
> -----Ursprüngliche Nachricht-----
> Von: mono-devel-list-bounces at lists.ximian.com
> [mailto:mono-devel-list-bounces at lists.ximian.com] Im Auftrag von Stifu
> Gesendet: Dienstag, 31. März 2009 23:12
> An: mono-devel-list at lists.ximian.com
> Betreff: Re: [Mono-dev] Bitmap manipulation - am I doing it right?
> 2) How would you do this, technically? Because the only solution that
> to my mind is to clone a little part of my Bitmap to create the temporary
> copy... and making a sub-sized clone of a Bitmap is actually much slower
> than making a full clone. So it'd be actually slower than my current
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
View this message in context: http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p22827896.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list