Project

giftrim

0.0
No commit activity in last 3 years
No release in over 3 years
GIF optimizations using gifsicle
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 0.2.2
 Project Readme

GifTrim

Provide convenient methods for GIF optimizations using gifsicle

Tested on the following Rubies: MRI 1.9.3, 2.0.0, Rubinius, JRuby (1.9 mode).

Gem Version Build Status Coverage Status Code Climate Dependency Status

Installation

Add this line to your application's Gemfile:

gem "giftrim"

Usage

Resize to 300x300, and trim to 10 frames

image = Giftrim::Image.open "input.gif"
image.trim
image.write "output.gif"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

See LICENSE.txt and LICENSE_MiniMagick.txt

The Testing GIF was retrieved from http://commons.wikimedia.org/wiki/File:Lightnings_sequence_2_animation.gif licensed under Creative Commons Attribution-Share Alike 2.5 Generic license

Alternatives

The first version was at the branch minimagick. It adds frames trimming methods to MiniMagick::Image. However, from my tests mogrify is not accepting -delete ranges, such as -delete 1-2,4,6.

This version uses gifsicle instead of ImageMagick which allows selecting frames to be included.