diff options
| author | Lars Ingebrigtsen | 2019-11-21 13:59:37 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-11-21 13:59:37 +0100 |
| commit | 832bdaf6e5ea8a27784099a60f8e401dbe85d6f8 (patch) | |
| tree | b506bee0216ac260d519695dacc86543b3f4599b | |
| parent | f13a4afde747756c4c02fadf49ea6c617cfd42c6 (diff) | |
| download | emacs-832bdaf6e5ea8a27784099a60f8e401dbe85d6f8.tar.gz emacs-832bdaf6e5ea8a27784099a60f8e401dbe85d6f8.zip | |
Rewrite the image-convert doc string
* lisp/image/image-converter.el (image-convert): Clarify the
calling convention (bug#38310).
| -rw-r--r-- | lisp/image/image-converter.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el index dedccadcf46..b4d10c861b0 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 | |||
| 70 | 70 | ||
| 71 | (defun image-convert (image &optional image-format) | 71 | (defun image-convert (image &optional image-format) |
| 72 | "Convert IMAGE file to the PNG format. | 72 | "Convert IMAGE file to the PNG format. |
| 73 | IMAGE can either be a file name, which will make the return value | 73 | IMAGE can either be a file name or image data. |
| 74 | a string with the image data. | ||
| 75 | 74 | ||
| 76 | If IMAGE-FORMAT is non-nil, IMAGE is a string containing the | 75 | To pass in image data, IMAGE should a string containing the image |
| 77 | image data, and IMAGE-FORMAT is a symbol with a MIME format name | 76 | data, and IMAGE-FORMAT should be a symbol with a MIME format name |
| 78 | like \"image/webp\". | 77 | like \"image/webp\". For instance: |
| 79 | 78 | ||
| 80 | IMAGE can also be an image object as returned by `create-image'." | 79 | (image-convert data-string 'image/bmp) |
| 80 | |||
| 81 | IMAGE can also be an image object as returned by `create-image'. | ||
| 82 | |||
| 83 | This function converts the image to PNG, and the converted image | ||
| 84 | data is returned as a string." | ||
| 81 | ;; Find an installed image converter. | 85 | ;; Find an installed image converter. |
| 82 | (unless image-converter | 86 | (unless image-converter |
| 83 | (image-converter--find-converter)) | 87 | (image-converter--find-converter)) |