Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've used the module with PNG and JPEG optimizers, but they do not apply to GIF files.
So is it an option to include one more tab in the bottom that will group tools for optimizing GIfs like:
- http://www.lcdf.org/gifsicle/ - one that I found after a fast google search.
- Others.
As far as I know we should just implement a plugin for each of the processors, so it should not be that huge of a task.
Comment | File | Size | Author |
---|---|---|---|
#12 | imageapi_optimize_binaries-add_support_for_optimizing_gif-2602398-12.patch | 2.9 KB | SylvainM |
Comments
Comment #2
tamnv CreditAttribution: tamnv commentedHi @ndobromirov,
JPG is a lossy compression. This means that you can use "quality parameter" to adjust size / quality ratio. GIF is a lossless compression, you cannot get better compression by adjusting quality. You can read more on php.net:
http://php.net/manual/en/function.imagepng.php
http://php.net/manual/en/function.imagejpeg.php
http://php.net/manual/en/function.imagegif.php
Comment #3
ndobromirov CreditAttribution: ndobromirov at FFW commentedHi,
I think you are misunderstanding the issue scope and this module's purpose.
Whenever the user uploads an image this module will try to improve it through a pre-defined list of processor tools.
All of them are not PHP based. Check the module's code for an example list and do a fast google search on it.
This issue is a feature request that will allow you to apply GIF optimizer tools, when the users are uploading them on the system.
I found 1 such tool stated in the description, but due to current work loads I am not able to implement the plugin wrappers for it and experiment.
This has nothing to do in relation to lossy/non-lossy formats, as even if PNGs are loose-less format (image files container), you can apply lossy compression on the image data through pngquat for example and still compress it more than the initial size. Usually compression with 10-20% quality loss results in 60-70% size reduction on PNGs.
BR,
Nikolay Dobromirov.
Comment #4
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedI'd welcome patches that implemented gif optimizers.
Comment #5
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commentedPlease test this processor
Comment #6
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commentedoops
Comment #8
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commentedooops, again…
This one is not empty
Comment #10
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedComment #11
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commentedHere is a new patch for this new module
Comment #12
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commentedThis patch is better…
Comment #13
vistree CreditAttribution: vistree commentedHi, @SylvainM, should your patch form #12 still work? Do you expect animitad GIFs to be still animated after the precessor has been applied?
Comment #14
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commented> should your patch form #12 still work?
Yes, it works
> Do you expect animitad GIFs to be still animated after the precessor has been applied?
Yes
Comment #15
vistree CreditAttribution: vistree commentedHi sylvainM,
Thanx for your reply. Gifs are not animated on my environment. I use standard gd2 being set to 100% in image toolkit. Should this work or do I have to change e.g. to imagemagick to make your processor work?
Comment #16
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commentedGD2 can't keep animation in gif, you have to use imagemagick for your image styles
Comment #17
vistree CreditAttribution: vistree commentedThanx @SylvainM. I will try out!!
Comment #18
vistree CreditAttribution: vistree commentedMaybe stupid question, but if I use ImageMagick - why do I need image optimize binrary?
Comment #19
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commentedI think Image Magick can't do all those optimizations