Questions tagged [minimagick]

MiniMagick is a Ruby wrapper for ImageMagick command line.

MiniMagick is a Ruby wrapper for ImageMagick command line. It gives you access to all the commandline options ImageMagick has.

Official site: http://rubyforge.org/projects/mini-magick

342 questions
7
votes
2 answers

Can not allocate memory

For some reason processing images (carrierwave + minimagick) stops working about a week after the service is started. There is no unusual increase in traffic or upload processes. Once the ENOMEM error occurs everything seems to 'lock up' and any…
Florian
  • 373
  • 5
  • 18
7
votes
4 answers

FloatDomainError (Infinity)

I use carrierwave and mini_magick to upload images. In development everything is fine, but in production it raises FloatDomainError (Infinity) when i try to upload an image. I have several projects hosted at the same server and everything is fine…
Sergey Kishenin
  • 5,099
  • 3
  • 30
  • 50
7
votes
3 answers

Get image dimensions using Refile

Using the Refile gem to handle file uploading in Rails, what is the best way to determine image height and width during / after it has been uploaded? There is no built in support for this AFAIK, and I can't figure out how to do it using MiniMagick.
Chris Edwards
  • 3,514
  • 2
  • 33
  • 40
7
votes
0 answers

Rails 4 CarrierWave (master) and MiniMagick: change file format

I'm using Rails 4.2, CarrierWave master branch, and MiniMagick 4.3.6 (also using the CarrierWave::MiniMagick module). According to the CarrierWave Docs it is possible to change the format of a file during the upload/processing stage. However, I do…
Dan L
  • 4,319
  • 5
  • 41
  • 74
7
votes
1 answer

No such file or directory - identify with Mini Magick

my rails app was running smoothly before I had another person re-do my front-end UI. I've been trying to resolve this error for 3 days now. Here is the error: No such file or directory - identify Extracted source (around line…
ShaunK
  • 1,181
  • 5
  • 22
  • 41
6
votes
2 answers

Specifying geometry for a composite with mini_magick

I am basically trying to write this command with mini_magick. gm composite -compose Copy -geometry +0+210 note-transparent1.png note-rugby.png note-rugby-e.png This is my code: image = MiniMagick::Image.open("note-transparent1.png") result =…
rmw
  • 1,253
  • 1
  • 12
  • 20
6
votes
1 answer

How to decode base64 image file with mini_magick in Rails?

In our Rails 4 app, the image is uploaded to server in a base64 string: uploaded_io = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2....." We would like to to retrieve the content type, size and so on and save the file as image file on file…
user938363
  • 9,990
  • 38
  • 137
  • 303
6
votes
1 answer

Rspec process hangs at different places, process cannot be killed. How to diagnose?

In a rails application I'm developing (on OS-X), I'm finding running the test suite via rspec locking up increasingly frequently. It does not happen every time. I've tried adding --format documentation when running the suite to see if it happens at…
MAckerman
  • 408
  • 1
  • 6
  • 15
6
votes
2 answers

Carrierwave + MiniMagick - How to squash animated GIFs to their first frame?

Anyone know how to squash animated GIFs down to their first frame using Carrierwave + MiniMagick?
Alistair Holt
  • 1,432
  • 3
  • 17
  • 28
6
votes
2 answers

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

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…
Leonid
  • 179
  • 1
  • 1
  • 9
5
votes
1 answer

Convert a pdf to png using mini_magick in Ruby on Rails

Background I retrieved a pdf in binary form from an API call: base_64_binary_data = @response_label[:generate_label_response][:response_shipments][:response_shipment][:labels][:label][:content] @pdf_file = File.open('label.pdf', 'wb') do |file| …
Code-MonKy
  • 2,026
  • 2
  • 14
  • 27
5
votes
1 answer

Tesseract not reading certain numbers

I started off writing a simple script to read data from an image. Here is my Ruby code that uses RTesseract to read it: require 'rtesseract' require 'mini_magick' RTesseract.configure do |config| config.processor = "mini_magick" end image =…
dev
  • 1,477
  • 5
  • 18
  • 43
5
votes
1 answer

mini_magick thumbnail with gravity center

I want to create a padded thumbnail, like described here This command works: convert src.png -thumbnail '200x200>' -gravity center -extent '200x200' dst.png But this ruby code is not working: gravity is ignored require 'mini_magick' image =…
Alessandro Pezzato
  • 8,603
  • 5
  • 45
  • 63
4
votes
3 answers

Retrieving the hex code of the color of a given pixel

I have used resize_to_fill down to a [1,1] size thus reducing the image to a single pixel containing what is basically the average color of the entire image (provided the image does not have a huge disparity between height and width, of course). Now…
ken-guru
  • 43
  • 4
4
votes
1 answer

Resizing an image with mini_magick

My service has both a web version and an iPhone version. On the iPhone, we ensure that users submit a square version by having it crop when it uploads. We are allowing uploads on the website as well, but we do not have such a feature. As such, I…
meow
  • 27,476
  • 33
  • 116
  • 177
1
2
3
22 23