Subject: Re: bug#39736: 27.0.60; wrong display of scaled checkerd pattern image

From: Alan Third <[email-masked]>
Date: Mon, 24 Feb 2020 20:05:23 +0100 (CET)

On Sat, Feb 22, 2020 at 11:26:54PM +0900, [email-masked] wrote:
> 
> A scaled checkered pattern image is converted into a solid gray image.
> I expect a large chechered pattern.
> Evaluating the form below, a solid gray square is displayed.
> 
> (let ((data "\
> P1
> 8 8
> 01010101
> 10101010
> 01010101
> 10101010
> 01010101
> 10101010
> 01010101
> 10101010
> "))
>   (insert-image (create-image data 'pbm t :scale 8)))

I believe this is the same as bug#38394. Could you perhaps try the
patch at

    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38394

> The form below temporally displays another image.
> The upper side is gray, the lower-left corner is black,
> and the lower-right corner is white.
> Once the text cursor gets on the image, the whole image is displayed as
> a gray square.
> 
> (let ((data "P1\n2 2\n01\n10")
>       (buf (generate-new-buffer "tmp")))
>   (switch-to-buffer buf)
>   (insert "\na")
>   (goto-char (point-min))
>   (redisplay)
>   (insert-image (create-image data 'pbm t :scale 16)))

I tried this and couldn’t replicate it, but I believe I had the patch
for 38394 applied, so it may be a fix. Alternatively it could be
related to the way the cursor is drawn on images.
-- 
Alan Third