Closed (outdated)
Project:
Image Effects
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2017 at 08:44 UTC
Updated:
22 Dec 2025 at 10:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mondrakePlease see the README file for information of which effects are supported in GraphicsMagick.
This is not a bug but a feature request. Not sure if there's any option that can provide that in GraphicsMagick, though.
Comment #3
kjauslin commentedAttached a small patch using the '-level' argument. It's not entirely the same, but is working quite well as a first fix.
Comment #4
kjauslin commentedOh yeah, sorry, I forgot to check. I implemented a first draft in the patch (since I need this functionality in a gm project). But I'm not sure it should maybe be a separate level filter.
Comment #5
mondrakeThanks @kjauslin - can you update the tests, too? Actually the tests need to be run locally for ImageMagick/GraphicsMagick as the DrupalCI bots do not have graphics packages installed.
Not sure we need a separate effect for this if the results are comparable.
Comment #6
mondrake$toolkit is not used, so we do not need this line
Comment #7
kjauslin commentedI don't have testing setup right now, but adjusted the ContrastTest (and removed the $toolkit) - with a little bit of luck it might work ;-) Depends a little bit on how similar the level filter really is to brightness-contrast I think.
Comment #8
mondrakeComment #9
mondrakeSeems OK, running locally
Comment #10
mondrakeWill wait for more reviews/RTBC before committing this.
Comment #11
mondrakeRerolled.
Comment #12
mondrakeActually, this does not work for negative contrast values:
gm convert -level '0x-50' -quality 75 'core/modules/image/sample.png' '/[...]/sites/default/files/styles/contrast/public/core/modules/image/sample.png'raises
Option '-level' requires an argument or argument is malformed.Comment #13
kjauslin commentedAdjust patch to work with image_effects 2.3
Comment #14
mondrakeClosing any stale issue with latest comment over 5 years old.