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
3
votes
1 answer

Convert SVG to transparent PNG using Carrierwave & MiniMagick

I want to convert an SVG to a transparent PNG using the following MiniMagick command on a Carrierwave upload: convert input.svg -transparent white output.png How can I achieve that? Please provide FULL-EXAMPLE
Jeremy Lynch
  • 6,780
  • 3
  • 52
  • 63
3
votes
1 answer

ActiveStorage How to convert image before upload to S3?

I configured active storage to upload has_one_attached :image to Amazon S3. product.image.attach(io: open(img_url), filename: "file.jpg") But I want to optimize images: compress them or convert to .webp I have mini-magick gem which i can use to…
3
votes
1 answer

Rails 5.2 ActiveStorage save and then read Exif data

On Rails 5.2 I am trying to save an avatar via ActiveStorage but it seems as though not image oriantation data is being saved in the active storage blob. I am saving the avatar via a file_field on a create action my #user model has_one_attached…
3
votes
2 answers

Carrierwave #Resize_to_fill not working with Minimagick (only works with rMagick)

I configured my rails app to use Carrierwave for image uploads. As per the docs, I included the appropriate gem version for Multiple File Uploads. Inside the Carrierwave uploader, I included Minimagick. When I try to use the #resize_to_fill method,…
3
votes
2 answers

Picture Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: `identify

been trying to upload photos with Carrierwave::MiniMagick, installed both gems but i get this error when trying to upload: Picture Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: identify…
JohnnyDevv
  • 289
  • 4
  • 18
3
votes
0 answers

Adding fonts to minimagick

I'm using minimagick and want to add some text over images. I need to know how to add additional fonts for minimagick to use. For example, I am trying to use Chalkboard, which is an OSX font and I am getting the error 'unable to read font…
xeroshogun
  • 1,062
  • 1
  • 18
  • 31
3
votes
2 answers

Errors are displayed twice in rails

I am using carrierwave to upload the profile picture in user model. If the user tries to upload any file that is not an image, then an error must be raised. However the error is displayed twice on the screen. Please help code for user model …
dev
  • 127
  • 11
3
votes
2 answers

uninitialized constant CarrierWave::MiniMagic

I'm trying to upload an image via AJAX, but, the controller doesn't respond. Error: uninitialized constant CarrierWave::MiniMagic. Here is my code: # encoding: utf-8 class ImagesUploader < CarrierWave::Uploader::Base # Include RMagick or…
3
votes
1 answer

MiniMagick - add texture to image

Given: A texture and a photograph (with no transparent background) How do I give the photograph the texture? To be specific, I want the following steps: Tile the texture. From here, I have: convert -size 1056x576 tile:Castillo_001.gif…
s12chung
  • 1,718
  • 1
  • 14
  • 29
3
votes
1 answer

Resize images with carrierwave if it exceeds height/width

I have looked around and could not find a solution after I tried to do it on my own. When users upload photos, I want for them to be resized if it exceeds my minimum and max dimensions. However I would like two conditionals. The photos that were…
xps15z
  • 1,769
  • 1
  • 20
  • 38
3
votes
1 answer

Unable to Find File Field "photo" when it exists explicitly on the page? Rails 4, Minimagick, Carrierwave

I am using Carrierwave and Minimagick for image uploads to a user's profile photo. I have followed the directions on Carrierwave's readme of how to create an uploader and mount it. I am testing with Rspec and Capybara. Here is my…
annikam
  • 273
  • 3
  • 17
3
votes
1 answer

Carrierwave/Minimagick - Cropping is always inaccurate, except when 'y' parameter is 0

Having implemented the ability to crop as shown in the Railscasts episode 182 (revised), I can't seem to get cropping work accurately. What is cropped is always the top 20% of the area selected in the crop. Except when the 'y' parameter is 0, that…
Humming
  • 453
  • 4
  • 15
3
votes
1 answer

Resizing Images based on orientation with MiniMagick

I'd like to process images differently based on whether they're landscape or portrait. This is the code in my image uploader model: def is_landscape? if @file image = ::MiniMagick::Image.open(file) Rails.logger.info "from in…
scientiffic
  • 9,045
  • 18
  • 76
  • 149
3
votes
0 answers

Carrierwave quality doesnt apply on recreate_versions

I've encountered a problem concerning carrierwave quality settings. To begin with, let me present some of the code (uploaders/second_image_uploader): class SecondImageUploader < CarrierWave::Uploader::Base include CarrierWave::RMagick def…
3
votes
1 answer

MiniMagick: Making a png partially opaque/how to use '-evaluate'

I am trying to make a partially opaque png using MiniMagick, but I guess what it really boils down to is the syntax for using '-evaluate' This works in the terminal: convert input.jpg -alpha on -channel a -evaluate set 25% output.png But I don't…
d.berg
  • 121
  • 3