mirror of
https://github.com/gryf/pygtktalog.git
synced 2025-12-17 11:30:19 +01:00
Removing outdated exif library in favor of exifread
This commit is contained in:
14
README.rst
14
README.rst
@@ -47,19 +47,13 @@ pyGTKtalog requires python and following libraries:
|
|||||||
* `python 2.7`_
|
* `python 2.7`_
|
||||||
* `sqlalchemy 1.0`_
|
* `sqlalchemy 1.0`_
|
||||||
* `pygtk 2.24`_ (only for ``gtktalog.py``)
|
* `pygtk 2.24`_ (only for ``gtktalog.py``)
|
||||||
|
* `pillow`_ for image manipulation
|
||||||
|
* `exifread`_ for parse EXIF information
|
||||||
|
|
||||||
It may work on other (lower) version of libraries, and it should work with
|
It may work on other (lower) version of libraries, and it should work with
|
||||||
higher versions of libraries, although it will not work on Python 3 yet, nor
|
higher versions of libraries, although it will not work on Python 3 yet, nor
|
||||||
GTK3.
|
GTK3.
|
||||||
|
|
||||||
Optional modules
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
* `PIL`_ for image manipulation
|
|
||||||
|
|
||||||
Additional pyGTKtalog uses `EXIF`_ module by Gene Cash (slightly updated to EXIF
|
|
||||||
2.2 by me) which is included in sources.
|
|
||||||
|
|
||||||
pyGTKtalog extensively uses external programs in unix spirit, however there is
|
pyGTKtalog extensively uses external programs in unix spirit, however there is
|
||||||
small possibility of using it Windows (probably with limitations) and quite big
|
small possibility of using it Windows (probably with limitations) and quite big
|
||||||
possibility to run it on other sophisticated unix-like systems (i.e.
|
possibility to run it on other sophisticated unix-like systems (i.e.
|
||||||
@@ -142,7 +136,7 @@ file in top-level directory.
|
|||||||
|
|
||||||
|
|
||||||
.. _coverage: http://nedbatchelder.com/code/coverage/
|
.. _coverage: http://nedbatchelder.com/code/coverage/
|
||||||
.. _exif: https://github.com/ianare/exif-py
|
.. _exifread: https://github.com/ianare/exif-py
|
||||||
.. _gettext: http://www.gnu.org/software/gettext/gettext.html
|
.. _gettext: http://www.gnu.org/software/gettext/gettext.html
|
||||||
.. _gthumb: http://gthumb.sourceforge.net
|
.. _gthumb: http://gthumb.sourceforge.net
|
||||||
.. _gtktalog: http://www.nongnu.org/gtktalog/
|
.. _gtktalog: http://www.nongnu.org/gtktalog/
|
||||||
@@ -152,7 +146,7 @@ file in top-level directory.
|
|||||||
.. _mplayer: http://mplayerhq.hu
|
.. _mplayer: http://mplayerhq.hu
|
||||||
.. _nose: http://code.google.com/p/python-nose/
|
.. _nose: http://code.google.com/p/python-nose/
|
||||||
.. _paver: https://pythonhosted.org/paver/
|
.. _paver: https://pythonhosted.org/paver/
|
||||||
.. _pil: http://www.pythonware.com/products/pil/index.htm
|
.. _pillow: https://python-pillow.org/
|
||||||
.. _pygtk 2.24: http://www.pygtk.org
|
.. _pygtk 2.24: http://www.pygtk.org
|
||||||
.. _python 2.7: http://www.python.org/
|
.. _python 2.7: http://www.python.org/
|
||||||
.. _sqlalchemy 1.0: http://www.sqlalchemy.org
|
.. _sqlalchemy 1.0: http://www.sqlalchemy.org
|
||||||
|
|||||||
1781
pygtktalog/EXIF.py
1781
pygtktalog/EXIF.py
File diff suppressed because it is too large
Load Diff
@@ -1,83 +0,0 @@
|
|||||||
diff -au EXIF.py EXIF_mine.py
|
|
||||||
--- EXIF.py 2008-07-31 15:53:50.000000000 +0200
|
|
||||||
+++ EXIF_mine.py 2009-02-25 18:39:48.000000000 +0100
|
|
||||||
@@ -251,40 +251,54 @@
|
|
||||||
2: 'CenterWeightedAverage',
|
|
||||||
3: 'Spot',
|
|
||||||
4: 'MultiSpot',
|
|
||||||
- 5: 'Pattern'}),
|
|
||||||
+ 5: 'Pattern',
|
|
||||||
+ 6: 'Partial',
|
|
||||||
+ 255: 'other'}),
|
|
||||||
0x9208: ('LightSource',
|
|
||||||
{0: 'Unknown',
|
|
||||||
1: 'Daylight',
|
|
||||||
2: 'Fluorescent',
|
|
||||||
- 3: 'Tungsten',
|
|
||||||
- 9: 'Fine Weather',
|
|
||||||
- 10: 'Flash',
|
|
||||||
+ 3: 'Tungsten (incandescent light)',
|
|
||||||
+ 4: 'Flash',
|
|
||||||
+ 9: 'Fine weather',
|
|
||||||
+ 10: 'Cloudy weather',
|
|
||||||
11: 'Shade',
|
|
||||||
- 12: 'Daylight Fluorescent',
|
|
||||||
- 13: 'Day White Fluorescent',
|
|
||||||
- 14: 'Cool White Fluorescent',
|
|
||||||
- 15: 'White Fluorescent',
|
|
||||||
- 17: 'Standard Light A',
|
|
||||||
- 18: 'Standard Light B',
|
|
||||||
- 19: 'Standard Light C',
|
|
||||||
+ 12: 'Daylight fluorescent (D 5700 - 7100K)',
|
|
||||||
+ 13: 'Day white fluorescent (N 4600 - 5400K)',
|
|
||||||
+ 14: 'Cool white fluorescent (W 3900 - 4500K)',
|
|
||||||
+ 15: 'White fluorescent (WW 3200 - 3700K)',
|
|
||||||
+ 17: 'Standard light A',
|
|
||||||
+ 18: 'Standard light B',
|
|
||||||
+ 19: 'Standard light C',
|
|
||||||
20: 'D55',
|
|
||||||
21: 'D65',
|
|
||||||
22: 'D75',
|
|
||||||
- 255: 'Other'}),
|
|
||||||
+ 23: 'D50',
|
|
||||||
+ 24: 'ISO studio tungsten',
|
|
||||||
+ 255: 'other light source',}),
|
|
||||||
0x9209: ('Flash',
|
|
||||||
- {0: 'No',
|
|
||||||
- 1: 'Fired',
|
|
||||||
- 5: 'Fired (?)', # no return sensed
|
|
||||||
- 7: 'Fired (!)', # return sensed
|
|
||||||
- 9: 'Fill Fired',
|
|
||||||
- 13: 'Fill Fired (?)',
|
|
||||||
- 15: 'Fill Fired (!)',
|
|
||||||
- 16: 'Off',
|
|
||||||
- 24: 'Auto Off',
|
|
||||||
- 25: 'Auto Fired',
|
|
||||||
- 29: 'Auto Fired (?)',
|
|
||||||
- 31: 'Auto Fired (!)',
|
|
||||||
- 32: 'Not Available'}),
|
|
||||||
+ {0: 'Flash did not fire',
|
|
||||||
+ 1: 'Flash fired',
|
|
||||||
+ 5: 'Strobe return light not detected',
|
|
||||||
+ 7: 'Strobe return light detected',
|
|
||||||
+ 9: 'Flash fired, compulsory flash mode',
|
|
||||||
+ 13: 'Flash fired, compulsory flash mode, return light not detected',
|
|
||||||
+ 15: 'Flash fired, compulsory flash mode, return light detected',
|
|
||||||
+ 16: 'Flash did not fire, compulsory flash mode',
|
|
||||||
+ 24: 'Flash did not fire, auto mode',
|
|
||||||
+ 25: 'Flash fired, auto mode',
|
|
||||||
+ 29: 'Flash fired, auto mode, return light not detected',
|
|
||||||
+ 31: 'Flash fired, auto mode, return light detected',
|
|
||||||
+ 32: 'No flash function',
|
|
||||||
+ 65: 'Flash fired, red-eye reduction mode',
|
|
||||||
+ 69: 'Flash fired, red-eye reduction mode, return light not detected',
|
|
||||||
+ 71: 'Flash fired, red-eye reduction mode, return light detected',
|
|
||||||
+ 73: 'Flash fired, compulsory flash mode, red-eye reduction mode',
|
|
||||||
+ 77: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected',
|
|
||||||
+ 79: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected',
|
|
||||||
+ 89: 'Flash fired, auto mode, red-eye reduction mode',
|
|
||||||
+ 93: 'Flash fired, auto mode, return light not detected, red-eye reduction mode',
|
|
||||||
+ 95: 'Flash fired, auto mode, return light detected, red-eye reduction mode'}),
|
|
||||||
0x920A: ('FocalLength', ),
|
|
||||||
0x9214: ('SubjectArea', ),
|
|
||||||
0x927C: ('MakerNote', ),
|
|
||||||
@@ -21,8 +21,7 @@ import __builtin__
|
|||||||
from pygtktalog.logger import get_logger
|
from pygtktalog.logger import get_logger
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['EXIF',
|
__all__ = ['dbcommon',
|
||||||
'dbcommon',
|
|
||||||
'dbobjects',
|
'dbobjects',
|
||||||
'dialogs',
|
'dialogs',
|
||||||
'logger',
|
'logger',
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ from tempfile import mkstemp
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
import exifread
|
||||||
|
|
||||||
from pygtktalog.logger import get_logger
|
from pygtktalog.logger import get_logger
|
||||||
from pygtktalog import EXIF
|
|
||||||
|
|
||||||
|
|
||||||
LOG = get_logger(__name__)
|
LOG = get_logger(__name__)
|
||||||
@@ -90,7 +90,7 @@ class ThumbCreator(object):
|
|||||||
"""
|
"""
|
||||||
image_file = open(self.filename, 'rb')
|
image_file = open(self.filename, 'rb')
|
||||||
try:
|
try:
|
||||||
exif = EXIF.process_file(image_file)
|
exif = exifread.process_file(image_file)
|
||||||
except Exception:
|
except Exception:
|
||||||
exif = {}
|
exif = {}
|
||||||
LOG.info("Exif crashed on '%s'." % self.filename)
|
LOG.info("Exif crashed on '%s'." % self.filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user