Quick actions

cmd+k|ctrl+k

Navigation

Languages

magick GIF

Snippet info

Language

Bash

Visibility

public

Author

awesome2023

Created

2025-10-27T13:33:50.346866Z

Updated

2025-10-27T14:09:17.219114Z

magick identify -format "%n frames\n" input.gif

magick 操作 gif

只提取某几帧(例如前 3 帧)
magick input.gif[0-2] -coalesce frame_%d.png

将 GIF 拆解为单帧图片
magick input.gif output_%d.png

设置透明背景并生成透明 GIF
magick input.png -alpha set -transparent white output.gif


转换多张图片为动态 GIF(动画)
magick *.png -delay 100 -loop 0 animated.gif


https://cloud.tencent.com/developer/ask/sof/110858418

convert frame-00.gif frame-02.gif -geometry +85+8 -composite x.gif

convert anim.gif -transparent white miff:- | montage -tile 3x -frame 5 - montage.jpg
INFO