How can I convert an ImageMagick shell script for use in my RoR project?

58 views
Skip to first unread message

Eric Kornmeyer

unread,
Apr 9, 2014, 7:55:16 PM4/9/14
to rubyonra...@googlegroups.com
I'm creating a project that lets users upload images onto products and
then buy the products. I'm using Carrierwave and Minimagick. I found
this cylnderize script on fmwconcepts. It's a shell script. It is
literally perfect for what I need as a lot of the products are mugs.
Does anyone know how I might be able to convert the script into
minimagick code I can use in my controller?

--
Posted via http://www.ruby-forum.com/.

Thota praneeth

unread,
Apr 10, 2014, 12:09:34 AM4/10/14
to rubyonra...@googlegroups.com
Hello Eric,
                I hope this is the one you need:
               system <<-COMMAND
                  convert image.png -monochrome -format png -density 300 another_image.png
            COMMAND


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/31c5890c998868fe07630e9531e5c866%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.



Eric Kornmeyer

unread,
Apr 10, 2014, 12:48:28 AM4/10/14
to rubyonra...@googlegroups.com
Lol that doesn't wrap an image around a cylinder thanks though

Walter Lee Davis

unread,
Apr 10, 2014, 6:48:43 AM4/10/14
to rubyonra...@googlegroups.com
Here's just one of the many examples out there of how to code a plugin for CarrierWave:

http://www.freezzo.com/2010/12/23/create-ffmpeg-processor-for-carrierwave-in-rails-3/

Personally, I find the tooling around Paperclip to be a lot more hackable in this regard. The thumbnail processor can be duplicated in place, modified with different command-line arguments, and used as a different "style" in the collection. It helps that Paperclip does their own thumbnail as a plug-in, so you're on a par with the core functionality.

Walter
Reply all
Reply to author
Forward
0 new messages