Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88021
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!81.171.88.16.MISMATCH!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <gherron@digipen.edu> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.045 |
| X-Spam-Evidence | '*H*': 0.91; '*S*': 0.00; 'python3': 0.07; 'subject:missing': 0.07; 'pil': 0.09; 'python': 0.11; 'missing?': 0.16; 'subject:PIL': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'header:In- Reply-To:1': 0.27; 'appreciated.': 0.29; "i'm": 0.30; 'gives': 0.31; 'gary': 0.31; 'img': 0.31; 'linux': 0.33; 'running': 0.33; 'version': 0.36; 'subject:?': 0.36; 'expected': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'email addr:gmail.com': 0.63; 'charset:windows-1252': 0.65; 'institute': 0.72; 'received:204': 0.75; 'dr.': 0.77; 'do:': 0.91 |
| Date | Wed, 25 Mar 2015 21:23:54 -0700 |
| From | Gary Herron <gherron@digipen.edu> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: PIL(LOW) - What am I missing? |
| References | <7029df19-f6c0-4b3f-be11-8ac45752ac68@googlegroups.com> |
| In-Reply-To | <7029df19-f6c0-4b3f-be11-8ac45752ac68@googlegroups.com> |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.19 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.178.1427343841.10327.python-list@python.org> (permalink) |
| Lines | 38 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1427343841 news.xs4all.nl 2958 [2001:888:2000:d::a6]:45703 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Body-CRC | 2674464058 |
| X-Received-Bytes | 3236 |
| Xref | csiph.com comp.lang.python:88021 |
Show key headers only | View raw
On 03/25/2015 08:54 PM, kai.peters@gmail.com wrote:
> I create an image as per:
>
> img = Image.new('1', (1024, 1280), 1)
>
> I then draw on it and do:
>
> imagedata = list(img.getdata())
> print len(imagedata)
>
> This gives me 1228800 instead of the expected 1310720 (1024 * 1280)
> - any ideas what I am missing?
>
> As always, any help much appreciated.
>
> Kai
Are you sure?
Both Python2 and Python3 give me the expected 1310720,
I'm running PILLOW version 2.6.1 on Linux (with both Python 3.4.2 and
Python 2.7.8).
>>> from PIL import Image
>>> img = Image.new('1', (1024, 1280), 1)
>>> imagedata = list(img.getdata())
>>> print len(imagedata)
1310720
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PIL(LOW) - What am I missing? kai.peters@gmail.com - 2015-03-25 20:54 -0700 Re: PIL(LOW) - What am I missing? Gary Herron <gherron@digipen.edu> - 2015-03-25 21:23 -0700 Re: PIL(LOW) - What am I missing? kai.peters@gmail.com - 2015-03-25 21:46 -0700
csiph-web