changing path to icon mask

This commit is contained in:
Rolux 2010-09-17 17:01:04 +02:00
parent 8b11bc3df4
commit 1627b635ad

View file

@ -30,7 +30,7 @@ def render_list_icon(options):
top = int((frame_image.size[1] - frame_height) / 2) top = int((frame_image.size[1] - frame_height) / 2)
frame_image = frame_image.crop((0, top, frame_width_, top + frame_height)) frame_image = frame_image.crop((0, top, frame_width_, top + frame_height))
icon_image.paste(frame_image, (i % 3 * frame_width + (1 if i % 2 == 2 else 0), int(i / 3) * frame_height)) icon_image.paste(frame_image, (i % 3 * frame_width + (1 if i % 2 == 2 else 0), int(i / 3) * frame_height))
mask_image = Image.open('icon.mask.png') mask_image = Image.open(ox.path.join(data_root, 'icon.mask.png'))
mask_image = mask_image.resize((icon_width, icon_height)) mask_image = mask_image.resize((icon_width, icon_height))
icon_image.putalpha(mask_image) icon_image.putalpha(mask_image)
icon_image.save(options['icon']) icon_image.save(options['icon'])
@ -58,7 +58,7 @@ def render_movie_icon(options):
timeline_image = Image.open(options['timeline']) timeline_image = Image.open(options['timeline'])
timeline_image = timeline_image.resize((icon_width, 64), Image.ANTIALIAS) timeline_image = timeline_image.resize((icon_width, 64), Image.ANTIALIAS)
icon_image.paste(timeline_image, (0, icon_height - 64)) icon_image.paste(timeline_image, (0, icon_height - 64))
mask_image = Image.open('icon.mask.png') mask_image = Image.open(ox.path.join(data_root, 'icon.mask.png'))
mask_image = mask_image.resize((icon_width, icon_height)) mask_image = mask_image.resize((icon_width, icon_height))
icon_image.putalpha(mask_image) icon_image.putalpha(mask_image)
icon_image.save(options['icon']) icon_image.save(options['icon'])