Merge pull request #30 from bradleyfalzon/pil-constant
Rename Pillow constant Image.ANTIALIAS to Image.Resampling.LANCZOS
This commit is contained in:
@@ -121,9 +121,9 @@ def worker(queue):
|
||||
interval, output_prefix, size)
|
||||
generate_sprite_from_frames(output_prefix, columns,
|
||||
size, output_file)
|
||||
except:
|
||||
print("[{file_name}] Error occurred with file".format(
|
||||
file_name=file_name))
|
||||
except Exception as e:
|
||||
print("[{file_name}] Error occurred with file: {error}".format(
|
||||
file_name=file_name, error=e))
|
||||
|
||||
|
||||
def generate_frames(file_name, video_file_clip, interval, output_prefix, size):
|
||||
@@ -146,7 +146,7 @@ def extract_frame(video_file_clip, moment, output_prefix, size, frame_count):
|
||||
|
||||
def resize_frame(filename, size):
|
||||
image = Image.open(filename)
|
||||
image = image.resize(size, Image.ANTIALIAS)
|
||||
image = image.resize(size, Image.Resampling.LANCZOS)
|
||||
image.save(filename)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user