笔记笔记
  • Home
  • AI&ML
  • Example
  • Zoo
  • 关于
⌘ K
Light mode
目录
灵感
统一资源标识符
画图工具
收藏的正则表达式
灰度站点
LaTeX
DNS
HTTP 协议状态码
收集财报
下载 WWDC 字幕
暂存
工具
工具
Shell 软件
Git
ImageMagick
MyCLI
MySQL
桌面软件
Chrome
DataGrip
IntelliJ IDEA 技巧
PxCook
Wireshark
最后更新时间:
Copyright © 2023-2026 | Powered by dumi | GuoDapeng | 冀ICP备20004032号-2 | 冀公网安备 冀公网安备13020302001452号

TABLE OF CONTENTS

ImageMagick

shell
# 安装 ImageMagick
brew install imagemagick

长图切片

shell
# 切片,宽度和原图一致,就可以了
magick l.jpg -crop 1200x720 l.jpg

生成 favicon.ico

shell
magick download.png -resize 16x16 16.png
magick download.png -resize 32x32 32.png
magick download.png -resize 64x64 64.png
magick 16.png 32.png 64.png favicon.ico

获取图片大小

shell
identify -format "%w x %h\n" favicon.ico
16 x 16
32 x 32
64 x 64
1024 x 1024

生成 Xcode 开发用的 AppIcon

准备一个大于等于 1024x1024 的图片,然后执行以下命令。

这里主要是为了规范 AppIcon 的命名,方便后续替换。

shell
magick AppIcon.png -resize 1024x1024 iOS-AnyAppearance.png
magick AppIcon.png -resize 1024x1024 iOS-Dark.png
magick AppIcon.png -resize 1024x1024 iOS-Tinted.png
magick AppIcon.png -resize 16x16 macOS-16-1x.png
magick AppIcon.png -resize 32x32 macOS-16-2x.png
magick AppIcon.png -resize 32x32 macOS-32-1x.png
magick AppIcon.png -resize 64x64 macOS-32-2x.png
magick AppIcon.png -resize 128x128 macOS-128-1x.png
magick AppIcon.png -resize 256x256 macOS-128-2x.png
magick AppIcon.png -resize 256x256 macOS-256-1x.png
magick AppIcon.png -resize 512x512 macOS-256-2x.png
magick AppIcon.png -resize 512x512 macOS-512-1x.png
magick AppIcon.png -resize 1024x1024 macOS-512-2x.png