Skip to content

Commit 40662d1

Browse files
committed
quality updated
1 parent 6430aee commit 40662d1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

imageslicer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def create_thumb(img, data, path, current_level):
8989
outfile = "map_thumb_"+str(current_level)+".jpg"
9090
thumb_img = img
9191
thumb_img.thumbnail((settings.thumbSize, settings.thumbSize), Image.ANTIALIAS)
92-
thumb_img.save(settings.output + path + outfile, optimize=True)
92+
thumb_img.save(settings.output + path + outfile, optimize=True, quality=75)
9393
data["thumb"] = path + outfile
9494

9595

@@ -183,8 +183,7 @@ def calculate_slices_normal(width, height, size, x_remainder, y_remainder, small
183183

184184
def crop_save(image, box, x, y, current_level):
185185
cropped_img = image.crop(box)
186-
cropped_img.save(settings.output + settings.path + "map_"+str(current_level)+"_"+str(y)+"_"+str(x)+"."+settings.extension, optimize=True)
187-
186+
cropped_img.save(settings.output + settings.path + "map_"+str(current_level)+"_"+str(y)+"_"+str(x)+"."+settings.extension, quality=95, optimize=True)
188187

189188
def open_image(file_name):
190189
try:

0 commit comments

Comments
 (0)