Skip to content
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

screencopy: give template and screenshot a width #96

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mir-ci/mir_ci/robot_libraries/Screencopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ def _log_failed_match(self, screenshot, template):
"""Log a failure with template matching."""
template_img = Image.open(template)
template_string = (
'Template was:<br /><img src="data:image/png;base64,' f'{self._to_base64(template_img)}" /><br />'
'Template was:<br /><img style="max-width: 100%" src="data:image/png;base64,' f'{self._to_base64(template_img)}" /><br />'
)
image_string = 'Image was:<br /><img src="data:image/png;base64,' f'{self._to_base64(screenshot)}" />'
image_string = 'Image was:<br /><img style="max-width: 100%" src="data:image/png;base64,' f'{self._to_base64(screenshot)}" />'
logger.info(
template_string + image_string,
html=True,
Expand Down
Loading