aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLars Ingebrigtsen2017-07-15 02:45:19 +0200
committerLars Ingebrigtsen2017-07-15 02:48:17 +0200
commitae56c9674b4668ded392c66d46aa22db902ddd71 (patch)
tree3472b1e2c5877ee37a0b4813f60bc2b2b5515d47 /doc
parent89c5d59280edaf89b959597a39d848b54c36975a (diff)
downloademacs-ae56c9674b4668ded392c66d46aa22db902ddd71.tar.gz
emacs-ae56c9674b4668ded392c66d46aa22db902ddd71.zip
Make combinations of :width/:max-height image specs work reliably
* doc/lispref/display.texi (ImageMagick Images): Document :width/:max-height combinations (etc) (bug #25583). * src/image.c (compute_image_size): Handle :width/:max-height (etc) combinations consistently (by letting "max" win and preserve ratio). * test/manual/image-size-tests.el (image-size-tests): Add tests for :width/:max-height (etc) combinations.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/display.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 005d31af05a..98940cbc996 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -5305,6 +5305,17 @@ and if @code{:height} is set it will have precedence over
5305wish. @code{:max-width} and @code{:max-height} will always preserve 5305wish. @code{:max-width} and @code{:max-height} will always preserve
5306the aspect ratio. 5306the aspect ratio.
5307 5307
5308If both @code{:width} and @code{:max-height} has been set (but
5309@code{:height} has not been set), then @code{:max-height} will have
5310precedence. The same is the case for the opposite combination: The
5311``max'' keyword has precedence. That is, if you have a 200x100 image
5312and specify that @code{:width} should be 400 and @code{:max-height}
5313should be 150, you'll end up with an image that is 300x150: Preserving
5314the aspect ratio and not exceeding the ``max'' setting. This
5315combination of parameters is a useful way of saying ``display this
5316image as large as possible, but no larger than the available display
5317area''.
5318
5308@item :scale @var{scale} 5319@item :scale @var{scale}
5309This should be a number, where values higher than 1 means to increase 5320This should be a number, where values higher than 1 means to increase
5310the size, and lower means to decrease the size. For instance, a value 5321the size, and lower means to decrease the size. For instance, a value