Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 679208 Details for
Bug 895778
Port phatch's use of PIL to support Pillow for F19
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to use the form of import of PIL that is pillow compatible
phatch-pillow.patch (text/plain), 27.25 KB, created by
Toshio Ernie Kuratomi
on 2013-01-16 01:20:10 UTC
(
hide
)
Description:
Patch to use the form of import of PIL that is pillow compatible
Filename:
MIME Type:
Creator:
Toshio Ernie Kuratomi
Created:
2013-01-16 01:20:10 UTC
Size:
27.25 KB
patch
obsolete
>Index: phatch-0.2.7/phatch/actions/autocontrast.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/autocontrast.py >+++ phatch-0.2.7/phatch/actions/autocontrast.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageOps, imtools >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/background.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/background.py >+++ phatch-0.2.7/phatch/actions/background.py >@@ -30,7 +30,7 @@ from lib.imtools import fill_background_ > > def init(): > global Image, HTMLColorToRGBA >- import Image >+ from PIL import Image > from lib.colors import HTMLColorToRGBA > > >Index: phatch-0.2.7/phatch/actions/border.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/border.py >+++ phatch-0.2.7/phatch/actions/border.py >@@ -30,8 +30,8 @@ from lib.imtools import has_transparency > > def init(): > global Image, ImageDraw >- import Image >- import ImageDraw >+ from PIL import Image >+ from PIL import ImageDraw > > OPTIONS = [_t('Equal for all sides'), _t('Different for each side')] > >Index: phatch-0.2.7/phatch/actions/brightness.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/brightness.py >+++ phatch-0.2.7/phatch/actions/brightness.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageColor, imtools >- import Image >- import ImageColor >+ from PIL import Image >+ from PIL import ImageColor > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/canvas.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/canvas.py >+++ phatch-0.2.7/phatch/actions/canvas.py >@@ -26,7 +26,7 @@ from lib.reverse_translation import _t > > def init(): > global Image >- import Image >+ from PIL import Image > global imtools > from lib import imtools > global HTMLColorToRGBA >Index: phatch-0.2.7/phatch/actions/colorize.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/colorize.py >+++ phatch-0.2.7/phatch/actions/colorize.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageOps, imtools >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/color_to_alpha.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/color_to_alpha.py >+++ phatch-0.2.7/phatch/actions/color_to_alpha.py >@@ -38,9 +38,9 @@ OPTIONS = [ > > def init(): > global Image, ImageOps, ImageMath, imtools >- import Image >- import ImageOps >- import ImageMath >+ from PIL import Image >+ from PIL import ImageOps >+ from PIL import ImageMath > from lib import imtools > global HTMLColorToRGBA > from lib.colors import HTMLColorToRGBA >Index: phatch-0.2.7/phatch/actions/common.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/common.py >+++ phatch-0.2.7/phatch/actions/common.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageFilter, imtools >- import Image >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageFilter > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/contour.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/contour.py >+++ phatch-0.2.7/phatch/actions/contour.py >@@ -29,8 +29,8 @@ from lib.imtools import has_transparency > > def init(): > global Image, ImageOps, imtools >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > from lib import imtools > global HTMLColorToRGBA > from lib.colors import HTMLColorToRGBA >Index: phatch-0.2.7/phatch/actions/contrast.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/contrast.py >+++ phatch-0.2.7/phatch/actions/contrast.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageColor, imtools >- import Image >- import ImageColor >+ from PIL import Image >+ from PIL import ImageColor > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/crop.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/crop.py >+++ phatch-0.2.7/phatch/actions/crop.py >@@ -29,8 +29,8 @@ from lib.imtools import auto_crop > > def init(): > global Image, ImageOps >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > > > def crop(image, mode=None, all=0, left=0, right=0, top=0, bottom=0): >Index: phatch-0.2.7/phatch/actions/desaturate.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/desaturate.py >+++ phatch-0.2.7/phatch/actions/desaturate.py >@@ -27,8 +27,8 @@ from lib.reverse_translation import _t > def init(): > #lazy import > global Image, ImageOps, imtools >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/effect.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/effect.py >+++ phatch-0.2.7/phatch/actions/effect.py >@@ -29,8 +29,8 @@ from lib.formField import IMAGE_EFFECTS > > def init(): > global Image, ImageFilter, imtools >- import Image >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageFilter > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/equalize.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/equalize.py >+++ phatch-0.2.7/phatch/actions/equalize.py >@@ -27,8 +27,8 @@ from lib.reverse_translation import _t > def init(): > #lazy import > global Image, ImageOps, imtools >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/fit.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/fit.py >+++ phatch-0.2.7/phatch/actions/fit.py >@@ -26,8 +26,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageOps >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > global HTMLColorToRGBA > from lib.colors import HTMLColorToRGBA > >Index: phatch-0.2.7/phatch/actions/grid.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/grid.py >+++ phatch-0.2.7/phatch/actions/grid.py >@@ -39,8 +39,8 @@ ZERO = ['', '0'] > #---PIL > def init(): > global Image, ImageColor, HTMLColorToRGBA, imtools >- import Image >- import ImageColor >+ from PIL import Image >+ from PIL import ImageColor > from lib import imtools > from lib.colors import HTMLColorToRGBA > >Index: phatch-0.2.7/phatch/actions/highlight.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/highlight.py >+++ phatch-0.2.7/phatch/actions/highlight.py >@@ -31,8 +31,8 @@ from lib.imtools import has_transparency > > def init(): > global Image, ImageMath, imtools >- import Image >- import ImageMath >+ from PIL import Image >+ from PIL import ImageMath > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/invert.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/invert.py >+++ phatch-0.2.7/phatch/actions/invert.py >@@ -27,8 +27,8 @@ from lib.reverse_translation import _t > def init(): > #lazy import > global Image, ImageChops, imtools >- import Image >- import ImageChops >+ from PIL import Image >+ from PIL import ImageChops > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/mask.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/mask.py >+++ phatch-0.2.7/phatch/actions/mask.py >@@ -32,8 +32,8 @@ MASKS = [MASK] > > def init(): > global Image, ImageMath, imtools >- import Image >- import ImageMath >+ from PIL import Image >+ from PIL import ImageMath > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/maximum.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/maximum.py >+++ phatch-0.2.7/phatch/actions/maximum.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageFilter, imtools >- import Image >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageFilter > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/median.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/median.py >+++ phatch-0.2.7/phatch/actions/median.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageFilter, imtools >- import Image >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageFilter > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/minimum.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/minimum.py >+++ phatch-0.2.7/phatch/actions/minimum.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageFilter, imtools >- import Image >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageFilter > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/mirror.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/mirror.py >+++ phatch-0.2.7/phatch/actions/mirror.py >@@ -30,7 +30,7 @@ from lib.imtools import convert_safe_mod > > def init(): > global Image >- import Image >+ from PIL import Image > > # Declare constants here > >Index: phatch-0.2.7/phatch/actions/offset.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/offset.py >+++ phatch-0.2.7/phatch/actions/offset.py >@@ -28,7 +28,7 @@ from lib.reverse_translation import _t > > def init(): > global ImageChops >- import ImageChops >+ from PIL import ImageChops > > > def offset(image, horizontal_offset, vertical_offset=None): >Index: phatch-0.2.7/phatch/actions/perspective.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/perspective.py >+++ phatch-0.2.7/phatch/actions/perspective.py >@@ -28,7 +28,7 @@ from lib.reverse_translation import _t > > def init(): > global Image >- import Image >+ from PIL import Image > > global math, r > import math >Index: phatch-0.2.7/phatch/actions/posterize.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/posterize.py >+++ phatch-0.2.7/phatch/actions/posterize.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageOps, imtools >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/rank.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/rank.py >+++ phatch-0.2.7/phatch/actions/rank.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageFilter, imtools >- import Image >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageFilter > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/reflection.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/reflection.py >+++ phatch-0.2.7/phatch/actions/reflection.py >@@ -29,9 +29,9 @@ from lib.imtools import has_alpha, has_t > > def init(): > global Image, ImageColor, ImageFilter >- import Image >- import ImageColor >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageColor >+ from PIL import ImageFilter > global HTMLColorToRGBA > from lib.colors import HTMLColorToRGBA > >Index: phatch-0.2.7/phatch/actions/rotate.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/rotate.py >+++ phatch-0.2.7/phatch/actions/rotate.py >@@ -29,7 +29,7 @@ from lib.colors import HTMLColorToRGBA > > def init(): > global Image, imtools >- import Image >+ from PIL import Image > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/round.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/round.py >+++ phatch-0.2.7/phatch/actions/round.py >@@ -31,9 +31,9 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageChops, ImageDraw, imtools >- import Image >- import ImageChops >- import ImageDraw >+ from PIL import Image >+ from PIL import ImageChops >+ from PIL import ImageDraw > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/saturation.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/saturation.py >+++ phatch-0.2.7/phatch/actions/saturation.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageChops, imtools >- import Image >- import ImageChops >+ from PIL import Image >+ from PIL import ImageChops > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/save.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/save.py >+++ phatch-0.2.7/phatch/actions/save.py >@@ -33,7 +33,7 @@ import os > > def init(): > global Image >- import Image >+ from PIL import Image > global get_quality, get_size, InvalidWriteFormatError > from lib.imtools import get_quality, get_size, InvalidWriteFormatError > >Index: phatch-0.2.7/phatch/actions/scale.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/scale.py >+++ phatch-0.2.7/phatch/actions/scale.py >@@ -24,7 +24,7 @@ from lib.reverse_translation import _t > > def init(): > global Image >- import Image >+ from PIL import Image > > > def preserve_proportions(x0, y0, x1, y1): >Index: phatch-0.2.7/phatch/actions/shadow.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/shadow.py >+++ phatch-0.2.7/phatch/actions/shadow.py >@@ -30,9 +30,9 @@ from lib.imtools import has_transparency > def init(): > #lazily import > global Image, ImageChops, ImageFilter, imtools >- import Image >- import ImageChops >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageChops >+ from PIL import ImageFilter > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/sketch.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/sketch.py >+++ phatch-0.2.7/phatch/actions/sketch.py >@@ -30,10 +30,10 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageMath, ImageOps, ImageFilter >- import Image >- import ImageMath >- import ImageOps >- import ImageFilter >+ from PIL import Image >+ from PIL import ImageMath >+ from PIL import ImageOps >+ from PIL import ImageFilter > > > def sketch(image, details_degree=1): >Index: phatch-0.2.7/phatch/actions/solarize.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/solarize.py >+++ phatch-0.2.7/phatch/actions/solarize.py >@@ -28,8 +28,8 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageOps, imtools >- import Image >- import ImageOps >+ from PIL import Image >+ from PIL import ImageOps > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/text.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/text.py >+++ phatch-0.2.7/phatch/actions/text.py >@@ -26,9 +26,9 @@ from lib.reverse_translation import _t > > def init(): > global Image, ImageDraw, ImageFont >- import Image >- import ImageDraw >- import ImageFont >+ from PIL import Image >+ from PIL import ImageDraw >+ from PIL import ImageFont > global calculate_location, convert_safe_mode > from lib.imtools import calculate_location, convert_safe_mode > >Index: phatch-0.2.7/phatch/actions/transpose.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/transpose.py >+++ phatch-0.2.7/phatch/actions/transpose.py >@@ -28,7 +28,7 @@ from lib.reverse_translation import _t > > def init(): > global Image, imtools >- import Image >+ from PIL import Image > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/warm_up.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/warm_up.py >+++ phatch-0.2.7/phatch/actions/warm_up.py >@@ -34,9 +34,9 @@ from core.translation import _t > #---PIL > def init(): > global Image, ImageMath, ImageColor, imtools >- import Image >- import ImageMath >- import ImageColor >+ from PIL import Image >+ from PIL import ImageMath >+ from PIL import ImageColor > from lib import imtools > > >Index: phatch-0.2.7/phatch/actions/watermark.py >=================================================================== >--- phatch-0.2.7.orig/phatch/actions/watermark.py >+++ phatch-0.2.7/phatch/actions/watermark.py >@@ -28,7 +28,7 @@ from lib.imtools import convert_safe_mod > def init(): > #lazily import > global Image >- import Image >+ from PIL import Image > global generate_layer > from lib.imtools import generate_layer > >Index: phatch-0.2.7/phatch/core/config.py >=================================================================== >--- phatch-0.2.7.orig/phatch/core/config.py >+++ phatch-0.2.7/phatch/core/config.py >@@ -214,7 +214,7 @@ def init_config_paths(config_paths=None) > phatch_path = fix_python_path(config_paths.get('PHATCH_PYTHON_PATH', None)) > #patches for pil <= 1.1.6 (ImportError=skip during build process) > try: >- import Image >+ from PIL import Image > if Image.VERSION < '1.1.7': > fix_python_path(os.path.join(phatch_path, 'other', 'pil_1_1_6')) > except ImportError: >Index: phatch-0.2.7/phatch/core/models.py >=================================================================== >--- phatch-0.2.7.orig/phatch/core/models.py >+++ phatch-0.2.7/phatch/core/models.py >@@ -30,7 +30,7 @@ except NameError: > > import os > >-import Image >+from PIL import Image > > from lib.formField import files_dictionary, Form, Field, \ > ImageDictionaryReadFileField, \ >Index: phatch-0.2.7/phatch/core/pil.py >=================================================================== >--- phatch-0.2.7.orig/phatch/core/pil.py >+++ phatch-0.2.7/phatch/core/pil.py >@@ -30,7 +30,7 @@ import os > import re > import types > >-import Image >+from PIL import Image > > #todo make this lazy > from lib import formField >Index: phatch-0.2.7/phatch/core/preview.py >=================================================================== >--- phatch-0.2.7.orig/phatch/core/preview.py >+++ phatch-0.2.7/phatch/core/preview.py >@@ -25,7 +25,7 @@ if __name__ == '__main__': > init_config_paths() > > import os >-import Image >+from PIL import Image > import api > from config import USER_PREVIEW_PATH > from lib import openImage >Index: phatch-0.2.7/phatch/data/info.py >=================================================================== >--- phatch-0.2.7.orig/phatch/data/info.py >+++ phatch-0.2.7/phatch/data/info.py >@@ -474,7 +474,7 @@ HEADER = "Phatch is the result of work b > > def all_credits(): > #PIL - Python Image Library >- import Image >+ from PIL import Image > pil_credits = PIL_CREDITS > pil_credits['name'] += ' %s' % Image.VERSION > if not (pil_credits in CREDITS['libraries']): >Index: phatch-0.2.7/phatch/lib/imtools.py >=================================================================== >--- phatch-0.2.7.orig/phatch/lib/imtools.py >+++ phatch-0.2.7/phatch/lib/imtools.py >@@ -20,10 +20,10 @@ from cStringIO import StringIO > from itertools import cycle > from urllib import urlopen > >-import Image >-import ImageDraw >-import ImageEnhance >-import ImageOps >+from PIL import Image >+from PIL import ImageDraw >+from PIL import ImageEnhance >+from PIL import ImageOps > > import system > >Index: phatch-0.2.7/phatch/lib/metadata.py >=================================================================== >--- phatch-0.2.7.orig/phatch/lib/metadata.py >+++ phatch-0.2.7/phatch/lib/metadata.py >@@ -475,7 +475,7 @@ class _InfoPil(_InfoCache): > import openImage > cls.Image = openImage > except ImportError: >- import Image >+ from PIL import Image > cls.Image = Image > > @classmethod >@@ -495,7 +495,7 @@ class InfoPil(_InfoPil): > :type image: Pil.Image/function > > >>> import pprint >- >>> import Image >+ >>> from PIL import Image > >>> image = Image.new('L',(1,2)) > >>> info = InfoPil(image) > >>> info['format'] >@@ -647,7 +647,7 @@ class InfoPil(_InfoPil): > #Initialize PIL metadata > #This can't be lazily loaded as it is needed by the provide method. > try: >- from ExifTags import TAGS, GPSTAGS >+ from PIL.ExifTags import TAGS, GPSTAGS > EXIFTAGS = {} > EXIFTAGS.update(TAGS) > EXIFTAGS.update(GPSTAGS) >@@ -715,7 +715,7 @@ class InfoPexif(_InfoPilMetadata): > DateTime('2010:03:03 11:03:08') > >>> pprint.pprint(info.dict.keys()) > ['Pexif_DateTimeOriginal', 'orientation'] >- >>> import Image >+ >>> from PIL import Image > >>> image = Image.open(filename) > >>> info = InfoPexif(image) > >>> info['Pexif_DateTimeOriginal'] >@@ -803,7 +803,7 @@ class InfoZexif(_InfoPilMetadata): > >>> info = InfoZexif(filename) > >>> info['Zexif_0x9202'] > (128, 32) >- >>> import Image >+ >>> from PIL import Image > >>> image = Image.open(filename) > >>> info = InfoZexif(image) > >>> info['Zexif_0x9202'] >@@ -1425,7 +1425,7 @@ class InfoExtract: > """Create an info like dictionary which uses a collection of several > info instances and can evaluate Python expressions. > >- >>> import Image >+ >>> from PIL import Image > >>> import pprint > >>> list(InfoExtract.get_vars_by_info(['mode'])[0].values()) > [['mode', 'orientation']] >Index: phatch-0.2.7/phatch/lib/openImage.py >=================================================================== >--- phatch-0.2.7.orig/phatch/lib/openImage.py >+++ phatch-0.2.7/phatch/lib/openImage.py >@@ -18,7 +18,7 @@ > import os > import re > >-import Image >+from PIL import Image > > import imtools > import system >Index: phatch-0.2.7/phatch/lib/pyWx/treeEdit.py >=================================================================== >--- phatch-0.2.7.orig/phatch/lib/pyWx/treeEdit.py >+++ phatch-0.2.7/phatch/lib/pyWx/treeEdit.py >@@ -115,7 +115,7 @@ class TreeMixin(treeDragDrop.Mixin): > wx_image = graphics.image(form.icon, icon_size) > form.icon_bitmap = wx.BitmapFromImage(wx_image) > # rescale(image, icon_size[0], icon_size[1]) >- import Image >+ from PIL import Image > from wxPil import pil_wxImage, wxImage_pil > wx_image = pil_wxImage(wxImage_pil(wx_image).resize(icon_size,\ > Image.ANTIALIAS)) >Index: phatch-0.2.7/phatch/lib/pyWx/wxPil.py >=================================================================== >--- phatch-0.2.7.orig/phatch/lib/pyWx/wxPil.py >+++ phatch-0.2.7/phatch/lib/pyWx/wxPil.py >@@ -15,7 +15,7 @@ > > # Follows PEP8 > >-import Image >+from PIL import Image > import wx > > >Index: phatch-0.2.7/phatch/lib/thumbnail.py >=================================================================== >--- phatch-0.2.7.orig/phatch/lib/thumbnail.py >+++ phatch-0.2.7/phatch/lib/thumbnail.py >@@ -28,7 +28,7 @@ import stat > import tempfile > import urllib > >-import Image >+from PIL import Image > > import imtools > import system >@@ -59,7 +59,7 @@ def get_filesize(filename, file_stat=Non > > if FREEDESKTOP: > >- import PngImagePlugin >+ from PIL import PngImagePlugin > > FREEDESKTOP_SIZE = { > 'normal': (128, 128), >Index: phatch-0.2.7/phatch/other/pil_1_1_6/JpegImagePlugin.py >=================================================================== >--- phatch-0.2.7.orig/phatch/other/pil_1_1_6/JpegImagePlugin.py >+++ phatch-0.2.7/phatch/other/pil_1_1_6/JpegImagePlugin.py >@@ -63,7 +63,7 @@ > __version__ = "0.5" > > import array, string >-import Image, ImageFile, ImageChops >+from PIL import Image, ImageFile, ImageChops > > def i16(c,o=0): > return ord(c[o+1]) + (ord(c[o])<<8) >@@ -369,7 +369,8 @@ class JpegImageFile(ImageFile.ImageFile) > # Extract EXIF information. This method is highly experimental, > # and is likely to be replaced with something better in a future > # version. >- import TiffImagePlugin, StringIO >+ import StringIO >+ from PIL import TiffImagePlugin > def fixup(value): > if len(value) == 1: > return value[0] >Index: phatch-0.2.7/phatch/other/pil_1_1_6/TiffImagePlugin.py >=================================================================== >--- phatch-0.2.7.orig/phatch/other/pil_1_1_6/TiffImagePlugin.py >+++ phatch-0.2.7/phatch/other/pil_1_1_6/TiffImagePlugin.py >@@ -71,8 +71,8 @@ > > __version__ = "1.3.5" > >-import Image, ImageFile >-import ImagePalette >+from PIL import Image, ImageFile >+from PIL import ImagePalette > > import array, string, sys > >@@ -337,7 +337,7 @@ class ImageFileDirectory: > tag, typ = i16(ifd), i16(ifd, 2) > > if Image.DEBUG: >- import TiffTags >+ from PIL import TiffTags > tagname = TiffTags.TAGS.get(tag, "unknown") > typname = TiffTags.TYPES.get(typ, "unknown") > print "tag: %s (%d)" % (tagname, tag), >@@ -400,7 +400,7 @@ class ImageFileDirectory: > for tag, value in tags: > > if Image.DEBUG: >- import TiffTags >+ from PIL import TiffTags > tagname = TiffTags.TAGS.get(tag, "unknown") > print "save: %s (%d)" % (tagname, tag), > print "- value:", value >Index: phatch-0.2.7/phatch/other/tamogen.py >=================================================================== >--- phatch-0.2.7.orig/phatch/other/tamogen.py >+++ phatch-0.2.7/phatch/other/tamogen.py >@@ -25,9 +25,10 @@ > # 1.1 Restructuring of the code, new pixel dispersion method and folder fill > # type by Juho Vepsäläinen. > >-import glob, os, sys, Image, ImageChops >+import glob, os, sys >+from PIL import Image, ImageChops > from itertools import izip >-from ImageStat import Stat >+from PIL.ImageStat import Stat > from lib import openImage > > IMAGE_ITSELF = 0 >Index: phatch-0.2.7/phatch/templates/action.py >=================================================================== >--- phatch-0.2.7.orig/phatch/templates/action.py >+++ phatch-0.2.7/phatch/templates/action.py >@@ -31,7 +31,7 @@ CHOICES = [_t('Description'), _t('Image' > > def init(cls=None): > global Image >- import Image >+ from PIL import Image > > > def foo(image, dpi, horizontal):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 895778
: 679208