Bug#561965: python-imaging: Image.split() doesn't check if self.im is created; Image.open() with a PNG leaves self.im as None

2010-12-15 Thread W. Martin Borgert

tags 561965 patch
thanks

The error in PIL also affects trac-wikiprint.
The one-line-change-patch mentioned by slav0nic helps.
Please apply it.
Thanks!




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#561965:

2010-11-06 Thread slav0nic
have same problem with python-imaging 1.1.7-2, when this will be fixed? path
http://hg.effbot.org/pil-2009-raclette/changeset/fb7ce579f5f9


Bug#561965: python-imaging: Image.split() doesn't check if self.im is created; Image.open() with a PNG leaves self.im as None

2009-12-21 Thread deavid
Package: python-imaging
Version: 1.1.6-3
Severity: important

I'm having problems with python-imaging 1.1.7-1. (1.1.6-3 version works)

Whenever I load a greyscale PNG with Alpha (LA bands):
 from PIL import Image
 i1 = Image.open(testfile.png)
 repr(i1.im)
'None'

self.im attribute is not loaded yet.

And when I try to call self.split(), i get:
 i1.split()
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.5/site-packages/PIL/Image.py, line 1497, in split
if self.im.bands == 1:
AttributeError: 'NoneType' object has no attribute 'bands'


Image.split function isn't checking if im attribute is loaded, and
whenever I open a PNG it remains unloaded.


I have solved it in my program calling Image.load() just after open.
But the bug remains.

 i1.load()
PixelAccess object at 0xb7cc60d0
 repr(i1.im)
'ImagingCore object at 0xb7cc60c0'
 i1.split()
(PIL.Image.Image image mode=L size=640x400 at 0x84C58CC,
PIL.Image.Image image mode=L size=640x400 at 0xB7CDCB0C)




-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (650, 'testing'), (500, 'stable'), (100, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-imaging depends on:
ii  libc6  2.10.2-2  GNU C Library: Shared libraries
ii  libfreetype6   2.3.11-1  FreeType 2 font engine, shared lib
ii  libjpeg62  6b-15 The Independent JPEG Group's JPEG
ii  mime-support   3.48-1MIME files 'mime.types'  'mailcap
ii  python 2.5.4-2   An interactive high-level object-o
ii  python-central 0.6.14+nmu2   register and build utility for Pyt
ii  python-imaging-tk  1.1.6-3   Python Imaging Library - ImageTk M
ii  zlib1g 1:1.2.3.3.dfsg-15 compression library - runtime

python-imaging recommends no packages.

Versions of packages python-imaging suggests:
pn  python-imaging-dbgnone (no description available)
pn  python-imaging-docnone (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org