Some comments
This commit is contained in:
parent
52135bae5e
commit
a05043cb8d
1 changed files with 1 additions and 3 deletions
|
@ -3,9 +3,6 @@ import piexif
|
||||||
import time
|
import time
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
|
|
||||||
from debug import my_debugging_tools
|
|
||||||
d = my_debugging_tools()
|
|
||||||
|
|
||||||
class ImageProcessor:
|
class ImageProcessor:
|
||||||
"""Functions using pillow are in here."""
|
"""Functions using pillow are in here."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -43,6 +40,7 @@ class ImageProcessor:
|
||||||
return resized_image
|
return resized_image
|
||||||
|
|
||||||
def add_watermark(self, image, text, font_size_percentage):
|
def add_watermark(self, image, text, font_size_percentage):
|
||||||
|
# Still not happy about this function..
|
||||||
drawer = ImageDraw.Draw(image)
|
drawer = ImageDraw.Draw(image)
|
||||||
imagewidth, imageheight = image.size
|
imagewidth, imageheight = image.size
|
||||||
margin = (imageheight / 100 ) * 2 # margin dynamic, 2% of image size
|
margin = (imageheight / 100 ) * 2 # margin dynamic, 2% of image size
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue