Git Product home page Git Product logo

animeme's Introduction

Animeme - Create Animated Meme Templates

Installation

Clone this project:

$ git clone https://github.com/OfirKP/pymeme

Then, install the required packages:

$ pip install -r requirements.txt

Animator

A studio made with a PyQt5 GUI to create and edit animated meme templates.

animator

Run

TO BE FIXED: Make sure you have Montserrat-Regular.ttf in the cloned folder.

To open the animator, run $ python animator.py using the python environment with the installed packages.

Loading the animation

Click File -> Load animation or Ctrl + O and load the GIF file you wish to create a template of. If a json template file with the same name as the GIF is present in the same folder, both the animation and the animation data will be loaded into the Animator.

Keyframes

The animation is linearly interpolated from the given keyframes, currently supporting only animated text position & font size keyframes.

Adding keyframes can be done in 2 ways:

  1. Clicking 'Add Keyframe' which will create a keyframe in the current frame with interpolated values.
  2. Dragging a text template across the screen will automatically create a text position keyframe.

Editing Template

  • Adding/removing a text template can be done using the Add New Text Template/Delete Current Text Template.
  • Pressing the Reset button will reset the current text template's animation.
  • Clicking Animation -> Reset all animation data or Ctrl + R will remove all keyframes of all text templates.
  • The Frame Properties panel is used to edit keyframe data. An empty value will cause interpolation of field in the frame.
  • The Text Template Properties panel is used to edit the selected text template's properties (which will apply to all frames).

Saving the template

Click File -> Save template as or Ctrl + S and save the meme template to your preferred location. This will create both <template name>.json and <template name>.gif that are used for generating memes and loading to the animator.

Generate Memes from Template

Make sure you have a template (both GIF and json files in the same directory), then run the python script generate_meme.py with the following format:

$ python generate_meme.py <GIF file> [-t TEXT1] [-t TEXT2] [-t TEXT3] ... [-o OUTPUT] 

NOTE: Add -t "some string" for each corresponding text in the template.

Arguments:

  • -o, --output: output GIF path to save the generated meme of identical contacts in other files
  • -h, --help: help message to get more info about the usage of the script

Prerequisites

๐Ÿ python 3.7+ (may work on older versions)

TODO

  • Support using a text-box with a specified width (and maybe height).
  • Add a font selector that will support multiple platforms.
  • Create a web client (and server) for generating memes out of templates/animator.

animeme's People

Contributors

ofirkp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thepycoder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.