~ubuntu-branches/debian/stretch/phatch/stretch

« back to all changes in this revision

Viewing changes to phatch/core/pil.py

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski, Stani M, Piotr Ożarowski
  • Date: 2008-07-21 12:53:17 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080721125317-sqk2sdl3pwl2u4gl
Tags: 0.1.5-1
[ Stani M ]
* New upstream release(Closes LP: #228259, #232436, #236282, #236462, #237359)
* debian/control:
  - Added pkg-config and python-nautilus to build-depends, as
    setup.py uses nautilus-python.pc to look for the nautilus
    extensions path. Closes: #475233.
* debian/patches:
  - All patches of Ubuntu and Debian are implemented upstream and are removed
    from the package

[ Piotr Ożarowski ]
* Bump Standards-Version to 3.8.0 (no changes needed)
* debian/copyright wrapped at column 80 (where possible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    exif        = False
39
39
 
40
40
try:
 
41
    from unicoding import ensure_unicode
41
42
    from core.ct import TITLE
42
43
    from core.translation import _t
43
44
    from formField import is_www_file
45
46
    _t = str
46
47
    is_www_file = os.path.isfile
47
48
    TITLE       = ''
 
49
    def ensure_unicode(x): return x
48
50
 
49
51
IMAGE_DEFAULT_DPI       = 72
50
52
DOT         = '.' #should be same as in core.translations
146
148
        return
147
149
    try:
148
150
        image   = pyexiv2.Image(location)
 
151
        image.readMetadata()
149
152
    except:
150
153
        return
151
 
    image.readMetadata()
152
154
    #exif & iptc
153
155
    for keys in [image.exifKeys(),image.iptcKeys()]:
154
156
        for key in keys:
162
164
def extract_info_location(info,location='',folder=None):
163
165
    if not location.strip():
164
166
        return
 
167
    location                        = ensure_unicode(location)
165
168
    dirname                         = os.path.dirname(location)
166
169
    if folder:
167
170
        info[_t('folder')]          = folder
243
246
        raise KeyError, x
244
247
    
245
248
    def _is_valid_key(self,x):
246
 
        print repr(x)
247
249
        return x in self._keys or re_TAG.match(x)
248
250
    
249
251
class Info: