mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
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:
parent
8101c2a313
commit
14976346a8
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
/* ------------------- */
|
||||
|
|
Loading…
Reference in New Issue
Block a user