Skip to content

scipy.misc.toimage (and therefore imresize) converts to uint32 when it should convert to int32 (Trac #1781) #2300

@scipy-gitbot

Description

@scipy-gitbot

Original ticket http://projects.scipy.org/scipy/ticket/1781 on 2012-11-29 by trac user ecuzzillo, assigned to unknown.

Line 247 of scipy/misc/pilutil.py reads

data32 = data.astype(numpy.uint32)

and should read

data32 = data.astype(numpy.int32)

because http://www.pythonware.com/library/pil/handbook/concepts.htm

says 'I' means SIGNED integers.

This caused a fair amount of consternation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Migrated from TracdefectA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.misc

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions