refile / refile-mini_magick Goto Github PK
View Code? Open in Web Editor NEWImage processing via MiniMagick for Refile
License: MIT License
Image processing via MiniMagick for Refile
License: MIT License
See refile/refile#79
ImageMagick has support to quality control. However, I can't find this option on refile-mini_magick.
I would like to know if a PR with this feature is welcome or for some reason that is out of the scope of the gem?
On my current VPS setup, an identify -list resource command shows ImageMagick thinking it has more memory to work with than is actually allocated to my VPS. As a result, I can pretty easily DOS myself with a single page, given sufficiently large files to thumbnail.
As it's a VPS, I should be able to change ImageMagick's policy.xml to use reasonable values, but per-application or per attribute options would be nice.
Via command line: http://www.imagemagick.org/script/command-line-options.php#limit
in mini_magick this can be achieved with calls like
cmd.limit "memory", "400MiB"
cmd.limit "map", "400MiB"
cmd.limit "disk", "1MiB"
Am I just missing where the proper place to put these options is?
gem install refile-mini_magick
ERROR: Could not find a valid gem 'refile-mini_magick' (>= 0) in any repository
Can you release your gem?
New release with sinatra 2.0 ? instead of using master?
I used refile 0.5.4 for a while, and just upgraded to 0.6.1 + refile_mini_magick.
I noticed that, previously, I was able to upload a PNG with transparency, and its resized thumbnails kept the alpha channel. Now it's lost, I get a white background. I fail to see where in the code this is done, as both Refile::ImageProcessing
and Refile::MiniMagick
look similar in these respect.
I love how the minimagick lib works, but one other thing I would maybe like to do is process the image through ImageOptim for example... but it seems I would have to fork the minimagick lib to do that?
Also, is there a way to control the compression of an uploaded jpg for example?
Based on your recommendations, what needs to get done to move the version to 1.0? There are a number of PRs.
Hi,
I'm using refile and refile-mini_magick to resize my images on front-end (HTML) and on a report (PDF).
For some reason, when I manually use the Refile::MiniMagick, it destroys the original image.
I'm using like that:
image = Refile::MiniMagick.new(:limit).call(
user.avatar.to_io,
100,
100,
format: 'png'
)
After I call this snippet, the original image is lost. I'm trying to understand if this is deleting the image or what.
Any ideas?
ImageProcessing gem has a new version 1.2 which has autorotation enabled by default. Can we update please?
ERROR: Could not find a valid gem 'refile-mini_magick' (>= 0) in any repository
The pad
processor should resize the image to fit the dimensions as much as possible if it is too small. The current behaviour is strange for small images.
This is a bit of a rubber duck question, but I am hoping that larger brains than mine may have thought about this and are willing to share.
Since Refile's modus is strongly skewed toward just-in-time formatting, I am not sure this is going to ever work, but what would it take to do video transcoding within this framework?
I am trying to replace a production Paperclip system, because direct upload to S3 (and multiple file uploads to S3) seems so very hard to do there. At least for static images, this is a distinctly straightforward thing to do in Refile. But video transcoding takes seconds or minutes per file, depending on size, so saving this task for the instant of (first) request is a real non-starter.
Looking at the code in this gem, it seems pretty clear to me that I could fork it and wrap FFMPEG to do the actual grunt work needed. Has anyone else considered/started this? Any other thoughts about the duration issue?
Thanks,
Walter
I'm added this line and get next error:
[Refile] image processing has been extracted into a separate gem, see https://github.com/refile/refile-mini_magick
than I'm added in Gemfile gem 'refile-mini_magick' but got new error
Could not find gem 'refile-mini_magick (>= 0) ruby' in the gems available on this machine.
than I'm change on gem 'refile-mini_magick', github: 'refile/refile-mini_magick'
and gem was installed, but I'm got error again
[Refile] image processing has been extracted into a separate gem, see https://github.com/refile/refile-mini_magick
ruby 2.2.0p0
gemfile:
gem 'rails', github: 'rails/rails', branch: '3-2-stable'
...
gem 'mini_magick'
gem 'refile', require: ['refile/rails', 'refile/image_processing'], github: 'refile/refile'
gem 'refile-mini_magick', github: 'refile/refile-mini_magick'
...
Rails 5.2.0 and greater depend on Rack >= 2.0, and this gem is locked to 1.5 or something. Please update Rack!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.