icedream / lazlow

Lazy but low-effort animations out of existing images!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LazLow Image & Animation Generator

This tool is made to let you easily modify or animate images with preprogrammed effects.

Currently supported effects:

  • Animated violent image shaking
  • Discord ping count overlay

Currently supported output formats:

  • GIF (static and animated), you want to use this format for when you upload animations as emojis to Discord
  • WebP (static and animated), this is better for static images on Discord, WebP animations somehow don't work there yet
  • PNG (static and animated), however Animated PNG tends to be unsupported by most software
  • JPEG (static only)

Requirements

  • If you want to use the Discord Ping effect, you will need whitneybold.otf from the Whitney font package extracted as-is to the directory where you run the executable.

Usage

usage: lazlow [<flags>] <effect> <input-file> <output-file>

Lazy, low-effort meme generator tool


Flags:
    --help                   Show context-sensitive help.
-t, --output-type=auto       Output file type
    --discord-ping-number=1  What the red counter at the bottom right should display
    --shake-delay=20ms       Delay between frames
    --shake-frames=12        How many frames to generate
    --shake-percentage=20    How much to shake the picture in percent
    --jpeg-quality=90        The quality level with which JPEG output will be written, where 100 = lossless and lower will be increasingly lossy.
    --webp-lossless          Enable lossless output

Args:
<effect>       Effect to use
<input-file>   Input file name
<output-file>  Output file name

Examples

Shake an image of your choice:

lazlow shake yourimage.png yourimage_shake.gif

Above but more violently:

lazlow shake yourimage.png yourimage_shake.gif --shake-percentage=50

As a WebP instead:

lazlow shake yourimage.png yourimage_shake.webp

As APNG instead:

lazlow shake yourimage.png yourimage_shake.png

Put a discord ping counter on an image:

lazlow discord-ping yourimage.png yourimage_ping.png

Above, but with the counter saying 1337 instead of just 1:

lazlow discord-ping yourimage.png yourimage_ping.png --discord-ping-number=1337

Known issues

  • Animated WebP files generated by this tool fail to load on Discord, it's unknown whether this is just an issue with this tool's output or with animated WebP files in general.

Building

All you need to compile is Go, you don't even have to clone the source code since Go will do that for you. Just run this command:

go get github.com/icedream/lazlow/cmd/lazlow

This is enough to build the binary and it will be put into your ${GOPATH}/bin by Go.

About

Lazy but low-effort animations out of existing images!


Languages

Language:Go 99.0%Language:Makefile 1.0%