ImageMagick

gem install rmagick fails on OS X El Capitan

本秂侑毒 提交于 2019-12-21 04:18:07
问题 I upgraded to El Capitan a couple of days ago and ran a brew update && brew upgrade It updated imagemagick which caused ruby's rmagick gem to stop working. No problem I thought, I'll just run gem install rmagick and it will recompile. Except it didn't, when I run it I see this: gem install rmagick Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /Users/sam/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20151019

ImageMagick change aspect ratio without scaling the image

妖精的绣舞 提交于 2019-12-21 04:17:10
问题 I have a large number of images that can be any dimension that I need make into the same aspect ratio (basically square). So if one image is 100x300 the output should be 300x300. What I don't want is the image scaled or stretched in any way. I just want a background color (white) applied to the sides of the image, then the original image centered (either vertically or horizontally depending on the original aspect ratio). I've played around with a couple different convert commands, but I have

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

柔情痞子 提交于 2019-12-21 03:58:37
问题 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

centos php安装ImageMagick扩展

一个人想着一个人 提交于 2019-12-21 02:58:18
百度搜 ImageMagick-6.5.3-10.tar.gz下载 上传到/usr/local/src cd /usr/local/src tar zxvf ImageMagick-6.5.3-10.tar.gz cd ImageMagick-6.5.3-10 ./configure --prefix=/usr/local/imagemagick #注意 如果在这里出现什么错误缺少freetype等等之类的,应该是某些标准库没有安装吧,可以试试 http://www.cnblogs.com/phpcainiao/p/5442066.html 安装一下常用的库。如果还不行百度 make make install 访问http://pecl.php.net/get/imagick-2.2.2.tgz。直接下载可以百度搜下看看有米有新版本 上传到/usr/local/src cd /usr/local/src tar zxvf imagick-2.2.2.tgz cd imagick-2.2.2 phpize #如果没有把php命令放到全局就写编译的路径 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-imagick=/usr

How to determine if image is dark? (high contrast, low brightness)

和自甴很熟 提交于 2019-12-21 02:42:21
问题 As part of a project I am working on, I need to simply analyze a picture using a CLI Linux application and determining if its dark image (high contrast, low brightness). So far, I figured out I can use ImageMagick to get verbose information of the image, but not sure how to use that data...or is there a simpler solution? 回答1: You could scale the image to a very small one -- one that has a dimension of 1x1 pixels and represents the "average color" of your original image: convert original.jpeg

How does ImageMagick's '-subimage-search' operation work?

巧了我就是萌 提交于 2019-12-21 02:40:51
问题 I have used ImageMagick in my application. I used ImageMagick for comparing images using the compare command with the -subimage-search option. But there is very little documentation of about how -subimage-search works. Can anyon provide me more information on how it works? For example: Does it compare using colormodel or does it image segmentation to achieve its task? What I know right now is it searches for the second image in the first. But how this is done? Please explain. 回答1: Warning:

Using Magick++ in a node.js application on heroku

和自甴很熟 提交于 2019-12-21 02:33:16
问题 I'm trying to push a Node app to heroku, but I am using imagemagick-native and it seems that Heroku is having an issue with Magick++ - I've tried using custom build packs but can't seem to find one that supports Magick++. (1) Is this the issue (2) Is there any solution to run Magick++ on Heorku? -----> Node.js app detected -----> Resolving engine versions Using Node.js version: 0.10.20 Using npm version: 1.3.11 -----> Fetching Node.js binaries -----> Vendoring node into slug -----> Installing

Can't install Rmagick and Imagemagick on Windows 7

℡╲_俬逩灬. 提交于 2019-12-20 20:01:40
问题 when I run gem install rmagick-2.13.1.gem from the directory in which rmagick-2.13.1.gem is I get an Error saying that it failed to build gem native extension, below which it says c:/Ruby192/bin/ruby.exe extconf.rb checking for Ruby version >= 1.8.5 ... yes Unable to get Imagemagick version ***extconf.rb failed*** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. From what I know reading the answers to

Resizing the image with padding using convert on ubuntu

谁说胖子不能爱 提交于 2019-12-20 17:38:26
问题 I am using the convert command for resizing the image There are two versions Following is the first one, the resultant image maintains the aspect ratio but the image does not necessarily be of size nxn convert temp.jpg -resize nxn temp.jpg The second version convert temp.jpg -resize nxn! temp.jpg It does not preserve the aspect ratio. What I want is to preserve the aspect ratio, and fill the rest of the image with a desired RGB value to acheive the size nxn Any ideas? Thanks 回答1: You need to

Pipe stream to graphicsmagick/imagemagick child process

南笙酒味 提交于 2019-12-20 10:21:01
问题 I am trying to pipe data from a stream into a child process. var gm = spawn( 'gm convert - -thumbnail 220x165^ -gravity center -extent 220x165 thumb.jpg' ); var rs = fs.createReadStream( 'cow.jpg' ); rs.pipe( gm.stdin ) Do I need to call end on gm for it to work? Also in my real code I am getting the stream from a database. 回答1: Example of how to stream a request into imagemagick: var image = request.get(req.params.url); var size = req.params.size.split('x'); var args = ['-', '-thumbnail',