Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tilemaker.py runs out of memory #5

Open
aewallin opened this issue Dec 12, 2011 · 2 comments
Open

tilemaker.py runs out of memory #5

aewallin opened this issue Dec 12, 2011 · 2 comments

Comments

@aewallin
Copy link

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
Copy link
Owner

dimin commented Jan 11, 2012

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:
#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
Copy link

mojoaxel commented Jan 2, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants