I have developed subs to resample images, as well as all kinds of other things.
I deal with scanned exhibits that are typically 36" wide by whatever long. I have one that is 115 inches long.
If this is scanned at 600 dpi, I get a tif with pixel dimensions of 21000 x 69000.
I do understand the idea that the computer will have limitations, but I have a fast CAD workstation with 4 GB ram.
The code that is failing is this:
Dim temp As Bitmap = New Bitmap(nWidth, nHeight)
I have not figured out the height and width that are the maximum, but it fails when they get big.
I gave an extreme example, but it fails on images with half those dimensions too.
Is there any way to imcrease the available memory for large bitmap objects?
If not, this GDI+ stuff is proving useless for larger images, what a shame.
>I have developed subs to resample images, as well as all kinds of other things.
>I deal with scanned exhibits that are typically 36" wide by whatever long. I have one that is 115 inches long.
[quoted text clipped - 9 lines]
>
>If not, this GDI+ stuff is proving useless for larger images, what a shame.
21,000 * 69,000 = 1,449,000,000
So 1.4 billion pixels, multiplied by whatever your colour depth is.
Not really surprising it fails. Processes are limited to 2GB of
application space on 32bit Windows.
Sounds like you need a lazy-loading design, bringing in the image in
parts.
--
Philip Daniels
James Maeding - 26 Feb 2007 16:51 GMT
good point, on top of that, I tried resampling the image in Corel PP and it only let me sample to 43% and below. It
like it could not handle larger than that.
I am starting to wonder what people use for large images. Maybe there is some library that already deals with these
things. Loading partial images is tricky when resampling, as brining them back together would give wierd results at the
edges..I'll look arond.
PhilipDaniels@foo.com
|>On Sun, 25 Feb 2007 08:38:14 -0800, James Maeding
|><jmaeding@nettaxi.com> wrote:
[quoted text clipped - 21 lines]
|>Sounds like you need a lazy-loading design, bringing in the image in
|>parts.