Fixed import for Python 3.

Fixed the trivial import bug that prevented the Python 3 version of MPO
from running. On the way fixed the trivial C bug that prevented
Convert.c from compiling properly in a Mac OS X environment for a
Python 3 target.
This commit is contained in:
Eric W. Brown 2014-07-25 11:50:21 -04:00
parent 8101c2a313
commit 14976346a8
2 changed files with 5 additions and 1 deletions

View File

@ -699,7 +699,7 @@ def jpeg_factory(fp=None, filename=None):
try:
if mpheader[45057] > 1:
# It's actually an MPO
from MpoImagePlugin import MpoImageFile
from .MpoImagePlugin import MpoImageFile
im = MpoImageFile(fp, filename)
except (TypeError, IndexError):
# It is really a JPEG

View File

@ -49,6 +49,10 @@
#define L(rgb)\
((INT32) (rgb)[0]*299 + (INT32) (rgb)[1]*587 + (INT32) (rgb)[2]*114)
#ifndef uint
#define uint UINT32
#endif
/* ------------------- */
/* 1 (bit) conversions */
/* ------------------- */