AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

combining images ... and lock-unlock

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

combining images ... and lock-unlock

Postby mbonamusa » Mon Feb 23, 2009 10:58 am

Hello again,
I have three images (640x480) and I want to put them in one bitmap (640x1440). Is it possible with Aforge?

Another question. I'll see in your c# examples that sometimes you use lock-unlock bits to apply filters and sometimes not. I've not discovered the diference between using lock-unlock bits and not. Can you help me?

Best Regards
mbonamusa
 
Posts: 12
Joined: Fri Feb 20, 2009 1:43 pm

Re: combining images ... and lock-unlock

Postby andrew.kirillov » Mon Feb 23, 2009 12:34 pm

Hello,

mbonamusa wrote:I have three images (640x480) and I want to put them in one bitmap (640x1440). Is it possible with Aforge?


Well, there is not such routine in AForge.NET Framework. But actually you don't AForge.NET for this. You may just use .NET Framework native routines. Just create a big image, then create Graphics object using Graphics.FromImage() method and then paint your smaller images to the big one.

mbonamusa wrote:Another question. I'll see in your c# examples that sometimes you use lock-unlock bits to apply filters and sometimes not. I've not discovered the diference between using lock-unlock bits and not. Can you help me?


There is performance difference. Not a huge, but there may be a bit. Especially if you need to process a lot of images, like video processing. The preliminary locking of image may be useful only in the case when you apply sequence of filters to the same image using ApplyInPlace method, for example. The idea is to lock image once, then perform set of image processing routines on it and finally unlock it.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to AForge.NET Framework

cron