Giter VIP home page Giter VIP logo

ezrgif's Introduction

ezrgif

Docker Repository on Quay

GIF effects from the command-line. (A sh wrapper around imagemagick and the giflossy fork of gifsicle)

terminal

Get it

Docker image (easiest)

Pull & tag:

docker pull quay.io/sergey_grebenshchikov/ezrgif
docker tag quay.io/sergey_grebenshchikov/ezrgif ezrgif

You can now simply docker run -i ezrgif.

From source

This probably starts up a bit faster than the Docker option, but you need to take care of the dependencies yourself.

$ curl -sSL https://raw.githubusercontent.com/sgreben/ezrgif/master/gif.sh > gif
$ chmod +x gif

As to the dependencies: you will need to install imagemagick, as well as the --lossy fork of gifsicle:

Install prerequisites (Mac)

$ brew install imagemagick giflossy

Install prerequisites (linux)

See Dockerfile

Use it

Docker image

$ docker run --rm -i ezrgif -h
Usage:
    ezrgif (roll | wobble | pulse | zoom | shake | woke | fried | optimize) [ -h ] [ OPTIONS ]

From source

$ ./gif -h
Usage:
    gif (roll | wobble | pulse | zoom | shake | woke | fried | optimize) [ -h ] [ OPTIONS ]

Examples

If you're using Docker, put this in your shell aliases:

$ alias gif="docker run -i --rm ezrgif"

Pulse+wobble+optimize

$ <doc/moth.png gif pulse -0 1.0 -1 1.5 -n 20 | gif wobble -d 3x100 -p 100% -c 100% | gif optimize > doc/moth.gif

beforeafter

Wobble

$ <doc/eggplant.png gif wobble -c 60% -n 20 > doc/eggplant.gif

beforeafter

Woke+optimize

$ <doc/moth.png gif woke -f -n 10 -y -15 -a 1.0 -m linear-dodge -z 60% | gif optimize > doc/woke.gif

beforeafter

Effects

roll

roll

roll [-p PAD_TO] [ -c CUT_TO ] [ -d DELAY ] [ -n NUM_FRAMES ] [ -r REVOLUTIONS ] [ -s FINAL_SIZE ] INPUT
defaults:
    PAD_TO=200%
    CUT_TO=50%
    DELAY=2x100
    NUM_FRAMES=1
    REVOLUTIONS=1
    FINAL_SIZE=128x128

wobble

wobble

wobble [-p PAD_TO] [ -c CUT_TO ] [ -d DELAY ] [ -n NUM_FRAMES ] [ -a AMPLITUDE ] [ -f FREQUENCY ] [ -s FINAL_SIZE ] INPUT
defaults:
    PAD_TO=200%
    CUT_TO=50%
    DELAY=2x100
    NUM_FRAMES=1
    AMPLITUDE=8
    FREQUENCY=1
    FINAL_SIZE=128x128

pulse

pulse

pulse [-p PAD_TO] [ -c CUT_TO ] [ -d DELAY ] [ -n NUM_FRAMES ] [ -0 SCALE_MIN ] [ -1 SCALE_MAX ] [ -f FREQUENCY ] [ -s FINAL_SIZE ] INPUT
defaults:
    PAD_TO=200%
    CUT_TO=50%
    DELAY=2x100
    NUM_FRAMES=1
    SCALE_MIN=0.5
    SCALE_MAX=1.0
    FREQUENCY=1
    FINAL_SIZE=128x128

zoom

zoom

zoom [-p PAD_TO] [ -c CUT_TO ] [ -d DELAY ] [ -n NUM_FRAMES ] [ -0 SCALE_MIN ] [ -1 SCALE_MAX ] [ -e POWER ] [ -s FINAL_SIZE ] INPUT
defaults:
    PAD_TO=200%
    CUT_TO=50%
    DELAY=2x100
    NUM_FRAMES=1
    SCALE_MIN=0.5
    SCALE_MAX=1.0
    POWER=2.0
    FINAL_SIZE=128x128

shake

shake

shake [-p PAD_TO] [ -c CUT_TO ] [ -d DELAY ] [ -n NUM_FRAMES ] [ -x AMPLITUDE_X ] [ -y AMPLITUDE_Y ] [ -f FREQUENCY_X ] [ -g FREQUENCY_Y ] [ -o PHASE_Y ] [ -r PHASE_RANDOM ] [ -s FINAL_SIZE ] INPUT
defaults:
    PAD_TO=200%
    CUT_TO=50%
    DELAY=2x100
    NUM_FRAMES=1
    AMPLITUDE_X=10
    AMPLITUDE_Y=10
    FREQUENCY_X=2
    FREQUENCY_Y=2
    PHASE_Y=pi/2
    FINAL_SIZE=128x128
    PHASE_RANDOM=pi

woke

woke

woke [ -f | -v ] [ -m MODE ] [ -n FLARE_FRAMES ] [ -x FLARE_X ] [ -y FLARE_Y ] [ -z FLARE_SCALE ] [ -a FLARE_ALPHA ] [ -r FLARE_ANGLE_RANDOM ] [ -t FLARE_TRANSFORM ] [ -d DELAY ] [ -s FINAL_SIZE ] INPUT
defaults:
    MIRROR_X=0
    MIRROR_Y=0
    MODE=linear-light
    FLARE_FRAMES=
    FLARE_X=-33
    FLARE_Y=-5
    FLARE_SCALE=90%
    FLARE_ALPHA=0.5
    FLARE_ANGLE_RANDOM=30
    FLARE_TRANSFORM=0
    DELAY=2x100
    FINAL_SIZE=128x128
available -m modes:
    Atop, Blend, Blur, Bumpmap, ChangeMask, Clear, ColorBurn, ColorDodge, Colorize, CopyAlpha, CopyBlack, CopyBlue, CopyCyan, CopyGreen, Copy, CopyMagenta, CopyRed, CopyYellow, Darken, DarkenIntensity, DivideDst, DivideSrc, Dst, Difference, Displace, Dissolve, Distort, DstAtop, DstIn, DstOut, DstOver, Exclusion, HardLight, HardMix, Hue, In, Intensity, Lighten, LightenIntensity, LinearBurn, LinearDodge, LinearLight, Luminize, Mathematics, MinusDst, MinusSrc, Modulate, ModulusAdd, ModulusSubtract, Multiply, None, Out, Overlay, Over, PegtopLight, PinLight, Plus, Replace, Saturate, Screen, SoftLight, Src, SrcAtop, SrcIn, SrcOut, SrcOver, Stereo, VividLight, Xor,

fried

fried

fried [ -d DISTORT ] [ -c CUT_TO ] [ -o COLOR ] [ -t TINT ] [ -b BLACK_POINT ] [ -w WHITE_POINT ] [ -u SATURATION ] [ -l LOSS ] [ -m COLORS ] [ -s FINAL_SIZE ] [ INPUT ]
defaults:
    DISTORT_X=0
    DISTORT_Y=0
    DISTORT=0.5
    CUT_TO=60%
    COLOR=orange
    TINT=80%
    SATURATION=150
    BLACK_POINT=25
    WHITE_POINT=85
    COLORS=133
    LOSS=3000
    FINAL_SIZE=128x128

optimize

optimize [ -g TARGET_GEOMETRY ] [ -s TARGET_SIZE_KB ] [ INPUT ]
defaults:
    TARGET_GEOMETRY=128x128
    TARGET_SIZE_KB=128

ezrgif's People

Contributors

sgreben avatar

Stargazers

 avatar

Watchers

 avatar

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.