Hello all!

I'm searching for an image library that can work with huge (TIF,JPG,BMP) images in width & height.
Width and height will be about 20000x15000. I've tried to use CxImage library (I'm working on Windows), but it is based on libtiff (actually as most of other libraries). And when I'm trying to open a TIF file 20000x15000, libtiff is trying to MALLOC (20000*15000*4) bytes! This can be done only on the Mainframe though! =\ I don't need whole image at once! Actually I want to open a part of the image and work with it! For example, ACDSEE opens this image almost right after I doubleclick it...

And one more thing, the library must be written in C++ and must have source codes.

Is there such a library ? Please help if you are able to, my work is being burnt...

PS> I have no time to write my own library...

Thanks in advance!
Posted on 2005-08-26 10:40:25 by xor_eax
maybe try freeimage
freeimage.sf.net
Posted on 2005-08-26 13:02:04 by comrade

maybe try freeimage
freeimage.sf.net

Thanks for the answer, but unfortunately, FreeImage is also based on libTIFF. PluginTIFF.cpp maintains the same code as in CxImage library:

uint32 *raster = (uint32*)_TIFFmalloc(width * height * sizeof(uint32));
if (raster == NULL)
throw "No space for raster buffer";
// read the image in one chunk into an RGBA array
if (!TIFFReadRGBAImage(tif, width, height, raster, 0)) {
// blablabla.....


i.e. also tries to allocate whole raster at once... :(
Posted on 2005-08-26 13:25:37 by xor_eax

And one more thing, the library must be written in C++ and must have source codes. (and must not require source code distribution).
...
PS> I have no time to write my own library...

You sound like somewhat of a freeloader :)

What kind of work do you need to do on the images?
Posted on 2005-08-26 15:48:06 by f0dder


And one more thing, the library must be written in C++ and must have source codes. (and must not require source code distribution).
...
PS> I have no time to write my own library...

You sound like somewhat of a freeloader :)

No criminal, I'm just trying to find what I need. I'm bored, all libraries use libtiff :(.

What kind of work do you need to do on the images?

political secret :) Actually, that's not important here, I do need nothing special.
Posted on 2005-08-26 16:21:35 by xor_eax
Well, knowing what kind of work you need will help us finding a decent solution.
Posted on 2005-08-26 16:46:12 by f0dder

Well, knowing what kind of work you need will help us finding a decent solution.

Everything that I need is to get a certain bitmap part of that image, and also bicubic image resampling implementaion.

ps> good site, especially cr*ck me section :]
Posted on 2005-08-26 16:55:59 by xor_eax
well, if it something as simple as TIFF< you can make it ursefl
Posted on 2005-08-26 17:21:29 by comrade
hi!

what i propose only works if you have access to the raw .BMP versions.

why not code a trivial image splitter that operates on the disk image file, for example it splits the image into 4, 16 or 64 smaller images that you can open more easily?

(youll need a trivial tool that re-assemble the big disk file)

ok its quite cheap, and width and height must be divisible by , say, 64...

why not then, a trivial tool that "extracts" on disk (even to .RAW) just one small rectangle of the file from given (x1,y1)-(x2,y2),
and a tool that re-injects it...

since when you open a file you dont necessarly need to malloc the whole size...


just my first idea...

bye!
Posted on 2005-08-27 19:44:22 by HeLLoWorld

hi!

what i propose only works if you have access to the raw .BMP versions.

why not code a trivial image splitter that operates on the disk image file, for example it splits the image into 4, 16 or 64 smaller images that you can open more easily?

(youll need a trivial tool that re-assemble the big disk file)

ok its quite cheap, and width and height must be divisible by , say, 64...

why not then, a trivial tool that "extracts" on disk (even to .RAW) just one small rectangle of the file from given (x1,y1)-(x2,y2),
and a tool that re-injects it...

since when you open a file you dont necessarly need to malloc the whole size...


just my first idea...

bye!


Thank for the reply,
actually I was already thinking about that, but how I will do resampling of the whole initial image ?
I need to shrink it to the defined size... That's what stops me :(
I'm feeling I have to write my own code, there's no such a library.
Posted on 2005-08-28 01:21:42 by xor_eax

actually I was already thinking about that, but how I will do resampling of the whole initial image ?
I need to shrink it to the defined size... That's what stops me :(
I'm feeling I have to write my own code, there's no such a library.

Ahh, I'm an idiot. I've tried to shrink the whole image separately (split the whole one and then shrink each part) and it works perfectly! Will continue thinking in that way! :)
Posted on 2005-08-28 01:32:29 by xor_eax

Ahh, I'm an idiot. I've tried to shrink the whole image separately (split the whole one and then shrink each part) and it works perfectly! Will continue thinking in that way!

That should work pretty well, but you'll probably have to do some adjustments to your shrinking routine to avoid artifacts? Or perhaps this isn't visible?
Posted on 2005-08-28 11:13:52 by f0dder


Ahh, I'm an idiot. I've tried to shrink the whole image separately (split the whole one and then shrink each part) and it works perfectly! Will continue thinking in that way!

That should work pretty well, but you'll probably have to do some adjustments to your shrinking routine to avoid artifacts? Or perhaps this isn't visible?

yea, at first I thought that there will be some artifacts, but I don't see them though
Posted on 2005-08-28 11:29:57 by xor_eax
they might be there but not spottable by a mere human like you or me - but nice if you've got the stuff working :)
Posted on 2005-08-28 11:43:20 by f0dder

they might be there but not spottable by a mere human like you or me - but nice if you've got the stuff working :)


thank you :)
Posted on 2005-08-28 11:49:17 by xor_eax
if the sizes are power-of-two, you wont get any artifacts by shrinking the pic by powers-of-two, its basically just averaging 4 pixels into one, each time...

... but you only need the resizing if you want a preview, it wont affect the original(nor the modified) image, the possibly-artifacted preview is just useful to decide which small rectangle you want to extract to work on it...

(but yes, to make a preview you must first split-and-shrink...)

(im not sure i succeded in making you understand the original idea)

good luck. (btw, if you ve got gigantic non-raw images, say, JPG, well... cant think of a solution except code your decoder...)

Posted on 2005-08-28 22:14:58 by HeLLoWorld