-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adding compression to JPEG image types #253
base: master
Are you sure you want to change the base?
Conversation
@@ -17,6 +17,7 @@ | |||
packages=find_packages(), | |||
include_package_data=True, | |||
install_requires=[ | |||
'Pillow>=5.4.0,<=7.0.0', |
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.
Just noting that we should probably bump the version to 1.2 (rather than staying at 1.1.x) for the next release since Pillow is a relatively big dependency to add.
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.
Sounds good! If this is approved, I can commit the update to setup.py
to bump the version number. Is there anywhere else that this needs to be changed?
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.
^^ @zwolf ?
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.
That'll be handled in a separate version release PR. If this feature needs the new version, update it here and I'll handle the new version release when this merges.
Adding a
--compress
option to the CLI forsubject-set upload-subjects
to automatically compress JPEG images during the upload. Currently this is the only format that works consistently; PNG compression requires image size scaling rather than quality based compression.The compression code starts at 80% quality and successively reduces to 50% before throwing an error if the file size is still too large. For a ~2-3MB it seems like 2 iterations is enough for getting below the current 1MB limit so this should not take too long.