Image.ANTIALIAS->Image.LANCZOS
This commit is contained in:
parent
eee51e672c
commit
cbaeffde68
10 changed files with 26 additions and 25 deletions
|
|
@ -459,7 +459,7 @@ def resize_image(image_source, image_output, width=None, size=None):
|
|||
height = max(height, 1)
|
||||
|
||||
if width < source_width:
|
||||
resize_method = Image.ANTIALIAS
|
||||
resize_method = Image.LANCZOS
|
||||
else:
|
||||
resize_method = Image.BICUBIC
|
||||
output = source.resize((width, height), resize_method)
|
||||
|
|
@ -605,7 +605,7 @@ def timeline_strip(item, cuts, info, prefix):
|
|||
print(frame, 'cut', c, 'frame', s, frame, 'width', widths[s], box)
|
||||
# FIXME: why does this have to be frame+1?
|
||||
frame_image = Image.open(item.frame((frame+1)/fps))
|
||||
frame_image = frame_image.crop(box).resize((widths[s], timeline_height), Image.ANTIALIAS)
|
||||
frame_image = frame_image.crop(box).resize((widths[s], timeline_height), Image.LANCZOS)
|
||||
for x_ in range(widths[s]):
|
||||
line_image.append(frame_image.crop((x_, 0, x_ + 1, timeline_height)))
|
||||
frame += widths[s]
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class FulltextMixin:
|
|||
img = Image.alpha_composite(img, overlay)
|
||||
img = img.convert("RGB")
|
||||
aspect = img.size[0] / img.size[1]
|
||||
resize_method = Image.ANTIALIAS
|
||||
resize_method = Image.LANCZOS
|
||||
if img.size[0] >= img.size[1]:
|
||||
width = size
|
||||
height = int(size / aspect)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ def join_tiles(source_paths, durations, target_path):
|
|||
if not w or large_tile_i < large_tile_n - 1:
|
||||
w = 60
|
||||
data['target_images']['large'] = data['target_images']['large'].resize(
|
||||
(w, small_tile_h), Image.ANTIALIAS
|
||||
(w, small_tile_h), Image.LANCZOS
|
||||
)
|
||||
if data['target_images']['small']:
|
||||
data['target_images']['small'].paste(
|
||||
|
|
@ -90,7 +90,7 @@ def join_tiles(source_paths, durations, target_path):
|
|||
if data['full_tile_widths'][0]:
|
||||
resized = data['target_images']['large'].resize((
|
||||
data['full_tile_widths'][0], large_tile_h
|
||||
), Image.ANTIALIAS)
|
||||
), Image.LANCZOS)
|
||||
data['target_images']['full'].paste(resized, (data['full_tile_offset'], 0))
|
||||
data['full_tile_offset'] += data['full_tile_widths'][0]
|
||||
data['full_tile_widths'] = data['full_tile_widths'][1:]
|
||||
|
|
@ -196,7 +196,7 @@ def join_tiles(source_paths, durations, target_path):
|
|||
#print(image_file)
|
||||
image_file = '%stimeline%s%dp.jpg' % (target_path, full_tile_mode, small_tile_h)
|
||||
data['target_images']['full'].resize(
|
||||
(full_tile_w, small_tile_h), Image.ANTIALIAS
|
||||
(full_tile_w, small_tile_h), Image.LANCZOS
|
||||
).save(image_file)
|
||||
#print(image_file)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue