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.
Owner
Aven Zitzelberger
Aven Zitzelberger
Deep Illuminator is a data augmentation tool designed for image relighting.

Deep Illuminator Deep Illuminator is a data augmentation tool designed for image relighting. It can be used to easily and efficiently genera

George Chogovadze 52 Nov 29, 2022
Photini - A free, easy to use, digital photograph metadata (Exif, IPTC, XMP) editing application for Linux, Windows and MacOS.

A free, easy to use, digital photograph metadata (Exif, IPTC, XMP) editing application for Linux, Windows and MacOS. "Metadata" is said to mea

Jim Easterbrook 120 Dec 20, 2022
Detecting haze image with hazer.

hazer-py Detecting haze image with hazer. What is hazer Hazer is a lib for getting "haze degree". This repository is python version of hazer: https://

Joey777210 2 Dec 27, 2021
A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities.

Colour - Demosaicing A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities. It is open source a

colour-science 218 Dec 04, 2022
A pure python implementation of the GIMP XCF image format. Use this to interact with GIMP image formats

Pure Python implementation of the GIMP image formats (.xcf projects as well as brushes, patterns, etc)

FHPyhtonUtils 8 Dec 30, 2022
Python Image Optimizer Script

Image-Optimizer Download and Install git clone https://github.com/stefankumpan/Image-Optimizer-Script.git cd Image-Optimizer-Script pip install -r req

Stefan Kumpan 0 Jul 15, 2021
Using P5.js, Processing and Python to create generative art

Experiments in Generative Art Using Python, Processing, and P5.js Quick Links Daily Sketches March 2021. | Gallery | Repo | Done using P5.js Genuary 2

Ram Narasimhan 33 Jul 06, 2022
Magic-Square - Creates a magic square by randomly generating a list until the list happens to be a magic square

Magic-Square Creates a magic square by randomly generating a list until the list happens to be a magic square. Done as simply as possible... Frequentl

Nick 2 Jan 01, 2022
Python avatar generator for absolute nerds

pagan Welcome to the Python Avatar Generator for Absolute Nerds. Current version: 0.4.3 View the change history here. Remember those good old days whe

David Bothe 280 Dec 16, 2022
image-processing exercises.

image_processing Assignment 21 Checkered Board Create a chess table using numpy and opencv. view: Color Correction Reverse black and white colors with

Benyamin Zojaji 25 Dec 15, 2022
View images in the terminal using ansi escape codes and python

terminal-photo-viewer view images in the terminal using ansi escape codes and python !! Only tested on Ubuntu 20.04.3 LTS with python version 3.8.10 D

1 Nov 30, 2021
ScreenTeX is a tool that grabs all text when taking a screenshot rather than getting an image.

The ScreenTeX project By: Seanpm2001 / ScreenTeX, Et; Al. Top README.md Read this article in a different language 🌐 List of languages Sorted by: A-Z

Sean P. Myrick V19.1.7.2 3 Oct 25, 2022
Glyphtracer is an app for converting images of letters to a font

Glyphtracer takes an image that contains pictures of several letters. It recognizes all them and lets the user tag each letter to a Unicode code point. It then converts the images to vector form and

Jussi Pakkanen 38 Dec 24, 2022
A simple plugin to view APR images in napari

napari-apr-viewer A simple plugin to view APR images in napari This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-

5 Jan 24, 2022
Cat avatars for adult independent users

Cat avatars for adult independent users Samples (Natasha, wake up!) Usage Check values from https://shantichat.github.io/avacats/index.json: { "sizes"

4 Nov 05, 2021
vsketch is a Python generative art toolkit for plotters

Generative plotter art environment for Python

Antoine Beyeler 380 Dec 29, 2022
A simple programming language for manipulating images.

f-stop A simple programming language for manipulating images. Examples OPEN "image.png" AS image RESIZE image (300, 300) SAVE image "out.jpg" CLOSE im

F-Stop 6 Oct 27, 2022
Craft PNG files that appear completely different in Apple software

Ambiguous PNG Packer Craft PNG files that appear completely different in Apple software

David Buchanan 1k Dec 29, 2022
GIMP script to export bitmap as GRAPHICS 4 file (aka SCREEN 5)

gimpfu-msx-gr4.py GIMP script to export bitmap as GRAPHICS 4 file (aka SCREEN 5). GRAPHICS 4 specs are: 256x212 (or 256x192); 16 color palette (from 5

Pedro de Medeiros 4 Oct 17, 2022
Scramb.py is a region based JPEG Image Scrambler and Descrambler written in Python

Scramb.py Scramb.py is a region based JPEG Image Scrambler and Descrambler written in Python. Main features Scramb.py can scramble images regions. So

47 Dec 25, 2022