mac convert img

0x00

mac 系统下,要制作 telegram 表情包,需要将图片转化为 png 格式并有特定尺寸要求,怎么办?

0x01

1
brew install imagemagick
1
convert 1.jpg 2.png

The image file should be in PNG format with a transparent layer and must fit into a 512x512 square (one of the sides must be 512px and the other 512px or less).

1
convert -resize 512x512 2.png 3.png

两条命令合成一条

1
convert -resize 512x512 1.jpg 2.png
Author: ronething
Link: https://blog.ronething.cn/20181203-mac.html
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.