views:

203

answers:

2

I want to create large image by C#. (i have some photos with large size (4800 * 4800). i want to merge these photos.)

I use Bitmap but don't support. (Error : Invalid Parameter)

+1  A: 

Some code would be useful ...

... However, to hazard an educated guess, I suspect you're trying to create an instance of Bitmap with either Width or Height (or both) greater than 2^15.

Essentially, you can't - the .NET bitmap classes have a limitation on how big an image they can handle. Your original 4800 pixel square images won't be a problem, but going over 32,767 pixels will be.

Bevan
But it *will* be a problem even with "smaller" bitmaps. A 4800^2 bitmap requires 88Mb of *contigous* memory. Juggling around several of those simultaneously may cause an out of memory exception.
danbystrom
That's true - I've written a couple of image processing toys that ran out of memory because of naive assumptions on my part. They didn't fail with an "Invalid Parameter" error though, so I didn't think it relevant to the original question. You make a good point though - trying to load and process too many 4800x4800 images will blow out memory consumption, especially if very many copies are kept around.
Bevan
A: 

Hi, you might like to check AForge.NET, it has a large image processor built in, and it's open source.

Kieron
Thanks. but my country (Iran) can't Access to "code.google.com". Google don't Allow us.
Modir