mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Removed use of eval
This commit is contained in:
parent
b1a528bf10
commit
6475530f65
|
@ -39,7 +39,7 @@ class Enhance(Frame):
|
|||
s.pack()
|
||||
|
||||
def update(self, value):
|
||||
self.value = eval(value)
|
||||
self.value = float(value)
|
||||
self.tkim.paste(self.enhancer.enhance(self.value))
|
||||
|
||||
#
|
||||
|
|
|
@ -208,7 +208,7 @@ class PILDriver(object):
|
|||
Process the top image with the given filter.
|
||||
"""
|
||||
from PIL import ImageFilter
|
||||
imageFilter = eval("ImageFilter." + self.do_pop().upper())
|
||||
imageFilter = getattr(ImageFilter, self.do_pop().upper())
|
||||
image = self.do_pop()
|
||||
self.push(image.filter(imageFilter))
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class UI(Frame):
|
|||
# self.redraw()
|
||||
|
||||
def update_scale(self, value):
|
||||
self.value = eval(value)
|
||||
self.value = float(value)
|
||||
|
||||
self.redraw()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user