pikl

Get Version

0.2.8

What

Pikl is an image librarry for JPEG, PNG and Bitmap. Pikl’s API is designed to process the image easily with method chain.

Installing

Windows

$ sudo gem install pikl

Linux

Linux requires libjpeg and libpng.
Install These libraries with yum or apt-get.

$ sudo yum install libjpeg
$ sudo yum install libjpeg-devel
$ sudo yum install libpng
$ sudo yum install libpng-devel

And use gem command.

$ sudo gem install pikl

OSX

OSX requires libjpeg and libpng.
Install These libraries with Fink or MacPorts .

With Fink

$ sudo fink install libjpeg
$ sudo fink install libjpeg-devel
$ sudo fink install libpng3
$ sudo fink install libpng3-devel
$ sudo gem install pikl -- --with-opt-dir=/sw

With MacPorts

$ sudo port install libjpeg
$ sudo port install libjpeg-devel
$ sudo port install libpng
$ sudo port install libpng-devel
$ sudo gem install pikl -- --with-opt-dir=/opt/local

The basics

Basic use of pikl

require "rubygems"
require "pikl"
Pikl::Image.open('path/to/image.jpg') do |img|
  img.trim(10,5,-10,-5)
  img.save('path/to/output.png', :png)
end

Use method chain for processing image

require "rubygems"
require "pikl"
Pikl::Image.open('path/to/image.jpg') do |img|
  img.resize(120,:auto).rotate(90).save('path/to/output.png')
end

License

This code is free to use under the terms of the MIT license.

Contact

Comments are welcome. Send an email to “Ryota Maruko” email via the forum

Ryota Maruko, 9th October 2008
Theme extended from Paul Battley, by Daniel Cadenas via DepGraph