No effect with quality 100?
See original GitHub issueUsing the Image Actions GitHub Action, which uses sharp (with mozjpeg), I get identically compressed files with quality 80 and with quality 100.
What is the output of running npx envinfo --binaries --languages --system --utilities
?
Unknown.
What are the steps to reproduce?
PR 1: quality 80
PR https://github.com/hugovk/python-logos/pull/1 adds the default workflow in .github/workflows/calibreapp-image-actions.yml
from:
https://github.com/calibreapp/image-actions#how-to-add-this-to-your-repository
name: Compress images
on: pull_request
jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: calibreapp/image-actions
uses: docker://calibreapp/github-image-actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
By default, it uses quality 80.
PR 2: quality 100
PR https://github.com/hugovk/python-logos/pull/2 is the same, but with this config in .github/calibre/image-actions.yml
:
jpeg:
quality: 100
png:
quality: 100
webp:
quality: 100
And the action read in the config:
->> Using config: {"jpeg":{"quality":100},"png":{"quality":100},"webp":{"quality":100},"ignorePaths":["node_modules/**"]}
https://github.com/hugovk/python-logos/runs/295767221#step:4:7
However, the images in both PRs are binary identical:
This is surprising, should the images with 100 quality be lossless? I’d expect at least some difference.
What is the expected behaviour?
Lossless change to images with quality 100. At least I’d expect the files in each PR not to be identical.
Are you able to provide a standalone code sample, without other dependencies, that demonstrates this problem?
No, I was referred to report the issue here by the Image Actions maintainers (https://github.com/calibreapp/image-actions/issues/25).
Are you able to provide a sample image that helps explain the problem?
Yes, the images above are in https://github.com/hugovk/python-logos/tree/master/img.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
@hugovk I hope this information helped. Please feel free to re-open with more details if further help is required.
@benschwarz Looks good. It’s worth noting that libimagequant is GPL licenced (and not LGPL) so this change will make all your GitHub Action code GPL as it runs in the same process.