python - Find which libjpeg is being used by PIL / PILLOW -
i getting error reading same lena.jpg file on 2 different computers yeilds 2 different checksums.
even weirder when run md5sum lena.jpg same md5 sum on both machines, files identical.
furthermore, when load png instead of jpeg numbers seem match up. leads me believe there disconnect between pillow on 2 different machines, or @ to the lowest degree library using read jpeg files.
is there way check version of libjpeg beingness used pillow (from within python preferably)?
both of computers ubuntu, although 1 12.04, , 1 14.04 (i tested on mac , got same values 14.04 box)
first, locate pil egg python installation using:
>>> import pil >>> pil.__path__ ['/usr/local/python/2.7.3/lib/python2.7/site-packages/pil']
then locate _imaging.so
in directory , utilize ldd
(linux) or otool -l
(os x) find out version of libjpeg
has been linked against:
linux
class="lang-sh prettyprint-override">$ ldd /usr/local/python/2.7.3/lib/python2.7/site-packages/pil/_imaging.so linux-gate.so.1 => (0x00641000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00f00000) libz.so.1 => /lib/libz.so.1 (0x006f4000) libpthread.so.0 => /lib/libpthread.so.0 (0x00fad000) libc.so.6 => /lib/libc.so.6 (0x0021b000) /lib/ld-linux.so.2 (0x0067e000)
mac os x
class="lang-sh prettyprint-override">$ otool -l /users/lukas/src/pillow-env/lib/python2.7/site-packages/pil/_imaging.so /users/lukas/src/pillow-env/lib/python2.7/site-packages/pil/_imaging.so: /usr/local/lib/libjpeg.8.dylib (compatibility version 13.0.0, current version 13.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/local/lib/libtiff.5.dylib (compatibility version 8.0.0, current version 8.0.0) /usr/lib/libsystem.b.dylib (compatibility version 1.0.0, current version 159.1.0)
python python-imaging-library libjpeg pillow
No comments:
Post a Comment