minimagick

How to crop image on upload with Rails, Carrierwave and Minimagick?

只谈情不闲聊 提交于 2021-02-17 16:58:47
问题 I have read: Undefined Method crop! Using Carrierwave with MiniMagick on rails 3.1.3 Carrierwave Cropping http://pastebin.com/ue4mVbC8 And so I tried: # encoding: utf-8 class ProjectPictureUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick storage :file def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end version :thumb do process :cropper # process :crop process resize_to_fit: [200, 200] end def cropper manipulate! do |img| # if model.crop

Heroku building app fail: error to load gem 'graphicsmagick'

末鹿安然 提交于 2020-06-18 13:12:49
问题 when I push my rails app to heroku it always fails. On the stage "Build App" the logs show me following message: checking for gm... no ! rake aborted! ! Bundler::GemRequireError: There was an error while trying to load the gem 'graphicsmagick'. I have required this gem in the Gemfile and I don't know why building app on heroku always fails. Local running and running on CircleCI are ok. Did someone have similar issue? Please let me know what I've missed. Thank you. 回答1: Do you have the

Heroku building app fail: error to load gem 'graphicsmagick'

笑着哭i 提交于 2020-06-18 13:10:21
问题 when I push my rails app to heroku it always fails. On the stage "Build App" the logs show me following message: checking for gm... no ! rake aborted! ! Bundler::GemRequireError: There was an error while trying to load the gem 'graphicsmagick'. I have required this gem in the Gemfile and I don't know why building app on heroku always fails. Local running and running on CircleCI are ok. Did someone have similar issue? Please let me know what I've missed. Thank you. 回答1: Do you have the

Heroku building app fail: error to load gem 'graphicsmagick'

孤街浪徒 提交于 2020-06-18 13:10:07
问题 when I push my rails app to heroku it always fails. On the stage "Build App" the logs show me following message: checking for gm... no ! rake aborted! ! Bundler::GemRequireError: There was an error while trying to load the gem 'graphicsmagick'. I have required this gem in the Gemfile and I don't know why building app on heroku always fails. Local running and running on CircleCI are ok. Did someone have similar issue? Please let me know what I've missed. Thank you. 回答1: Do you have the

How to get EXIF keywords using mini_magick in a Rails app?

守給你的承諾、 提交于 2020-01-13 19:07:54
问题 I am attempting to pull the EXIF information for images that have values for the EXIF "keywords" attribute. I have successfully read EXIF information using mini_magick by simply opening an image and using: image["EXIF:Model"] For some reason, none of the following will return keywords for an image that I know has them: image["EXIF:Keywords"] image["EXIF:XPKeywords"] image["EXIF:Subject"] I have confirmed that the image in question does have this information using this utility: http://regex

Minimagick gem fails to convert multipage PDF to several png images

社会主义新天地 提交于 2019-12-25 02:58:35
问题 I am new to RoR and I'm trying to develop a slide sharing app through which users can upload and share a multipage PDFs containing a deck of slides (one slide per page). Viewers can then view these slides on a "show" page. Behind the scenes I am trying to convert the multipage pdf into several .png files (1 pdf page -> 1.png file), and then display them in a carousel/slider fashion. Here is my uploader: # encoding: utf-8 class DocUploader < CarrierWave::Uploader::Base # Include RMagick or

paperclip Error while determining content type: Cocaine::CommandNotFoundError in Rails 3.2.1

给你一囗甜甜゛ 提交于 2019-12-24 07:23:29
问题 I tried to use the code given here to upload and crop images using Paperclip.I am able to upload image and also the image is cropped but without selection area. The console gives the following error : [paperclip] Error while determining content type: Cocaine::CommandNotFoundError I have tried solutions given on other articles of SO like this and this, but none of them solved this problem. Any other suggestions are most welcomed. NOTE : I am working on Windows 7. Gems installed are : gem

cache resources exhausted Imagemagick

依然范特西╮ 提交于 2019-12-23 15:16:31
问题 I'm using Imagemagick on a rails app with Minimagick and i generate some pictogram with it. When i launch my process i have this error and i don"t find solution MiniMagick::Error (`convert -limit memory 2GiB -limit map 2GiB -limit disk 4GiB -background none -fill #000000 -font ttf/SELIS006N.ttf -pointsize 300 label: S public/pictogram_images/RECINTAN-EL-064-layer-1.png` failed with error: convert.im6: cache resources exhausted ` S' @ error/cache.c/OpenPixelCache/4078. convert.im6: no images