diff --git a/gramps/src/AbiWordDoc.py b/gramps/src/AbiWordDoc.py index 49f9ddba8..d1c6afa2d 100644 --- a/gramps/src/AbiWordDoc.py +++ b/gramps/src/AbiWordDoc.py @@ -29,7 +29,7 @@ import utils cnv = utils.fl2txt try: - import Image + import PIL.Image no_pil = 0 except: no_pil = 1 @@ -86,7 +86,7 @@ class AbiWordDoc(TextDoc): cmd = "%s -geometry %dx%d '%s' '%s'" % (const.convert,width,height,file,base) os.system(cmd) else: - im = Image.open(file) + im = PIL.Image.open(file) im.thumbnail((width,height)) im.save(base,"PNG") diff --git a/gramps/src/LaTeXDoc.py b/gramps/src/LaTeXDoc.py index cc2aad604..71482be20 100644 --- a/gramps/src/LaTeXDoc.py +++ b/gramps/src/LaTeXDoc.py @@ -22,7 +22,7 @@ from TextDoc import * from latin_utf8 import latin_to_utf8 try: - import Image + import PIL.Image no_pil = 0 except: no_pil = 1 diff --git a/gramps/src/OpenOfficeDoc.py b/gramps/src/OpenOfficeDoc.py index 23b54af3f..c34ac5d18 100644 --- a/gramps/src/OpenOfficeDoc.py +++ b/gramps/src/OpenOfficeDoc.py @@ -30,7 +30,7 @@ cnv = utils.fl2txt try: - import Image + import PIL.Image no_pil = 0 except: no_pil = 1 @@ -443,7 +443,7 @@ class OpenOfficeDoc(TextDoc): cmd = "%s -geometry %dx%d '%s' '%s'" % (const.convert,width,height,file,image_name) os.system(cmd) else: - im = Image.open(file) + im = PIL.Image.open(file) im.thumbnail((width,height)) im.save(name,"JPEG") diff --git a/gramps/src/PdfDoc.py b/gramps/src/PdfDoc.py index 20dd0d584..1db9a823f 100644 --- a/gramps/src/PdfDoc.py +++ b/gramps/src/PdfDoc.py @@ -30,7 +30,7 @@ import reportlab.lib.styles from latin_utf8 import latin_to_utf8 try: - import Image + import PIL.Image no_pil = 0 except: no_pil = 1 @@ -231,14 +231,14 @@ class PdfDoc(TextDoc): def add_photo(self,name,x,y): if no_pil == 0: - im = Image.open(name) + im = PIL.Image.open(name) nx,ny = im.size scale = float(y)/float(nx) act_width = int(nx * scale) act_height = int(ny * scale) - self.story.append(Image(name,act_width*0.5,act_height*0.5)) + self.story.append(PIL.Image(name,act_width*0.5,act_height*0.5)) self.story.append(Spacer(1,0.5*cm)) self.image = 1 diff --git a/gramps/src/RelImage.py b/gramps/src/RelImage.py index af96a3061..3d6f5dfe4 100644 --- a/gramps/src/RelImage.py +++ b/gramps/src/RelImage.py @@ -31,7 +31,7 @@ from gnome.ui import * _ = intl.gettext try: - import Image + import PIL.Image no_pil = 0 except: no_pil = 1 @@ -72,7 +72,7 @@ def import_photo(filename,path,prefix): cmd = "%s '%s' '%s'" % (const.convert,filename,name) os.system(cmd) else: - Image.open(filename).save(name) + PIL.Image.open(filename).save(name) except: return None @@ -116,7 +116,7 @@ def mk_thumb(source,dest,size): os.system(cmd) else: try: - im = Image.open(source) + im = PIL.Image.open(source) im.thumbnail((size,size)) im.save(dest,"JPEG") except: