Skip to content

Conversation

@ramanakumars
Copy link
Collaborator

Adding a --compress option to the CLI for subject-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.

packages=find_packages(),
include_package_data=True,
install_requires=[
'Pillow>=5.4.0,<=7.0.0',
Copy link
Contributor

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.

Copy link
Collaborator Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^ @zwolf ?

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants