2022.23.01.14

This commit is contained in:
ульба 2022-01-23 14:21:42 +05:00
parent 3c0b141fda
commit 83a5dd0688
2 changed files with 5 additions and 3 deletions

View File

@ -102,7 +102,7 @@ class MockupEngineer:
screen_y = template.__landscape_y__ screen_y = template.__landscape_y__
screen_mask = template.__landscape_mask__ if template.__use_mask__ else None screen_mask = template.__landscape_mask__ if template.__use_mask__ else None
screenshot = self.resize(screenshot_path, screen_width, screen_height) resized_screenshot_path = self.resize(screenshot_path, screen_width, screen_height)
for template_color in template.colors: for template_color in template.colors:
if template_color.color == color: if template_color.color == color:
@ -117,7 +117,7 @@ class MockupEngineer:
template_img = Image.open(template_path) template_img = Image.open(template_path)
mask_img = Image.new('RGBA', template_img.size, (0, 0, 0, 0)) mask_img = Image.new('RGBA', template_img.size, (0, 0, 0, 0))
screenshot_img = Image.open(screenshot) screenshot_img = Image.open(resized_screenshot_path)
mask_img.paste(screenshot_img, (screen_x, screen_y)) mask_img.paste(screenshot_img, (screen_x, screen_y))
mask_img.paste(template_img, (0, 0), template_img) mask_img.paste(template_img, (0, 0), template_img)
@ -126,4 +126,6 @@ class MockupEngineer:
mask_img.putalpha(screen_mask) mask_img.putalpha(screen_mask)
mask_img.save(mockup_path) mask_img.save(mockup_path)
os.remove(resized_screenshot_path)
return mockup_path return mockup_path

View File

@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup( setup(
name='MockupEngineer', name='MockupEngineer',
version='2022.23.01.13', version='2022.23.01.14',
packages=find_packages(), packages=find_packages(),
url='https://github.com/ulbwazhine/MockupEngineer', url='https://github.com/ulbwazhine/MockupEngineer',
license='MIT', license='MIT',