Closed (outdated)
Project:
Drupal core
Version:
9.5.x-dev
Component:
image system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 May 2012 at 23:19 UTC
Updated:
30 Aug 2022 at 22:24 UTC
Jump to comment: Most recent
Comments
Comment #1
Crell commentedGlancing through the docs for it I don't see anything to scare me away. There's even a composer file, although they check a phar file into the git source which is dumb. We should bug them to change that. :-) Other than that I think it's worth trying to see if it works.
Comment #2
corbacho commentedLooks promising, and a excellent example of how a PHP library should be written using modern PHP features.
If Twig gets into D8:
Image manipulation using Imagine and Twig Filters
https://github.com/avalanche123/AvalancheImagineBundle
It seems part of Imagine library overlaps with Image Filters ?
Comment #3
robloachRemove imagine.phar: https://github.com/avalanche123/Imagine/issues/122 .
Comment #4
robloachComment #5
Crell commentedIs anyone still pursuing this?
Comment #6
sunAs a first step, we'll do:
#1664844: Convert image toolkits into plugins
(because that is blocking #1712258: Simplify image toolkit form logic, removing unneeded checks. - or rather resolving it properly)
Nevertheless, we can investigate this issue further. I'm not sure whether I'll have time to work on this myself. However, I'd love to get rid of having to maintain the contrib ImageMagick toolkit module ;)
And needless to say, Imagine's Twig integration is very appealing, too :)
Comment #7
damien tournoud commentedThe list of transformations supported by imagine is fully hardcoded in the toolkit interface.
That doesn't look good.
Comment #8
Crell commentedHm, that's not so hot. Is it even possible to extend with other options? Are there other operations that we'd want to support that are not included there?
Comment #9
cweagansRelated discussion: https://github.com/avalanche123/Imagine/issues/130#issuecomment-6172022
Comment #10
jibranIs this postpone on #1664844: Convert image toolkits into plugins. Or is it won't fix?
Comment #11
andypostComment #12
cweagansThe image effects API landed 4 months ago, so the list of transformations is no longer hardcoded.
This could actually still be on the table for Drupal 8, I think. I won't change the version back, but I think that the number of changes required for this is relatively small.
Comment #13
Crell commentedcweagans: That sounds like something to ping catch about to see if he'd still be open to it. If so, patch plz.
Comment #14
sun#7 still stands though.
Admittedly, our current image toolkit API also has a range of effects hard-coded, but at the very least, alternative toolkits are able to add and expose custom effects (which are only supported by themselves, so as soon as you switch back to GD or something else, hell breaks lose, but nevertheless, it is possible).
Comment #15
fietserwinCons:
- See comment #7
- Lots of final classes, methods and private properties: if some image processing/filter/effect, or whatever you call it, is missing, it won't be easy to add it via e.g. inheritance.
- No direct ImageMagick support. It needs the PHP Imagick extension which is not enabled by default and may not be enabled on many hosters.
- Arbitrary splitting of "operations" over the image class (a.o. resize, rotate, mask), and effects class (a.o. gamma, sharpen) and filter classes (a.o. rotate, border). I did not fully grab the (conceptual) differences between these.
- Only type of exception used: RunTimeException (and this PHP class is already named using a pleonasm)
Pro:
- Despite the above, the code structure is good and readable.
- I couldn't find an operation/filter or effect missing. I think that if we would construct a list of all D7 image effects (core and contrib) we won't find one that is impossible to do with Imagine. So why care about the non-extensibility if we get more than we have now?
- Someone has already gotten it to work in D8: #2073759-144: Convert toolkit operations to plugins.
All in all + 1.
Comment #16
catchImagine could be added and used in a minor release as long as we don't break the old API/sites. Not clear at all whether anyone seriously wants to do that.
Comment #30
smustgrave commentedClosing as outdated since this moved to PNMI 7 years ago
If still an issue or needs addressing please reopen with an updated issue summary.
Thanks!