dimin / panojs

PanoJS3 is pure JavaScript tiled viewer for massive images
www.dimin.net/software/panojs
185 stars 31 forks source link

tilemaker.py runs out of memory #5

Open aewallin opened 12 years ago

aewallin commented 12 years ago

I've created a PNG file which is 20480x20480 pixels, i.e. 400 Mpixels. It is mostly black so takes only 3Mb of disk-space. However on a machine with 2Gb RAM tilemaker.py fails to open the file and produce tiles - because it runs out of memory.

Are there some tricks to process this file on a 2Gb RAM machine?

How much RAM would I need?

dimin commented 12 years ago

Hi,

I'm not sure how tilemaker exactly does it, since I didn't write it. It uses PIL and might not be most efficiently written. You could try my imgcnv to get that done: http://bioimage.ucsb.edu/downloads/BioImage%20Convert Although it's memory hungry as well, in the case you are describing of one large PNG file it would need 1.2GB for original image data + approximately 33% for image pyramid. So 2GB really stretching it...

The cheapest solution is simply add more memory:) The programmatic trick would be to write lower level code using PNG decoder where you would be reading lines off of the file and getting stripes with necessary width braking that into tiles and then reading next stripe. A lot of boring work for very specific problem.

Dmitry

On Mon, Dec 12, 2011 at 03:42, Anders Wallin reply@reply.github.com wrote:

I've created a PNG file which is 20480x20480 pixels, i.e. 400 Mpixels. It is mostly black so takes only 3Mb of disk-space. However on a machine with 2Gb RAM tilemaker.py fails to open the file and produce tiles - because it runs out of memory.

Are there some tricks to process this file on a 2Gb RAM machine?

How much RAM would I need?


Reply to this email directly or view it on GitHub: https://github.com/dimin/panojs/issues/5


Dmitry Fedorov Levit   dima@dimin.net http://www.dimin.net/ Skype: dima_fedorov Google: fedorov


Center for Bio-Image Informatics:   http://www.bioimage.ucsb.edu/

Vision Research Lab, Electrical and Computer Engineering Image Registration:   http://vision.ece.ucsb.edu/   http://vision.ece.ucsb.edu/registration/demo/   http://regima.dpi.inpe.br/

University of California, Santa Barbara


DIMIN Viewer n5:   http://www.dimin.net/software/viewer/


mojoaxel commented 8 years ago

+1 Same Problem here. Even my 32GByte RAM can not handle big images.