python-imaging __array_interface__ does not support 16bit images

Bug #198892 reported by lcampagn
4
Affects Status Importance Assigned to Milestone
python-imaging (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-imaging

The Image.__array_interface__() function introduced in version 1.1.6 lacks proper support for all of the data types handled by PIL. I noticed this while working with 16bit TIF files, and in this particular instance, the problem can be fixed by adding the line:
    "I;16": ('%si2' % _ENDIAN, None),
at line 200 in Image.py. Similar lines should be added for any other missing data types.
Also, I'm guessing line 199 should read:
    "I": ('%si1' % _ENDIAN, None),
But I'm not certain about that..

Revision history for this message
Matthias Klose (doko) wrote :

please could you attach a proposed patch?

Changed in python-imaging:
status: New → Confirmed
Revision history for this message
lcampagn (luke-campagnola) wrote : Re: [Bug 198892] Re: python-imaging __array_interface__ does not support 16bit images

Not sure how to do that. Can you point me to some documentation?

A proper fix would be to add translations for all of the modes used by
PIL, but I don't know what those modes are..

On Wed, Apr 9, 2008 at 12:33 PM, Matthias Klose <email address hidden> wrote:
> please could you attach a proposed patch?
>
>
> ** Changed in: python-imaging (Ubuntu)
> Status: New => Confirmed
>
>
>
> --
> python-imaging __array_interface__ does not support 16bit images
> https://bugs.launchpad.net/bugs/198892
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Matthias Klose (doko) wrote :

lcampagn schrieb:
> Not sure how to do that. Can you point me to some documentation?

save the original file(s) or directories, make your changes, generate the diff
(diff -u oldfile newfile > mypatch.diff) or diff -ur olddir newdir
mypatch.diff), attach this file to the bug report.

Revision history for this message
lcampagn (luke-campagnola) wrote :

Thanks, patch attached.

On Wed, Apr 9, 2008 at 1:34 PM, Matthias Klose <email address hidden> wrote:
> lcampagn schrieb:
>
> > Not sure how to do that. Can you point me to some documentation?
>
> save the original file(s) or directories, make your changes, generate the diff
> (diff -u oldfile newfile > mypatch.diff) or diff -ur olddir newdir
> mypatch.diff), attach this file to the bug report.
>
> --
>
>
> python-imaging __array_interface__ does not support 16bit images
> https://bugs.launchpad.net/bugs/198892
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-imaging - 1.1.6-1ubuntu5

---------------
python-imaging (1.1.6-1ubuntu5) hardy; urgency=low

  * In __array_interface__ add support for 16bit TIF images (Luke
    Campagnola). LP: #198892.

 -- Matthias Klose <email address hidden> Wed, 09 Apr 2008 20:44:17 +0200

Changed in python-imaging:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.