-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix image didn't fill screen area issue #100
Fix image didn't fill screen area issue #100
Conversation
@@ -190,15 +190,16 @@ def create_mockup_image(self, device_path, device_mask_path_prefix, result_path) | |||
tmp = self.target_points[0].copy() | |||
self.target_points[0] = self.target_points[1] | |||
self.target_points[1] = tmp | |||
shifted_points = self.target_points + np.array([PADDING, PADDING]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: How does adding padding and shifting points not affect the pictures fitting the phone?
e.g. if imageA fits perfectly on a phone (say moto-e) before. after adding padding, does imageA still fits perfectly? If so, how?
Thanks~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shows why it become incorrect before this update:
in #79 we adjusted the position of the pasted image if is_mockup_image_at_front
, but forgot to update the other cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks yayun! This explanation looks amazing. Can you put it in mockuphone.com/docs
? 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkong-ds add docs to explain why we add padding when generating mockup ~
08aa237
to
84dc916
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the great work @YayunHuang 🙏 🙏 🙏
Ref: MUP-153
adjust mask position because we add padding for image in: #79
Screen.Recording.2024-08-21.at.11.02.40.AM.mov