rmagick

How to deal with memory leaks in RMagick in Ruby?

ぐ巨炮叔叔 提交于 2019-11-30 07:25:33
问题 Im developing web-application with Merb and im looking for some safe and stable image processing library. I used to work with Imagick in php, then moved to ruby and start using RMagick. But there is a problem. Long running scripts causing memory leaks. There are couple solution exists, but I don't know which one is the most stable. So, what do you think? Right now, my app uses internal API that i wrote to process images, in PHP. Its running on separate server along with other applications, so

Can't install rmagick, pkg-config: command not found

被刻印的时光 ゝ 提交于 2019-11-30 06:45:28
I'm trying to install rmagick on my Mac OS X v10.9 (Mavericks) machine. However. I get this error /usr/local/bin/Magick-config: line 41: pkg-config: command not found /usr/local/bin/Magick-config: line 47: pkg-config: command not found /usr/local/bin/Magick-config: line 50: pkg-config: command not found /usr/local/bin/Magick-config: line 53: pkg-config: command not found checking for stdint.h... yes checking for sys/types.h... yes checking for wand/MagickWand.h... yes /usr/local/bin/Magick-config: line 53: pkg-config: command not found Can't install RMagick 2.13.2. Can't find the ImageMagick

Carrierwave - Resizing images to fixed width

邮差的信 提交于 2019-11-30 04:30:59
I'm using RMagick and want my images to be resized to a fixed width of 100px, and scale the height proportionally. For example, if a user were to upload a 300x900px, I would like it to be scaled to 100x300px. Just put this in your uploader file: class ImageUploader < CarrierWave::Uploader::Base version :resized do # returns an image with a maximum width of 100px # while maintaining the aspect ratio # 10000 is used to tell CW that the height is free # and so that it will hit the 100 px width first process :resize_to_fit => [100, 10000] end end Documentation and example here: http://www

Carrierwave add a watermark to processed images

社会主义新天地 提交于 2019-11-30 02:45:25
Im trying to add a watermark to processed images with below code I got from several resources: def watermark manipulate! do |img| logo = Magick::Image.read("#{Rails.root}/assets/images/watermarks/watermark.png").first img = img.composite(logo, Magick::SouthEastGravity, Magick::OverCompositeOp) end end Only problem is, you guess it, does not work. I get no errors in log/console whatsoever This is my method inside my uploaded and called like: def function version :thumb do process :resize_to_fill => [96, 96] process :watermark end end Any thoughts on getting some logs on why this doesn't work? I

RMagick complains it was configured with a different version of ImageMagick

不问归期 提交于 2019-11-29 22:53:05
I am getting following error while running local script/server of my Rails project: This installation of RMagick was configured with ImageMagick 6.6.1 but ImageMagick 6.4.5 is in use. (RuntimeError) Running identify --version shows the following: Version: ImageMagick 6.6.1-10 2010-05-21 Q8 http://www.imagemagick.org So, my question is how and where should I make changes to work it fine; I have already reinstalled ImageMagick but that didn't work. the same thing happened to me but the solution was a bit simpler than uninstalling imageMagick. It sounds like Rmagick's config file isn't updated to

How do I take screenshots of web pages using ruby and a unix server? [closed]

。_饼干妹妹 提交于 2019-11-29 22:41:34
I'm trying to programatically create thumbnail images of a large number of web pages that are hosted on my own ruby/rails-based website. I want to be able to code a stand-alone bit of ruby that looks something like this: require 'awesome-screenshot-maker' items.each do |id| url = "http://foo.com/bar/#{id}" shooter = AwesomeScreenshotMaker.new(0.2) # thumbnails are 20% of original shooter.capture(url, "/images/thumbnail-#{id}.png") end I need the awesome-screenshot-maker library (and its dependencies) to be fairly easy to build on Linux, Solaris and Mac OS X. Ideally it will install with a

ImageMagick 7 with RMagick 2.16 on MacOS Sierra Can't find MagickWand.h

青春壹個敷衍的年華 提交于 2019-11-29 20:46:44
I upgraded to imagemagick-7.0.4-3.sierra and now my previously installed RMagck 2.16 fails. I checked for MagicWand: $ find /usr/local -name MagickWand.h /usr/local/Cellar/imagemagick/7.0.4-3/include/ImageMagick-7/MagickWand/MagickWand.h So it seems to be there. Also I reinstalled and relinked pgk-config. Didn't help as well. Any ideas? dyson returns I have just encountered and solved this issue on a new Mac running Sierra. There seems to be no solution for ImageMagick 7 at this time. Uninstall existing imagemagick if needed Install version 6: brew install imagemagick@6 Since this is keg-only,

Can't install RMagick with rbenv

空扰寡人 提交于 2019-11-29 18:06:27
问题 I'm using rbenv on my Ubuntu 10.04 server and I already installed ImageMagick, but I can't get RMagick to install successfully. I get the following error message Can't install RMagick 2.13.1. Can't find MagickWand.h Any ideas? Thanks! 回答1: You need to install the development headers for libmagickwand like so: apt-get install libmagickwand-dev 来源: https://stackoverflow.com/questions/9855818/cant-install-rmagick-with-rbenv

rmagick leads to server shutdown

牧云@^-^@ 提交于 2019-11-29 17:17:24
问题 everyone! I was following Railscasts episode #253, using CarrierWave to do image upload. Everything was fine to display the original image, even though the image looked quite big in the browser. I strictly followed Ryan Bates' instructions. But, when I tried to resize the image using rmagick and press upload button, I always got server shutdown . I am using rmagick 2.13.1 And I followed this blog's instruction to install homebrew, and imagemagick on my mac. The error message is shown below.

Issue with installing ImageMagick and rmagick on Mountain Lion

社会主义新天地 提交于 2019-11-29 09:34:01
I am facing issues with installing rmagick in mountain lion. I have installed Xcode 4.4 and developer tools. Still facing this issue. Installing rmagick (2.13.1) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks! /Users/mohit/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /Users/mohit/.rvm/rubies