Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8263871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:15:08+00:00 2026-06-08T04:15:08+00:00

Does anyone know how to open a large imagery file using python? I tried

  • 0

Does anyone know how to open a large imagery file using python?
I tried to open an imagery file (about 2 GB) through windows command prompt using ipython, but it crashes every time after I change image values into an array.

My laptop is window7-64bit with 4GB ram and Intel(R) Core(TM) i7-2860 QM CPU.

The error message is: python.exe has stopped working A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available

Here is my code.

import Image
import numpy as num
im=Image.open('myimage.tif')
imarray=num.array(im)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T04:15:11+00:00Added an answer on June 8, 2026 at 4:15 am

    How much RAM do you have? You’ll need quite a bit more than 2GB of RAM to store a 2-gig image. I don’t know how efficient Image is at storing images, but a list of bytes uses four bytes of space for each element in the list, so you’ll burn more than 8GB of (virtual) memory… and a lot of patience. Edit: Since you only have 4 (or 3) GB to play with, this is almost certainly your problem.

    But why are you trying to convert it to a numeric array? Use the methods of the im object returned by Image.open, as in the PIL Tutorial.

    I don’t know what you’re doing with the image, but perhaps you can do it without reading the entire image in memory, or at least without converting the entire object into a numpy array. Read it bit by bit if possible to avoid blowing up your machine: Read up on python generators, and see the Image.getdata() method, which returns your image one pixel value at a time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OS: Windows Language: C#/C/C++ Does anyone know how to open a file in Remote
Does anyone know an Open Source implementation in C# using Shared Memory pre. .NET
Does anyone know of any open-source implementations of spreadsheets in Python? What I am
Does anyone know of a good open source client document management system? Possibly using
Does anyone know any open source project or adapter for MySQL-AdWhirl? We try to
Does anyone know of an open source/free tool for converting pl/sql code to a
Does anyone know how to set the initial folder of the open project or
Does anyone know of a "similar words or keywords" algorithm available in open source
I was wondering does anyone know if its possible to open a wifi and
They seem to open in an internet explorer type window, does anyone know: How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.