rmagick-temp / rmagick

An interface to the ImageMagick and GraphicsMagick image processing libraries.
http://rmagick.rubyforge.org/
MIT License
790 stars 102 forks source link

convert image #109

Open Meenal-goyal opened 10 years ago

Meenal-goyal commented 10 years ago

I am running this command on the image:

 convert -verbose -density 150 -trim input.jpg -quality 100 -sharpen 0x1.0 output.jpg

But I wanted to execute same thing using ruby script, so i tried this:

im = Magick::Image.read(pdf_file_name) im.each do | img | im[0].density = "150" im[0].trim! im[0] = im[0].sharpen(0,1.0) im[0].write("final.jpg") {self.quality = 100} end

The problem is both are giving different outputs. Could you please tell where am i going wrong?