rmagick

exif image rotation issue using carrierwave and rmagick to upload to s3

↘锁芯ラ 提交于 2019-12-28 01:56:13
问题 I've got a photo upload feature in my rails app. The app uploads direct to s3 through carrierwave via rmagick and fog. The issue I am having is when a photo is uploaded via mobile through the "take a photo option" in portrait (note this is with iphone but I believe android has the same issue). Once uploaded the image appears fine on mobile, however when viewed on desktop the image appears rotated 90 degrees. Through my research it looks to be an issue with exif. This stackoverflow responder

exif image rotation issue using carrierwave and rmagick to upload to s3

匆匆过客 提交于 2019-12-28 01:56:03
问题 I've got a photo upload feature in my rails app. The app uploads direct to s3 through carrierwave via rmagick and fog. The issue I am having is when a photo is uploaded via mobile through the "take a photo option" in portrait (note this is with iphone but I believe android has the same issue). Once uploaded the image appears fine on mobile, however when viewed on desktop the image appears rotated 90 degrees. Through my research it looks to be an issue with exif. This stackoverflow responder

homebrew install imagemagick 8 bit version

核能气质少年 提交于 2019-12-25 14:26:13
问题 I would like to install the 8-bit version of imagemagick using homebrew, as the performance is a little better and the RGB values outputted with the 8 bit version are better suited to my uses. How would I got about doing this? 回答1: I think brew install imagemagick --with-quantum-depth-8 should do the trick. 来源: https://stackoverflow.com/questions/11923126/homebrew-install-imagemagick-8-bit-version

homebrew install imagemagick 8 bit version

百般思念 提交于 2019-12-25 14:25:13
问题 I would like to install the 8-bit version of imagemagick using homebrew, as the performance is a little better and the RGB values outputted with the 8 bit version are better suited to my uses. How would I got about doing this? 回答1: I think brew install imagemagick --with-quantum-depth-8 should do the trick. 来源: https://stackoverflow.com/questions/11923126/homebrew-install-imagemagick-8-bit-version

How do I process attachements programatically, from the model, without using forms?

徘徊边缘 提交于 2019-12-25 06:59:00
问题 I have a LineItem class that has an images column. It belongs to an Order class. When a line_item is saved, the images column is a list of comma delimited image urls. I want is to create a collage from the urls and save it as an attachment of the line_item instance. I'm not sure where to start, though. Any idea what my work flow should look like? Should I even use CarrierWave? Where should the image processing happen? In the LineItem model or the uploader file provided by CarrierWave? 来源:

Limit space and memory used by Imagemagick

血红的双手。 提交于 2019-12-25 04:13:13
问题 I'm used Imagemagick on a rails application (with rmagick) but my server (Ubuntu) it's not very big and when i launch my convert process Imagemagick take all place/memory of my server (30GB HDD). I would like limit the memory and the tmp file size, how can i do it ? 回答1: Try running the command identify -list resource to see the resources you can control/limit. It gives this: Resource limits: Width: 214.7MP Height: 214.7MP Area: 4.295GP Memory: 2GiB <--- Default is 2 GiB Map: 4GiB Disk:

Where is the time going with my ImageMagick rotations?

被刻印的时光 ゝ 提交于 2019-12-25 00:37:48
问题 I need to rotate an image from my Ruby/Rails application and I've been using ImageMagick through the RMagick gem. I've tried both the command line tool (i.e. convert ) and the API (e.g. Magick::Image#rotate ) and in both cases the performance is more than 50 times worse than the corresponding Java operation in java.awt.geom.AffineTransform , per https://code.google.com/p/zxing/issues/detail?id=1745#c21 and the corresponding response (i.e. more than a second vs. 10s of milliseconds). I've

Require 'RMagick' not working?

本小妞迷上赌 提交于 2019-12-24 12:12:30
问题 I have installed RMagick on OSX via MacPorts and can see it by running 'gem server'. However when I try to include it in my script using require 'rubygems' require 'RMagick' It crashes with the following error message ./RMagick.rb:4:in `show_info': uninitialized constant Magick (NameError) from ./RMagick.rb:24 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework

Rails Rmagick gem

蓝咒 提交于 2019-12-24 08:35:04
问题 just installed rmagick gem but having this error in my console while trying to upload : LoadError (dlopen(/Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib Referenced from: /usr/local/lib/libMagickCore.4.dylib Reason: image not found - /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle): app/uploaders/image_uploader.rb:8 Could any one please help ? Thanks in

Heroku doesn't save uploaded images?

半城伤御伤魂 提交于 2019-12-23 16:52:35
问题 I have a Rails 4 app running on Heroku. I'm using carrierwave and rmagick to upload pictures in to the app itself. The app runs ok and it uploads the pictures and i can use them for about 24 hours, but if I log on the second day the links to the images are broken and it says that it can not find the pictures. The account on Heroku is the basic free account. 回答1: Heroku runs an ephemeral file system - whilst you can write files to it files are lost when dyno's are rebooted (every 24 hours) or