Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
NodeJS
版本最低 12.20.0,为了更好的体验建议版本14.x
必须进入图片所在的目录执行转换指令
cd src/assets/images # 进入要转换的图片目录
cd src/assets/images/output # 转换后的图片所在目录
npm i -g imgto # 全局安装
imgto # 执行批量转换
npx imgto -w 100 -h 50 -t jpeg --fit cover
npm init imgto png
yarn create imgto png
参数 | 默认值 | 参数类型 | 描述 |
---|---|---|---|
-w,--width | 原始宽度 | Number | 图片转换后宽度 |
-h,--height | 原始高度 | Number | 图片转换后高度 |
-t,--type | webp | String | 转换的图片类型,支持:jpeg 、jpg 、png 、webp 、gif 、jp2 、 tiff 、avif 、heif 、raw 、tile |
-q,--quality | 100 | Number | 图片进行压缩,支持:1-100【100为不压缩】 |
--fit | cover | String | 裁剪或拉伸时 可选的参数,支持:cover 、contain 、fill 、inside 、outside |
压缩
imgto --quality 60 # 执行此指令对图片进行压缩 支持 1-100
格式转换
imgto --type webp # 执行此指令对图片格式进行转换 支持 jpg|jpeg,png,webp
imgto --help
FAQs
Image format conversion
The npm package imgto receives a total of 8 weekly downloads. As such, imgto popularity was classified as not popular.
We found that imgto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.