Beispiel #1
0
def setJpegInfo(path, info):
    """
    @summary: Set exif information into jpef file.
    @param path: Path where information will be set.
    @param info: Tuple with exif info, exif2 info and comments. 
    """

    infoExif, infoExif2, infoComments = info

    if infoExif != None:
        jpeg.setExif(infoExif, path)
    else:
        __log__.warning("There is not EXIF information.")

    if infoExif2 != None:
        jpeg.setExif2(infoExif2, path)
    else:
        __log__.warning("There is not EXIF2 information.")

    if infoComments != None:
        jpeg.setComments(infoComments, path)
    else:
        __log__.warning("There are not comments.")
Beispiel #2
0
#!/usr/bin/env python

# http://www.emilas.com/jpeg/

from jpeg import jpeg
import sys

path_input = sys.argv[1]
path_output = sys.argv[2]

try:
    exif = jpeg.getExif(path_input)
except Exception, e:
    # please to write to STDERR here...
    print "get exif: %s (%s)" % (e, path_input)
    sys.exit()

if exif != None:

    try:
        jpeg.setExif(exif, path_output)
    except Exception, e:  # please to write to STDERR here...
        print "set exif: %s (%s)" % (e, path_output)
        sys.exit()

sys.exit()
Beispiel #3
0
#!/usr/bin/env python

# http://www.emilas.com/jpeg/

from jpeg import jpeg
import sys

path_input = sys.argv[1]
path_output = sys.argv[2]

try :
    exif = jpeg.getExif(path_input)
except Exception, e:
    # please to write to STDERR here...
    print "get exif: %s (%s)" % (e, path_input)
    sys.exit()
    
if exif != None :

    try :
        jpeg.setExif(exif, path_output)
    except Exception, e :        # please to write to STDERR here...        
        print "set exif: %s (%s)" % (e, path_output)
        sys.exit()
    
sys.exit()