ResourceImporterGIF๏ƒ

Inherits: ResourceImporter < RefCounted < Object

Imports a .gif file as an animated GIFTexture.

Description๏ƒ

Default importer for .gif files. Decodes the animation into a GIFTexture, which plays back in any node accepting a Texture2D. To import the same file as a SpriteFrames for AnimatedSprite2D instead, select SpriteFrames in the Import dock's Import As dropdown (ResourceImporterGIFFrames).

Properties๏ƒ

bool

autoplay_on_load

true

bool

bake_compress

false

int

bake_storage

1

int

display_mode

0

bool

dither

true

int

loop_count

0

float

speed_scale

1.0


Property Descriptions๏ƒ

bool autoplay_on_load = true ๐Ÿ”—

If true, the imported GIFTexture starts playing as soon as it is loaded. Matches GIFTexture.autoplay_on_load.


bool bake_compress = false ๐Ÿ”—

If true, compresses baked frame textures (VRAM/WebP depending on project settings) to reduce memory use at the cost of quality and load time.


int bake_storage = 1 ๐Ÿ”—

Store: frame textures are baked during import and stored in the imported resource. Generate On Load: only source data is stored; frames are generated on first use, trading startup cost for smaller imports.


int display_mode = 0 ๐Ÿ”—

Source: render raw GIF frames. Baked: composite disposal, offsets, and transparency into full-canvas frames. Matches GIFTexture.display_mode.


bool dither = true ๐Ÿ”—

Dithers semi-transparent pixels when baking, improving edges on backgrounds that do not match the GIF's transparency color.


int loop_count = 0 ๐Ÿ”—

Netscape loop count written onto the imported texture. 0 loops forever; a positive value plays that many times. Matches GIFTexture.netscape_loop_count.


float speed_scale = 1.0 ๐Ÿ”—

Playback speed applied to the imported GIFTexture. Negative values play in reverse. Matches GIFTexture.speed_scale.