mirror of
https://github.com/ulbwazhine/MockupEngineer.git
synced 2024-11-25 10:13:44 +03:00
2022.23.01.14
This commit is contained in:
parent
3c0b141fda
commit
83a5dd0688
|
@ -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
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -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',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user