From fd582e2e5c06cc84412ffde9961499a15a8ca7d6 Mon Sep 17 00:00:00 2001 From: Michael Kuryshev Date: Wed, 7 Jan 2015 12:07:11 +0300 Subject: [PATCH] Compatibility with GraphicsMagick. * twittering-mode.el: Compatibility with GraphicsMagick. (twittering-convert-image-data): checks if `twittering-convert-program' is "gm" and adds convert command option to arguments list. --- twittering-mode.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/twittering-mode.el b/twittering-mode.el index 39000307..f9053bf8 100644 --- a/twittering-mode.el +++ b/twittering-mode.el @@ -7998,7 +7998,12 @@ return nil." (default-directory temporary-file-directory)) (insert image-data) (let* ((args - `(,@(when (<= emacs-major-version 22) + `(,@(when (string-match "gm\\(\\.exe\\)?$" + twittering-convert-program) + ;; Add command line convert option in case + ;; GraphicsMagick is invoked. + '("convert")) + ,@(when (<= emacs-major-version 22) ;; Emacs22 and earlier raises "Color allocation error" ;; on decoding a XPM image with opacity. To ignore ;; opacity, the option "+matte" is added.