diff options
| author | Benjamin Riefenstahl | 2019-01-15 17:00:04 +0100 |
|---|---|---|
| committer | Eli Zaretskii | 2019-01-25 10:20:55 +0200 |
| commit | b6c762a520c041d8c69a8557b9ee5ffdd3004b1f (patch) | |
| tree | 802b449f08aa8ffa5f9f3130c12d7a50bc607d88 | |
| parent | 928d342c81c4d442e3125ddc463d141029d6898f (diff) | |
| download | emacs-b6c762a520c041d8c69a8557b9ee5ffdd3004b1f.tar.gz emacs-b6c762a520c041d8c69a8557b9ee5ffdd3004b1f.zip | |
create-image: Expand documentation (bug#33990)
* lisp/image.el (create-image): Discuss default for :scale in the doc
string.
| -rw-r--r-- | lisp/image.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/image.el b/lisp/image.el index b49f1b3aa5a..3019da556b3 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -413,13 +413,20 @@ must be available." | |||
| 413 | (defun create-image (file-or-data &optional type data-p &rest props) | 413 | (defun create-image (file-or-data &optional type data-p &rest props) |
| 414 | "Create an image. | 414 | "Create an image. |
| 415 | FILE-OR-DATA is an image file name or image data. | 415 | FILE-OR-DATA is an image file name or image data. |
| 416 | |||
| 416 | Optional TYPE is a symbol describing the image type. If TYPE is omitted | 417 | Optional TYPE is a symbol describing the image type. If TYPE is omitted |
| 417 | or nil, try to determine the image type from its first few bytes | 418 | or nil, try to determine the image type from its first few bytes |
| 418 | of image data. If that doesn't work, and FILE-OR-DATA is a file name, | 419 | of image data. If that doesn't work, and FILE-OR-DATA is a file name, |
| 419 | use its file extension as image type. | 420 | use its file extension as image type. |
| 421 | |||
| 420 | Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data. | 422 | Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data. |
| 423 | |||
| 421 | Optional PROPS are additional image attributes to assign to the image, | 424 | Optional PROPS are additional image attributes to assign to the image, |
| 422 | like, e.g. `:mask MASK'. | 425 | like, e.g. `:mask MASK'. If the property `:scale' is not given and the |
| 426 | display has a high resolution (more exactly, when the average width of a | ||
| 427 | character in the default font is more than 10 pixels), the image is | ||
| 428 | automatically scaled up in proportion to the default font. | ||
| 429 | |||
| 423 | Value is the image created, or nil if images of type TYPE are not supported. | 430 | Value is the image created, or nil if images of type TYPE are not supported. |
| 424 | 431 | ||
| 425 | Images should not be larger than specified by `max-image-size'. | 432 | Images should not be larger than specified by `max-image-size'. |