Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'memory.': 0.07; 'nested': 0.07; 'subject:file': 0.07; 'blue': 0.09; 'pil': 0.09; 'subject:into': 0.09; 'cc:addr:python-list': 0.11; 'subject:Help': 0.11; '(excluding': 0.16; '1024)': 0.16; 'data)': 0.16; 'subject:array': 0.16; 'pfxlen:0': 0.19; 'cc:addr:python.org': 0.22; 'load': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'array': 0.29; 'waste': 0.30; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; 'subject:with': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'list': 0.37; 'called': 0.40; 'read': 0.60; 'length': 0.61; 'taking': 0.65; 'to:addr:gmail.com': 0.65; '(ie': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=8McamYdjo9WHa7bg2lekPEmU6TBaFoHvyDE1CWndNZU=; b=iUBBUL7frFHDoP9hejEUA5tTInjf4wE4XUjHL38LAmTvtfhqCQ1syb9VaakpnmFLat hFoOCoIseiPffQ+HGBZKPt10I9YV5Z/bNBZByexodGcXE42FZ7Gl9V7vEzdqtTMwLwCY LMPt/y6dM54WmPEP51fm1uuRwURvsU5jZbHm7zq2J878k6qptRWDNi3dGjj+cVHsrUc2 GSUFTiFUHLIfpNlFYd8EUwNKeFxKRZwErUdPTgT26xxaT3XPmBCCdPTFfzEXquYeVgDF 7NC8SyittXoimEgL5S3ojwXTfSUV59E/9VaAkY1YGR0kBBA1YjJnpQ3N6PGXdB7RTHls iyMA== MIME-Version: 1.0 X-Received: by 10.229.135.10 with SMTP id l10mr6967306qct.82.1367739801461; Sun, 05 May 2013 00:43:21 -0700 (PDT) In-Reply-To: References: Date: Sun, 5 May 2013 08:43:21 +0100 Subject: Re: Help with loading file into an array From: =?ISO-8859-1?Q?F=E1bio_Santos?= To: peter berrett Content-Type: multipart/alternative; boundary=00248c7690aa030f1804dbf3bd16 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367740305 news.xs4all.nl 15919 [2001:888:2000:d::a6]:49940 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44728 --00248c7690aa030f1804dbf3bd16 Content-Type: text/plain; charset=ISO-8859-1 Using a nested array should waste a lot of memory. I think you should use PIL to load and read the image. > > I want to read the data from that gif file taking the red data (excluding the green and blue data) and store that in an array called Image[][] which is a nested array length 1024 with a list in each item of 1024 length (ie 1024 x 1024) > --00248c7690aa030f1804dbf3bd16 Content-Type: text/html; charset=ISO-8859-1

Using a nested array should waste a lot of memory. I think you should use PIL to load and read the image.

>
> I want to read the data from that gif file taking the red data (excluding the green and blue data) and store that in an array called Image[][] which is a nested array length 1024 with a list in each item of 1024 length (ie 1024 x 1024)
>

--00248c7690aa030f1804dbf3bd16--