Closed patrickcate closed 5 years ago
There is not! Maybe we should expose mini magic quality/compression arguments in config.
On Monday, March 3, 2014, PatrickC8t notifications@github.com wrote:
I don't know if I'm missing something, but is there an option to set the JPG quality of the generated files?
Reply to this email directly or view it on GitHubhttps://github.com/robwierzbowski/jekyll-picture-tag/issues/32 .
Rob Wierzbowski @robwierzbowski http://twitter.com/#!/robwierzbowski http://github.com/robwierzbowski http://robwierzbowski.com
It would certainly be useful, particular since hidpi images typically can get away with greater compression: http://www.netvlies.nl/blog/design-interactie/retina-revolution
Possibility for 2.0.
What are the currently used quality settings for jpeg images?
Seconded.
@robwierzbowski I would be happy to help with this as I need better quality for a project I'm working on. If you could point me in the direction of where you set quality I will attempt to add the functionality.
One problem is that we don't actually set it. These are the only options that we pass to imagemagick https://github.com/robwierzbowski/jekyll-picture-tag/blob/ae4307b193a2c48d445a08ca0b9fd472a7060c4f/lib/jekyll-picture-tag.rb#L240-L244
Hi all, I found the follwing information: https://coderwall.com/p/ryzmaa/use-imagemagick-to-create-optimised-and-progressive-jpgs
Then I tried a quick and dirty hack by adding the two options i.quality
and i.sharpen
with hard coded values to the code:
# Scale and crop
image.combine_options do |i|
i.quality "75"
i.sharpen "0x2.5"
i.resize "#{gen_width}x#{gen_height}^"
i.gravity "center"
i.crop "#{gen_width}x#{gen_height}+0+0"
end
It works for me, but a better solution would be to use variables instead, but I don't know how to implement it. @robwierzbowski Would it be possible to expose these arguments in the config? That would be great.
@jsanne @robwierzbowski I think I have a rough idea of how this could be done as the plugin is already pulling in some settings from the config file.
I will have a go at this, but not certain when that will be ;)
I don't know if I'm missing something, but is there an option to set the JPG quality of the generated files?