Comments (4)
Hi!
not with the 'thumb' method (assuming you're using this?), but you can either create your own processor, or easier, there is a 'convert' method which you can pass arbitrary command line args to, which get passed to the imagemagick command line, e.g.
my_image.convert('-resize 30x30 -quality 5')
etc.
This can be chained as per usual so you can call '.url', '.data', etc. on it
cheers
Mark
from dragonfly.
Thank you for the quick answer.
For clarification, I wasn't actually resizing, but cropping when i noticed the loss of quality. I don't know what causes it then.
The convert method give's me full control, so that already answers my question for command line arguments. When I looked at the code, there didn't seem to be any quality pre-configurations. So I was left in the dark. I'll handle it with the convert method! Thank you!
from dragonfly.
Update: Turns out I didn't know ImageMagick's default quality value is 92. Sorry and thanks for the support!
from dragonfly.
I have a question about the .convert method i.e.
my_image.convert('-resize 320x200 -quality 95')
`
Is the resulted images cached or is it re-generated each time the page is viewed? Thanks.
from dragonfly.
Related Issues (20)
- Default content auto-whitelist doesn't work with FileDataStore
- Can't store resized pdf as jpg HOT 5
- Requesting filename without download file for custom stores HOT 2
- Turning Off Logs HOT 1
- Dragonfly unit test cases failing in Rails 4 HOT 1
- Dragonfly::FileDataStore::UnableToFormUrl: you need to configure server_root for Dragonfly::FileDataStore in order to form urls
- How to ignore "Dragonfly::FileDataStore destroy error"?
- Adding the ability to specify headers for a URL based attachment HOT 3
- Fetching url in the background
- after_assign's copy_to doesn't fire when using retained_image HOT 1
- SSL verification mode option
- warning: loading in progress, circular require considered harmful HOT 1
- is this version of Dragonfly compatible ? HOT 4
- Support for posix-spawn? HOT 2
- Security Issue Report HOT 1
- Guidance on upgrading to 1.4.0 HOT 7
- validate problems?
- CSS style color raising InvalidParameter when using plain generator HOT 1
- Questions about GHSA-qrgf-jqqm-x7xv HOT 2
- Allowing quality and interlace params for imagemagick thumb processor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragonfly.