[Top][All Lists]

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

Images :scale and :width/:height relation

From: Manuel Giraud
Subject: Images :scale and :width/:height relation
Date: Fri, 01 Sep 2023 11:54:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13)


For the need of bug#65581, I'd like to have access to the current scale
of an image.  But it seems that this one does not always reflect
reality.  For instance, you can have a image with an original width of
500 scaled down to a width of 100 (by mean of the :width keyword) and
its :scale keyword will still be 1.

In "(elisp) Image Descriptors", it is said that:

     If both ‘:scale’ and ‘:height’/‘:width’ are specified, the
     height/width will be adjusted by the specified scaling factor.

But it does not seems to work the other way around.  Wouldn't it be a
good thing if 'create-image' return a « normalized » image spec where
the :width, :height and :scale are filled and kept in sync?

If yes, I think we should have answers for the following questions:

   - Does :scale have priority over :width or :height? Or the opposite?
   - What would be the :scale of an image that does not preserve aspect
Manuel Giraud

reply via email to

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