Skip to content

Fix imread issues mentioned on matplotlib-devel #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Return native byte order uint16
  • Loading branch information
cgohlke committed Dec 10, 2011
commit 463a3b59b9acc4706514de147fd176f59bcf7a31
2 changes: 1 addition & 1 deletion lib/matplotlib/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ def toarray(im, dtype=np.uint8):
else:
x = toarray(im, '<u2')
x.shape = im.size[1], im.size[0]
return x
return x.astype('=u2')
else: # try to convert to an rgba image
try:
im = pilImage.convert('RGBA')
Expand Down