rmagick

I can't install rmagick gem on windows

和自甴很熟 提交于 2019-12-03 18:55:06
问题 I used ruby 1.9.2 and rails 3.0.3. iam trying to install rmagick gem but when i run bundle install I got an error tells me: Installing rmagick (2.12.1) with native extensions c:/Ruby192/lib/ruby/site_ruby /1.9.1/rubygems/installer.rb:529:in `rescue in block in build_extensions': ERROR : Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) c:/Ruby192/bin/ruby.exe extconf.rb checking for Ruby version >= 1.8.5... yes checking for stdint.h... *** extconf.rb failed *** Could

How do you generate retina (iPad) friendly (progressive or interlaced) jpeg images with CarrierWave?

[亡魂溺海] 提交于 2019-12-03 16:43:48
There are numerous reports that Mobile Safari downsamples very large JPEG images, making it difficult to put out retina-friendly resolutions for the new iPad. The solution seems to be encoding JPEGs as progressive/interlaced files. Hence, I'm curious how I might use the CarrierWave plugin, and RMagick by extension, to generate this type of file. Thanks! Lucas Renan You can use MiniMagick : manipulate! do |img| img.strip img.combine_options do |c| c.quality "90" c.depth "8" c.interlace "plane" end img end As of today, you will need the repository version of carriewave as options[:write] support

JPG to PNG using RMagick

大兔子大兔子 提交于 2019-12-03 16:37:49
I'm trying to convert a fetched image from JPG to PNG using RMagick, resize it and then store it on S3: thumb = Magick::Image.read("artist.jpg").first thumb.write("artist.png") thumb.crop_resized!(120, 120, Magick::CenterGravity) AWS::S3::S3Object.store("image.png", thumb.to_blob, AWS_BUCKET, :content_type => 'image/png', :access => :public_read) The image does get saved as a png but when I open it in Preview, document type still says "JPEG image". In fact, the image won't even open in Photoshop unless I change the extension back to ".jpg". Am I missing something? Try explicitly setting the

RMagick can not read remote image

烈酒焚心 提交于 2019-12-03 16:37:07
问题 My env is Linux centos, and use ruby 1.8.7, and the code is here below: require 'rubygems' require 'RMagick' Magick::Image.read("http://image.domain.com/image.darenhui.com/images/random_bg/01.jpg")[0] it throws error like below: in `read': no decode delegate for this image format `//image.domain.com/images/random_bg/01.jpg' @ error/constitute.c/ReadImage/532 (Magick::ImageMagickError), but if i read from local like: require 'rubygems' require 'RMagick' Magick::Image.read("/local/staticimages

Can't install rmagick gem on Ubuntu 13.04

落花浮王杯 提交于 2019-12-03 13:04:07
问题 When I try to install rmagic with: gem install rmagic it gives error: Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /home/biske/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... yes checking for ImageMagick version >= 6.4.9... yes checking for HDRI disabled version of ImageMagick... yes checking for stdint.h... yes

Can't install RMagick 0.0.0. Can't find Magick-config

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 12:06:02
I'm running a debian server and upgraded all packages after quite a while ( apt-get update , apt-get upgrade , apt-get distro-upgrade ). Then rmagick didn't work anymore becuase imagemagick was updated. So I ran: gem uninstall rmagick bundle install Then I got this: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... no Can't install RMagick 0.0.0. Can't find Magick-config in /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games *** extconf.rb failed

rails convert html to image

流过昼夜 提交于 2019-12-03 06:51:04
问题 I'm looking for a way to convert html tags to a image on the fly... That means, that I want to be able to make a image_tag with a path to a method which returns the image created form html. I was looking for a solution on that, but couldn't come up with a proper way to solve that... Any Ideas? Maechi 回答1: IMGkit can do the job (details on github) Create JPGs using plain old HTML+CSS kit = IMGKit.new('http://google.com') kit.to_jpg kit.to_jpeg kit.to_png kit.to_tif kit.to_tiff or in your

All of a sudden started getting “Could Not Run The `Identify` Command. Please Install ImageMagick.”

六眼飞鱼酱① 提交于 2019-12-03 06:38:56
问题 I've had ImageMagick, RMagick, & PaperClip working properly with everything setup including the config Paperclip.options[:command_path] in production.rb file. All of a sudden I've started getting the following error: Could Not Run The `Identify` Command. Please Install ImageMagick. I've tried everything. I've reinstalled ImageMagick, etc. but no avail. Any help would be greatly appreciated. 回答1: You need to change the files production.rb and development.rb which are in: config/environments :

Problem installing RMagick rubygem on Centos 5

我只是一个虾纸丫 提交于 2019-12-03 05:06:20
问题 I'm having problems installing the RMagick rubygem on Centos 5. I've followed the steps detailed in http://rmagick.rubyforge.org/install2-linux.html but when I try: sudo gem install rmagick the result is: Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... no Can't install RMagick 2.11.0.

RMagick + Rails + Heroku?

别来无恙 提交于 2019-12-03 04:22:49
问题 I'm trying to figure out how to get rmagick on my app, and then make it work on Heroku? 回答1: For Rails3, you have to add this specification: gem "rmagick", "2.12.0", :require => 'RMagick' Note: require is CAsE SeNSITIvE 回答2: Ok so for future reference heres what needs to be done. In your .gems file you need: rmagick and then in your config/environment.rb file you need: config.gem "rmagick", :lib => "RMagick" Because its already preinstalled with heroku - this does the trick. 回答3: Once I did