Xmas-Tree-GIF-Tool - Convert any given animated gif file into an animation in GIFT CSV format

Overview

This repo is made to participate in Matt Parker's XmasTree 2021 event.

Convert any given animated gif file into an animation in GIFT CSV format.

Convert a Gif:

  • First, run pip3 install -r requirements.txt to install the necessary packages.
  • To convert a gif you will need a CSV file with coordinates of the Xmas tree's LED lights; Matt Parker's 2021 coordinates are given in examples/coords_2021.csv.
  • Run this command: python3 convert.py
  • The output will be a CSV file in GIFT format which animates the given gif file according to the given LED coordinates.
  • In order to see the gif as clearly as possible, you need to look directly at the tree head-on from the positive X direction (as was discussed here).
  • This conversion also assumes that one frame in the gif corresponds to one frame in the output with no timing information.

Some optional parameters for convert.py:

  • -h, --help: display these options and exit.
  • -o, --output : Name of the output file. By default, the output file will be named export.csv.
  • --width : Dimension along which the width of the gif will be rendered. This is y by default.
  • --height : Dimension along which the height of the gif will be rendered. This is z by default.
  • --disable_aspect: Do not maintain the aspect ratio of the gif, and instead fit it exactly to the boundaries of the given coordinates.

Previewing a CSV file

This repo also provides the ability to preview a GIFT CSV file.

  • pip install requirements if not already
  • run: python3 animate.py
  • The result should be matplotlib's animated 3D dialog box running the animation.

Optional parameters for animate.py:

  • -h, --help: display these options and exit.
  • -f, --framerate : Define the framerate (in FPS) at which to playback the animation. Default is 30. Note that will large coordinate datasets, the framerate may be capped by what matplotlib can handle.

Examples

Provided in the examples directory are some gifs and their corresponding GIFT CSV files (generated with coords_2021.csv), which may be previewed as described above.

  • bad_apple_full.gif: obviously
  • bad_apple_14s.gif: just the first 14 seconds
  • amogus.gif: a🅱ogus
  • rickroll_7s.gif: rickroll intro
  • circle.gif: just a static red circle. Good for finding the right angle from which to look at the tree.
You might also like...
Simple Python package to convert an image into a quantized image using a customizable palette
Simple Python package to convert an image into a quantized image using a customizable palette

Simple Python package to convert an image into a quantized image using a customizable palette. Resulting image can be displayed by ePaper displays such as Waveshare displays.

HtmlWebShot - A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features.
HtmlWebShot - A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features.

A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features

Gbs-image-colorizer - A tool to convert colorful pictures to GB Studio-compatible colorized backgrounds.
Gbs-image-colorizer - A tool to convert colorful pictures to GB Studio-compatible colorized backgrounds.

GB Studio Image Colorizer A tool to convert colorful pictures to GB Studio-compatible colorized backgrounds. Made by NalaFala/Yousurname/Y0UR-U5ERNAME

This app finds duplicate to near duplicate images by generating a hash value for each image stored with a specialized data structure called VP-Tree which makes searching an image on a dataset of 100Ks almost instantanious
This app finds duplicate to near duplicate images by generating a hash value for each image stored with a specialized data structure called VP-Tree which makes searching an image on a dataset of 100Ks almost instantanious

Offline Reverse Image Search Overview This app finds duplicate to near duplicate images by generating a hash value for each image stored with a specia

A simple programme for converting url into a qr code (.png file)
A simple programme for converting url into a qr code (.png file)

QrTk A simple lightweight programme for converting url into a qr code (.png file) Pre-Requisites Before installing the programme , you need to run the

Snowfall - helpful image handling utils - abstracts various file and opencv and pil features into result oriented functions
Snowfall - helpful image handling utils - abstracts various file and opencv and pil features into result oriented functions

snowfall helpful image handling utils - abstracts various file and opencv and pil features into result oriented functions usage examples: from image_h

Transfers a image file(.png) to an Excel file(.xlsx)
Transfers a image file(.png) to an Excel file(.xlsx)

Transfers a image file(.png) to an Excel file(.xlsx)

Draw a torus passing through three given points.
Draw a torus passing through three given points.

PyTorusThreePoints Draw a torus passing through three given points. Usage import numpy as np import pyvista as pv from torus_three_points.main import

missing-pixel-filler is a python package that, given images that may contain missing data regions (like satellite imagery with swath gaps), returns these images with the regions filled.
missing-pixel-filler is a python package that, given images that may contain missing data regions (like satellite imagery with swath gaps), returns these images with the regions filled.

Missing Pixel Filler This is the official code repository for the Missing Pixel Filler by SpaceML. missing-pixel-filler is a python package that, give

Owner
Aven Zitzelberger
Aven Zitzelberger
This Github Action automatically creates a GIF from a given web page to display on your project README

This Github Action automatically creates a GIF from a given web page to display on your project README

Pablo Lecolinet 28 Dec 15, 2022
A Icon Maker GUI Made - Convert your image into icon ( .ico format ).

Icon-Maker-GUI A Icon Maker GUI Made Using Python 3.9.0 . It will take any image and convert it to ICO file, for web site favicon or Windows applicati

Insanecodes 12 Dec 15, 2021
Convert any image into greyscale ASCII art.

Image-to-ASCII Convert any image into greyscale ASCII art.

Ben Smith 12 Jan 15, 2022
👾 Python project to help you convert any image into a pixel art.

?? Pixel Art Generator Python project to help you convert any image into a pixel art. ⚙️ Developer's Guide Things you need to get started with this co

Atul Anand 6 Dec 14, 2022
Pyconvert is a python script that you can use to convert image files to another image format! (eg. PNG to ICO)

Pyconvert is a python script that you can use to convert image files to another image format! (eg. PNG to ICO)

null 1 Jan 16, 2022
This tool allows the user to convert a 16 by 16 image into a list with numbers representing an object/character.

Room Formatter This tool allows the user to convert a 16 by 16 image into a list with numbers representing an object/character. There is cur

Thomas Landstra 1 Nov 13, 2021
A little Python tool to convert a TrueType (ttf/otf) font into a PNG for use in demos.

font2png A little Python tool to convert a TrueType (ttf/otf) font into a PNG for use in demos. To use from command line it expects python3 to be at /

Rich Elmes 3 Dec 22, 2021
Short piece of code to create a rainbow gif of gradual contours from two shapefiles

rainbow-elevation-gif Short piece of code to create a rainbow gif of gradual con

Jess Roberts 6 Jan 17, 2022
Conversion of Image, video, text into ASCII format

asciju Python package that converts image to ascii Free software: MIT license

Aju Tamang 11 Aug 22, 2022
pix2tex: Using a ViT to convert images of equations into LaTeX code.

The goal of this project is to create a learning based system that takes an image of a math formula and returns corresponding LaTeX code.

Lukas Blecher 2.6k Dec 30, 2022