Comments (1)
@KasparEtter Hi! I tried to do the same I think.
I want to resize some images to the same height and keep the width auto-scaled to not cut off anything.
Its not documented but it works if you specify 0 as width. So this did the job for me:
sharp -i './*.png' -o ./out resize 0 64
I get all images with height 64 and width auto.
Hope this helps!
from sharp-cli.
Related Issues (20)
- Resize by percentage HOT 2
- Remove people's data from the git history HOT 1
- Update `sharp` dependency to `v0.28` to support `AVIF` format
- Overwriting the input files failes in Node v16.4.1 HOT 1
- Does not Install on ARM64 M1 Apple Silicone HOT 2
- Specifying quality changes PNG file format to ISO Media HOT 4
- CPU usage low... HOT 3
- Option to delete original? HOT 3
- How to specify background/border color for `extend`? HOT 5
- Support for composite multiple images HOT 5
- NPM flags 3 moderate severity vulnerabilities upon install HOT 3
- Proposal: Add `--animated` Global Option HOT 2
- Add support PPM files HOT 7
- avif output ext wrong HOT 2
- Input file specification on windows - Backslash HOT 6
- Possible to add output option to buffer HOT 2
- sharp-cli vs sharp
- How to rasterize SVGs on PNG with specific width/height? HOT 4
- Greyscale conversion is not working HOT 6
- Installation does not work on Manjaro 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 sharp-cli.