All Projects → jegor377 → godot-gdgifexporter

jegor377 / godot-gdgifexporter

Licence: MIT license
Gif exporter for Godot made entirely in GDScript

Programming Languages

GDScript
375 projects
GLSL
2045 projects

Projects that are alternatives of or similar to godot-gdgifexporter

hydro
Hydro is a Godot Engine module which allows rigid bodies to behave realistically in water.
Stars: ✭ 39 (-54.12%)
Mutual labels:  godot, godot-engine
godot tools
A set of GDScript EditorScript and EditorPlugins tools that automate boring tasks on Godot Engine.
Stars: ✭ 50 (-41.18%)
Mutual labels:  godot, godot-engine
godot-website
The code for the official Godot Engine website. A static site built using Jekyll.
Stars: ✭ 167 (+96.47%)
Mutual labels:  godot, godot-engine
TTFancyGifDialog-Android
TTFancyGifDialog makes your Android Dialog Fancy and more Beautiful. A library that makes normal Android Dialog to high level Dialog with many styling options and fully customizable. Make dialog from few lines of code.
Stars: ✭ 61 (-28.24%)
Mutual labels:  gif-library, gif
novemberdev soulslike darksouls godot
Dark Souls clone in 3D with Godot
Stars: ✭ 51 (-40%)
Mutual labels:  godot, godot-engine
gifs
gifs for thought
Stars: ✭ 19 (-77.65%)
Mutual labels:  gif-library, gif
liblast
A libre multiplayer FPS game created in Godot Engine
Stars: ✭ 92 (+8.24%)
Mutual labels:  godot, godot-engine
Luascript
Lua language support for Godot Engine
Stars: ✭ 240 (+182.35%)
Mutual labels:  godot, godot-engine
PimplePopper
Game to pop pimples using the awesome Godot Engine
Stars: ✭ 23 (-72.94%)
Mutual labels:  godot, godot-engine
GDGotm
Official Godot plugin for gotm.io - the Godot Platform!
Stars: ✭ 43 (-49.41%)
Mutual labels:  godot, godot-engine
nativelib-cli
NativeLib is a plugin management system for Godot engine.
Stars: ✭ 19 (-77.65%)
Mutual labels:  godot, godot-engine
Godot-DialogPlugin
🗨️ A Dialog Node for Godot Engine
Stars: ✭ 194 (+128.24%)
Mutual labels:  godot, godot-engine
GiphyImageResultsPreview
Library for GIF results, preview, play, share everything at one place!
Stars: ✭ 28 (-67.06%)
Mutual labels:  gif-library, gif
godot-local-notification
Godot module for local notifications (android and iOS)
Stars: ✭ 111 (+30.59%)
Mutual labels:  godot, godot-engine
GodotRecorder
A simple addon to record frames of in-game footage.
Stars: ✭ 47 (-44.71%)
Mutual labels:  gif, godot
godot-logger
Simple in-game logger for Godot 4.0
Stars: ✭ 14 (-83.53%)
Mutual labels:  godot, godot-engine
Awesome Godot
A curated list of free/libre plugins, scripts and add-ons for Godot
Stars: ✭ 3,092 (+3537.65%)
Mutual labels:  godot, godot-engine
Godot Realistic Water
Godot - Realistic Water Shader
Stars: ✭ 235 (+176.47%)
Mutual labels:  godot, godot-engine
godot-practice-shaders
Some practice shaders in Godot
Stars: ✭ 79 (-7.06%)
Mutual labels:  godot, godot-engine
godot-rpgdb
An easy to use JSON database-manager for Godot.
Stars: ✭ 25 (-70.59%)
Mutual labels:  godot, godot-engine

Gif exporter for Godot made entirely in GDScript

This is gif exporter for godot made entirely using GDScript. This is based on godot-gifexporter.

Mentioned in Awesome Godot

Example

extends Node2D


# load gif exporter module
const GIFExporter = preload("res://gdgifexporter/exporter.gd")
# load quantization module that you want to use
const MedianCutQuantization = preload("res://gdgifexporter/quantization/median_cut.gd")


func _ready():
	var img := Image.new()
	# load your image from png file
	img.load('res://image.png')
	# remember to use this image format when exporting
	img.convert(Image.FORMAT_RGBA8)

	# initialize exporter object with width and height of gif canvas
	var exporter = GIFExporter.new(img.get_width(), img.get_height())
	# write image using median cut quantization method and with one second animation delay
	exporter.add_frame(img, 1, MedianCutQuantization)

	# when you have exported all frames of animation you, then you can save data into file
	var file: File = File.new()
	# open new file with write privlige
	file.open('user://result.gif', File.WRITE)
	# save data stream into file
	file.store_buffer(exporter.export_file_data())
	# close the file
	file.close()

Quantization methods

Addon supports two quantization methods:

  • Median Cut
  • Uniform (with small color adjustment)

Both method files are stored in gdgifexporter/quantization directory.

Error Codes

Some methods give error codes. These are used error codes and their meaning:

  • OK = 0 (Everything went okay)
  • EMPTY_IMAGE = 1 (Passed image object has no data in it)
  • BAD_IMAGE_FORMAT = 2 (You are using different image format than FORMAT_RGBA8)

Contributors

If you want to contribute to this code then go ahead! :) Huge thanks to Kinwailo and novhack. This project wouldn't work without their help! :D

Used external libs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].