Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error resizing gif images with Webp enabled #74

Closed
galiana opened this issue Oct 5, 2020 · 0 comments
Closed

Error resizing gif images with Webp enabled #74

galiana opened this issue Oct 5, 2020 · 0 comments

Comments

@galiana
Copy link
Contributor

galiana commented Oct 5, 2020

Version of Dianoga ### 5.0.2

Environment description ### Dev Environment (Single VM), Sitecore 8.2 Initial release

What configs you have enabled

  • Dianoga.DisableForSites.config
  • Dianoga.Jpeg.config
  • Dianoga.Png.config
  • Dianoga.Strategy.MediaCacheAsync.config
  • Dianoga.WebP.config

Reproducible steps (1... 2... 3...) that cause the issue

  1. Upload a gif file

  2. Render it with the format: https://server/-/media/image.gif?mw=xx&hash=xxx

What you expected to see, versus what you actually saw

I'm expecting a resized gif file, but i get the following error: Error! Unknown option '-resize'

Some extra information

Obviously, the external tool gif2webp.exe does not support resizing images (or at least the mentioned parameter) and in the pipeline processor Dianoga/src/Dianoga/Optimizers/Pipelines/DianogaWebP/WebPOptimizer.cs we are always sending the resize parameter if requested at line 22, no matter the actual optimizer used.

Relevant logs

3536 14:54:39 ERROR Dianoga: Unable to optimize due to a processing error! It will be unchanged.
Exception: System.InvalidOperationException
Message: "C:\inetpub\wwwroot\xxx\Website\App_Data\Dianoga Tools\libwebp-1.1.0-windows-x64\bin\gif2webp.exe -q 80 -lossy -resize 0 0 "C:\WINDOWS\TEMP\tmp6C0B.tmp" -o "C:\WINDOWS\TEMP\tmp6C0C.tmp" " exited with unexpected exit code -1. Output:
Error! Unknown option '-resize'
copy from the input to the output if present
-metadata ..... comma separated list of metadata to
-f ............... filter strength (0=off..100)
-kmax ............ max distance between key frames
-kmin ............ min distance between key frames
options
combined with -q, -m, -lossy or -mixed
lossless compression by default; can be
-min_size .............. minimize output size (default:off)
-m ............... compression method (0=fast, 6=slowest)
-q ............. quality factor (0:small..100:big)
or lossless compression heuristically
-mixed ................. for each frame in the image, pick lossy
-lossy ................. encode image using lossy compression
-h / -help ............. this help
Options:
gif2webp [options] gif_file -o webp_file
Usage:

-quiet ................. don't print anything
-v ..................... verbose
-version ............... print version number and exit

-mt .................... use multi-threading if available
version prior to M62 (inclusive)
-loop_compatibility .... use compatibility mode for Chrome
Valid values: all, none, icc, xmp (default)
Source: Dianoga
at Dianoga.Optimizers.CommandLineToolOptimizer.ExecuteProcess(String arguments)
at Dianoga.Optimizers.CommandLineToolOptimizer.ProcessOptimizer(OptimizerArgs args)
at Dianoga.Optimizers.OptimizerProcessor.Process(OptimizerArgs args)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants