GIF Animation
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
PreviewProxy supports animated GIF handling with frame range selection via the gif_anim parameter.
Default Behavior
Section titled “Default Behavior”By default, GIF files are processed as a single frame - only the first frame is extracted and returned. To enable animated GIF handling, use the gif_anim parameter.
gif_anim Parameter
Section titled “gif_anim Parameter”The gif_anim parameter selects which frames to include in the output.
| Value | Effect |
|---|---|
all | Include all frames |
N | Include only frame N (1-indexed) |
N-M | Include frames N through M (inclusive) |
-N | Include the last N frames |
Examples
Section titled “Examples”Resize an animated GIF while keeping all frames:
/200x200,gif_anim/https://example.com/anim.gifExtract frames 1 through 10:
/gif_anim:1-10/https://example.com/anim.gifExtract only the third frame:
/gif_anim:3/https://example.com/anim.gifInclude the last 5 frames:
/gif_anim:-5/https://example.com/anim.gifgif_af Parameter
Section titled “gif_af Parameter”The gif_af (GIF apply-to-frames) parameter controls whether transforms are applied only to the selected frames or to all frames.
| Value | Effect |
|---|---|
false (default) | Only return frames in the gif_anim range |
true | Apply transforms to frames in the gif_anim range, but return all frames |
Example
Section titled “Example”Apply blur to only the last 5 frames while keeping all frames in the output:
/blur=3,gif_anim:-5,gif_af/https://example.com/anim.gif