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

Minor fixes/improvements of upload_image.py #2449

Merged
merged 2 commits into from
Jun 15, 2023
Merged

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Jun 15, 2023

What

Lessons learned from #2440

  • On Mac, PIL's clipboard import compresses to JPG, which is bad => added a custom function to use PNG instead.
  • Tuned the PIL image saving parameters to optimise for file size
  • Added some pngcrush CLI parameter for optimisation
  • Discard pngcrush output if it ends up bigger than output (PIL's PNG export is pretty good in most cases it seems)

Checklist

PR Build Summary: https://build.rerun.io/pr/2449

Docs preview: https://rerun.io/preview/8563e84/docs
Examples preview: https://rerun.io/preview/8563e84/examples

- On Mac, PIL's clipboard import compresses to JPG, which is bad => added a custom function to use PNG instead.
- Tuned the PIL image saving parameters to optimise for file size
- Added some pngcrush CLI parameter for optimisation
- Discard pngcrush output if it ends up bigger than output (PIL's PNG export is pretty good in most cases it seems)
@abey79 abey79 added the 🧑‍💻 dev experience developer experience (excluding CI) label Jun 15, 2023
scripts/upload_image.py Show resolved Hide resolved
@abey79 abey79 merged commit f844d5e into main Jun 15, 2023
@abey79 abey79 deleted the antoine/upload-image-fixes branch June 15, 2023 13:50
emilk pushed a commit that referenced this pull request Jun 15, 2023
### What

Lessons learned from #2440

- On Mac, PIL's clipboard import compresses to JPG, which is bad =>
added a custom function to use PNG instead.
- Tuned the PIL image saving parameters to optimise for file size
- Added some pngcrush CLI parameter for optimisation
- Discard pngcrush output if it ends up bigger than output (PIL's PNG
export is pretty good in most cases it seems)

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [ ] ~~I've included a screenshot or gif (if applicable)~~

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2449

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/8563e84/docs
Examples preview: https://rerun.io/preview/8563e84/examples
<!-- pr-link-docs:end -->
@Wumpf Wumpf mentioned this pull request Jun 16, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants