Feb 02

There are various library for manipulating image,one of them is GD library.
In this post i quickly show how to resize an image or generate thumbnail of image using GD2.

Basic steps as follows

  1. First import image
  2. Resize an import image to desired size
  3. Export Image to desired file

above code is extracted from rchart.

Tagged with:
Oct 01

Rchart is ruby port of the slick pChart charting library.

Using Rchart we can develop various format of chart.

  • Line Chart
  • Cubic Curve Chart
  • Bar Chart
  • Pie Chart
  • Filled Line Chart
  • Stacked Bar Chart

And many more ,You can checkout examples of rchart.Some of examples are listed below.

Stacked Bar Chart

Rchart:- Stacked Bar Chart


Rchart - 3D Pie Chart

Rchart - 3D Pie Chart

Rchart -Line Chart

Rchart -Line Chart

Rchart gem require ruby-gd gem and GD library.

To install rchart gem on ubuntu following packages needed.

  • sudo apt-get install libgd-ruby
  • sudo apt-get install libpng-dev
  • sudo apt-get install libgd2-xpm-dev
  • sudo gem install ruby-gd

After installing rchart,You can checkout examples of rchart.

More examples of rchart is available on http://amardaxini.github.com/rchart/.

Online Documentation is available on http://rdoc.info/gems/rchart/1.1.1/frames

If you have found any difficulties to install or running rchart,then comment on this post or write issues on github.

Tagged with:
preload preload preload