emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 832bdaf: Rewrite the image-convert doc string


From: Lars Ingebrigtsen
Subject: master 832bdaf: Rewrite the image-convert doc string
Date: Thu, 21 Nov 2019 07:59:47 -0500 (EST)

branch: master
commit 832bdaf6e5ea8a27784099a60f8e401dbe85d6f8
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Rewrite the image-convert doc string
    
    * lisp/image/image-converter.el (image-convert): Clarify the
    calling convention (bug#38310).
---
 lisp/image/image-converter.el | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index dedccad..b4d10c8 100644
--- a/lisp/image/image-converter.el
+++ b/lisp/image/image-converter.el
@@ -70,14 +70,18 @@ is a string, it should be a MIME format string like
 
 (defun image-convert (image &optional image-format)
   "Convert IMAGE file to the PNG format.
-IMAGE can either be a file name, which will make the return value
-a string with the image data.
+IMAGE can either be a file name or image data.
 
-If IMAGE-FORMAT is non-nil, IMAGE is a string containing the
-image data, and IMAGE-FORMAT is a symbol with a MIME format name
-like \"image/webp\".
+To pass in image data, IMAGE should a string containing the image
+data, and IMAGE-FORMAT should be a symbol with a MIME format name
+like \"image/webp\".  For instance:
 
-IMAGE can also be an image object as returned by `create-image'."
+  (image-convert data-string 'image/bmp)
+
+IMAGE can also be an image object as returned by `create-image'.
+
+This function converts the image to PNG, and the converted image
+data is returned as a string."
   ;; Find an installed image converter.
   (unless image-converter
     (image-converter--find-converter))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]