-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add function to save a thumbnail #632
Conversation
@@ -49,6 +50,9 @@ def _save_image(self, image: Image.Image): | |||
|
|||
LOGGER.info(f"Saving image to {path}") | |||
image.save(path) | |||
|
|||
save_thumbnail(Path(path), image) | |||
|
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.
PIL documentation states that this modifies the image, but looks like we are ok in all our usages.
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.
Yh, I thought about doing the copy but didn't seem worth it as we're always calling after saving the original. Thanks for checking though.
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.
Looks good
Fixes #628
Note that this will only be needed for a month or so, no need to review too heavily.
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}