Giter Club home page Giter Club logo

thumbnailer's Introduction

Description
-----------

  This package `Thumbnailer' comes with a library called `thumbnailer' and
  a program called `thumbnailer'.

  The thumbnailer library uses external thumbnailing programs to create an
  image of wanted size from a given file. Supported output formats are PNG
  and JPEG.
  
  As my own use for the thumbnailer is as a source of mipmapped textures,
  the default behaviour is to create a full-size thumbnail. E.g. if you
  have a 3039x2014 camera raw, you'll get a 3039x2014 jpeg or png out. For
  PDFs and videos, the default size is 2048px on the longest side.


Usage
-----

  # create a full-size jpeg thumbnail
  $ thumbnailer foo.png foo.jpg
  $ thumbnailer bar.avi foo.jpg

  # create a png thumbnail that's scaled to fit in a 1024x1024 square
  $ thumbnailer -s 1024 foo.pdf foo_thumb.png


  irb> require 'thumbnailer'

  # fit the jpg inside a 256x256 square
  irb> Thumbnailer.thumbnail("foo.png", "foo_thumb.jpg", 256)

  # page five of the pdf
  irb> Thumbnailer.thumbnail("bar.pdf", "bar_thumb.png", 2048, 5)

  # take the main thumbnail at 30 seconds into the video
  irb> Thumbnailer.thumbnail("qux.avi", "qux_thumb.jpg", 1024, 30)


List of supported formats
-------------------------

  Images
    Most image formats. PSDs probably not too accurately.
    
    Successfully tested:
      jpg, png, gif, svg,
      orf, nef, dng, crw, arw, raf, pef, cr2,
      tif, xpm, ppm, tga, pcx, bmp,
      psd

    Uses image icon:
      xcf

    Uses default icon:
      ai, exr


  Videos
    Anything mplayer / ffmpeg can play.
    
    Successfully tested:
      mkv, flv, avi, mpg, mov, wmv, ogg


  Audio
    Anything mplayer can play.
    
    The audio thumbnailing system is a wee bit peculiar. It relies
    on a Tcl/Tk app to create a waveform and spectrogram of the audio.
    
    Successfully tested:
      mp3, wav, m4a, flac, ra, ogg, wma

    Uses audio icon:
      ape


  Documents
    The document thumbnailer first converts the document into a PDF, then
    thumbnails the PDF. The PDF conversion requires ooffice for office
    documents.
    
    The HTML thumbnailer uses GtkMozEmbed.

    Successfully tested:
      pdf, html, ps, ps.gz, txt, sxi, odp, ppt, doc, xls

    Uses default icon:
      chm
      

  Others
    Thumbnailer uses a mimetype-specific icon from its icons-directory.
    If there's an SVG icon, the SVG icon will be used. Otherwise a PNG icon
    will be used.

    Successfully tested:
      directory, bz2, rar, tar.gz, ttf

    Uses default icon:
      sis, torrent, rb


Requirements
------------

  * Ruby 1.8

  * Metadata library for Ruby
    http://github.com/kig/metadata/tree/master
  
  * Tons of image converter programs and shared-mime-info.
    http://freedesktop.org/wiki/Software/shared-mime-info
    List of debian packages:
      inkscape
      xvfb
      openoffice.org
      python-uno
      libimlib2-ruby
      netpbm
      paps
      gs-common
      imagemagick
      mplayer
      ffmpeg
      libsnack2
      poppler-utils (v0.6 or later, http://poppler.freedesktop.org/)

  * You need the latest version of dcraw to handle some camera raw images.
    http://cybercom.net/~dcoffin/dcraw/

  * You need unoconv for thumbnailing office documents:
    http://dag.wieers.com/home-made/unoconv/


Install
-------

  De-compress archive and enter its top directory.
  Then type:

   ($ su)
    # ruby setup.rb

  These simple step installs this program under the default
  location of Ruby libraries.  You can also install files into
  your favorite directory by supplying setup.rb some options.
  Try "ruby setup.rb --help".


License
-------

  GPL v3


Ilmari Heikkinen <ilmari.heikkinen gmail com>

thumbnailer's People

Contributors

kig avatar

Stargazers

Thomas Drach avatar

Watchers

Thomas Drach 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.