Subject: Re: bug#33990: 27.0.50; image-transform-fit-to-height/-width violates assert

From: Eli Zaretskii <[email-masked]>
Date: Sat, 12 Jan 2019 13:45:50 +0200

> From: Benjamin Riefenstahl <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 06 Jan 2019 10:12:13 +0100
> 
> Eli Zaretskii writes:
> > Please show the error message and the Lisp backtrace from the error,
> > and also the values of the relevant variables.
> 
> Values:
> 
>   size -> (995 . 1068) ; From image-display-size, i.e. the image dimensions 
>   (window-inside-pixel-edges) -> (8 0 933 970)
> 
> And yes, the image is actually higher than the window, it can be
> scrolled.  The original image is rather small, 75x80, and the
> difference, 1068 - 970 -> 98, is about the size of an original pixel
> after transformation, so this looks like a rounding problem.  Maybe the
> code should adjust by one original pixel when it calculates the target
> height in image-transform-properties?

Looks like your analysis is correct, thanks.  Can you propose a patch
that would implement your suggestion?