commit 7ebbceb019161fc336efa80f388affa9ad3063ee
parent e8f51d21903bcc28c476be7364d1b3c9de01e80d
Author: Jack Mordaunt <jackmordaunt@gmail.com>
Date: Thu, 22 Nov 2018 13:20:42 +1300
[!] If convert is not specified skip operations that involve it.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/engine.go b/engine.go
@@ -144,6 +144,9 @@ func (eng *Engine) Transcode(
// Fuzz is a percentage value between 0 and 100, where 0 is best quality, 100 is
// smallest file size. Optimal is typically 2-5.
func (eng *Engine) Crush(gif string, fuzz int) error {
+ if eng.Convert == "" {
+ return nil
+ }
args := []string{gif}
if fuzz > 0 {
args = append(args, "-fuzz", fmt.Sprintf("%d%%", fuzz))