Comments (9)
The project is internal and I'm not ready to share it publicly, sorry.
Here's the output from the step Compress Image
/usr/bin/docker run --name ghcriocalibreappimageactionsimageactionsmain_7db1bc --label ef7d85 --workdir /github/workspace --rm -e "INPUT_GITHUBTOKEN" -e "INPUT_COMPRESSONLY" -e "INPUT_JPEGQUALITY" -e "INPUT_JPEGPROGRESSIVE" -e "INPUT_PNGQUALITY" -e "INPUT_WEBPQUALITY" -e "INPUT_IGNOREPATHS" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/soc/soc":"/github/workspace" ghcr.io/calibreapp/image-actions/image-actions:main
->> Using config: {"jpeg":{"quality":80,"progressive":false},"png":{"quality":80},"webp":{"quality":80},"ignorePaths":["node_modules/**"],"compressOnly":true}
->> Locating images…
To turn on DEBUG level logging for image-actions, see this reference: https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging
jpeg: {
id: 'jpeg',
input: { file: true, buffer: true, stream: true },
output: { file: true, buffer: true, stream: true }
},
png: {
id: 'png',
input: { file: true, buffer: true, stream: true },
output: { file: true, buffer: true, stream: true }
},
webp: {
id: 'webp',
input: { file: true, buffer: true, stream: true },
output: { file: true, buffer: true, stream: true }
},
tiff: {
id: 'tiff',
input: { file: true, buffer: true, stream: true },
output: { file: true, buffer: true, stream: true }
},
magick: {
id: 'magick',
input: { file: true, buffer: true, stream: true },
output: { file: true, buffer: true, stream: true }
},
openslide: {
id: 'openslide',
input: { file: false, buffer: false, stream: false },
output: { file: false, buffer: false, stream: false }
},
dz: {
id: 'dz',
input: { file: false, buffer: false, stream: false },
output: { file: true, buffer: true, stream: true }
},
ppm: {
id: 'ppm',
input: { file: true, buffer: false, stream: false },
output: { file: true, buffer: false, stream: false }
},
fits: {
id: 'fits',
input: { file: false, buffer: false, stream: false },
output: { file: false, buffer: false, stream: false }
},
gif: {
id: 'gif',
input: { file: true, buffer: true, stream: true },
output: { file: false, buffer: false, stream: false }
},
svg: {
id: 'svg',
input: { file: true, buffer: true, stream: true },
output: { file: false, buffer: false, stream: false }
},
heif: {
id: 'heif',
input: { file: true, buffer: true, stream: true },
output: { file: true, buffer: true, stream: true }
},
pdf: {
id: 'pdf',
input: { file: false, buffer: false, stream: false },
output: { file: false, buffer: false, stream: false }
},
vips: {
id: 'vips',
input: { file: true, buffer: false, stream: false },
output: { file: true, buffer: false, stream: false }
},
raw: {
id: 'raw',
input: { file: false, buffer: true, stream: true },
output: { file: false, buffer: true, stream: true }
}
}
->> Using config: {"jpeg":{"quality":80,"progressive":false},"png":{"quality":80},"webp":{"quality":80},"ignorePaths":["node_modules/**"],"compressOnly":true}
- Processing: /github/workspace/notes/agua-de-tuna-roja-sorbet.jpg config={"quality":80,"progressive":false} output={"format":"jpeg","width":4032,"height":3024,"channels":3,"premultiplied":false,"size":1324877}
- Processing: /github/workspace/notes/ants-on-bread.jpg config={"quality":80,"progressive":false} output={"format":"jpeg","width":4032,"height":3024,"channels":3,"premultiplied":false,"size":1652007}
- Processing: /github/workspace/notes/el-pan-como.jpg config={"quality":80,"progressive":false} output={"format":"jpeg","width":1840,"height":2453,"channels":3,"premultiplied":false,"size":721057}
- Processing: /github/workspace/notes/geisha.jpg config={"quality":80,"progressive":false} output={"format":"jpeg","width":4032,"height":3024,"channels":3,"premultiplied":false,"size":1548591}
- Processing: /github/workspace/notes/huitlacoche-soup.jpg config={"quality":80,"progressive":false} output={"format":"jpeg","width":4032,"height":3024,"channels":3,"premultiplied":false,"size":1652156}
- Processing: /github/workspace/notes/san-pablo1.jpg config={"quality":80,"progressive":false} output={"format":"jpeg","width":4032,"height":3024,"channels":3,"premultiplied":false,"size":2003600}
- Processing: /github/workspace/notes/san-pablo2.jpg config={"quality":80,"progressive":false} output={"format":"jpeg","width":4032,"height":3024,"channels":3,"premultiplied":false,"size":2829650}
->> Generating markdown…
->> Using config: {"jpeg":{"quality":80,"progressive":false},"png":{"quality":80},"webp":{"quality":80},"ignorePaths":["node_modules/**"],"compressOnly":true}
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-[11](https://github.com/octref/soc/actions/runs/5993355890/job/16253711123#step:4:12)-github-actions-deprecating-save-state-and-set-output-commands/
from image-actions.
@octref I have no doubt that the issue you've reported is happening on your repo and to your image
image-actions has been run on tens of thousands (probably more?) of images without any reports of rotation of images, so I find it difficult to believe that there's a bug in image-actions code that causes it.
Have you been able to replicate the issue on all images that you've tested?
from image-actions.
Let me go back in commit, get the old image, setup a new open repo for repro case so you can take a look.
from image-actions.
It repros!
Repo: https://github.com/octref/calibre-rotate-bug
Action: https://github.com/octref/calibre-rotate-bug/actions/runs/6001844959/job/16276919435
Commit the action created: octref/calibre-rotate-bug@00311ff
from image-actions.
@octref The image displays sideways in GitHub, but that looks like it's because the commit has already occurred.
Can you repro with a different image?
from image-actions.
The commit was created by the Action. You can see the diff: octref/calibre-rotate-bug@00311ff
If you check the log of this Action run: https://github.com/octref/calibre-rotate-bug/actions/runs/6001844959/job/16276919435
It shows the modification by the Calibre action
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: agua-de-tuna-roja-sorbet.jpg
no changes added to commit (use "git add" and/or "git commit -a")
[main 00311ff] *
1 file changed, 0 insertions(+), 0 deletions(-)
To https://github.com/octref/calibre-rotate-bug
5fb7697..00311ff main -> main
from image-actions.
Thanks for the confirmation @octref. Can you repro with a different image?
As I said, image-actions has run on easily tens to hundreds of thousands of images and this is the first time image rotation has been a reported issue.
from image-actions.
Yes, here you go:
https://github.com/octref/calibre-rotate-bug/actions/runs/6065968865/job/16456039262
which made this commit
octref/calibre-rotate-bug@6943560
Can you fork the repo and try it out yourself?
from image-actions.
Thanks for the additional testing @octref, appreciated.
From what I am able to tell, your test images contain EXIF metadata that includes the original orientation of the image (e.g.: portrait or landscape).
By default, Sharp (the library that performs the image compression) removes all EXIF metadata:
By default all metadata will be removed, which includes EXIF-based orientation.
There is a sharp function to retain EXIF metadata (withMetadata
) that we could opt to use, however removing EXIF is an intentional feature of image-actions, as EXIF can greatly increase the size of an image (maximum 64 kB), and can also contain private information (such as geolocation of photos).
At present sharp does not have a passable configuration option to retain EXIF (outside of directly calling the function), so it's not a change we're likely to make to image-actions directly.
If you'd like to use image-actions, I'd recommend creating your own fork and including withMetadata()
where sharp is called.
Hope that helps.
from image-actions.
Related Issues (20)
- Just a quick question! HOT 2
- [Bug] HTTPError when committing files HOT 3
- [Feature Request] Keep metadata when optimising images
- Limit markdown to 65535? HOT 4
- [Bug] `Input file contains unsupported image format` errors HOT 3
- Could you release major version(s) of your GitHub action? HOT 1
- [Feature Request] Can we have that command line utility for the same ? HOT 1
- Env variables are not being populated as expected HOT 1
- Bad Credentials error when following docs
- [Feature Request] Make a recent release with tag instead of `main` HOT 2
- Files compress in test repo but not Github Pages website even though code is the same. HOT 1
- [Feature Request] Support on-premise github enterprise HOT 2
- [Bug] WebP optimization requires successive passes to optimize HOT 1
- [Feature Request] Add option to disable PR comment HOT 6
- [Feature Request] How to get it to optimize images that are already inside the repo? HOT 1
- [Feature Request] Support for compressing PDFs HOT 2
- [Bug] 'set-output' warning HOT 2
- [Bug] Usage of deprecated command HOT 2
- Is it possible to add support for Gitlab CI? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image-actions.