[BlushyFace.Util] Extract GIF files to spritesheets + GUI

Description
A way to extract GIF files into a sprite sheet.

Note: This is a stripped down version of the BlushyFace.Util library that is used for my other projects (such as BlushyAvatars etc) written in C#. This version does not provide / generate a meta data file such as frame time and other info that might be useful to include when using the generated sprite sheet or other features such as adding padding, resizing etc.

Requirements
.NET framework 4.7x or higher + internet connection if you are converting files from the internet.

How to use
Look at the example code below how to use it.

The extracted files will be created in {basedir}\finished\ and the temp files (extracted frames) in {basedir}\temp\
To use it you need to add it to your project (example in VS -> references, add reference, find “BlushyFace.dll” and then click “OK”).

Basically there are 2 methods provided:

Utilities.DownloadFile(url of file, save location);
Utilities.ExtractGifToSpritesheet(output name, file location, save location, clean up temp files);

Example code

Example console output

Result (original)

result (output)

Download
The file can be downloaded in our discord server in the “home-of-blushies” look for “ConvertGifToSpriteSheet.rar” or blog.blushyface.com/download/gif-to-sprite-sheet-extractor/

Update
Made a GUI version for those that prefer that.

Update #1 added a checkbox to delete the extracted frames in \temp\

Update #2 added an “open directory” button to open output directory directly

Update #3 added “merge down” to merge extracted gifs / png’s as a single spritesheet

 

Herrow, I'm BlushyFace and this is where you can read about Blushies. I hope you enjoy my silly content as much as I have fun creating!
Consider a tip if you like my content, thank you for supporting my content!

PS: Due to current and unforeseen circumstances (lockdown & reduced income due layoffs) I'm currently open for commissions!

Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Site Footer

@Blushyface | All Rights Reserved - Blushyface.com