GNU bug report logs - #33990
27.0.50; image-transform-fit-to-height/-width violates assert

Previous Next

Package: emacs;

Reported by: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>

Date: Sat, 5 Jan 2019 17:27:01 UTC

Severity: normal

Found in version 27.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 33990 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Cc: 33990 <at> debbugs.gnu.org
Subject: Re: bug#33990: 27.0.50;
 image-transform-fit-to-height/-width violates assert
Date: Sat, 19 Jan 2019 10:29:11 +0200
> From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
> Cc: 33990 <at> debbugs.gnu.org
> Date: Tue, 15 Jan 2019 22:38:40 +0100
> 
> Eli Zaretskii writes:
> > Can you propose a patch that would implement your suggestion?
> 
> It looks like my analysis was wrong.  The problem is rather that
> create-image applies a default scaling, when :scale is not given.  This
> depends on the font size (only if char-width > 10 pixels), which
> explains why it happens on my laptop but not on my desktop machine.  I
> guess create-image is targeting image resources like toolbar buttons,
> where it may be a good idea to scale the images with the fonts for
> so-called "hidpi" displays.  But for image-mode the situation is
> different and I at least do not want that behaviour.
> 
> I attach three patches, the first is a minimal change that fixes the
> problem for me.  The second adds to the doc string of create-image,
> because I think that its behaviour is unexpected enough to warrant
> highlighting.  The third makes the image-mode transform parameters
> buffer-local, because that seems more appropriate and even complies with
> the doc string form image-transform-rotation better.  This third patch
> changes behaviour, though, so maybe a second opinion is in order.
> 
> The patches are against master, I haven't tested if they apply against
> emacs-26.  Let me know if there is something that needs to be changed.

Thanks, this LGTM.  I will wait for a few days for comments, and pushd
these if no objections are heard.

I understand these are not recent regressions?  If so, I think the
master branch is where they should go.  But if you think the bug is
grave enough, I could consider them for the emacs-26 branch instead.




This bug report was last modified 6 years and 114 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.