From: ynyaaa@gmail.com
To: Eli Zaretskii <eliz@gnu.org>
Cc: Alan Third <alan@idiocy.org>, 39736@debbugs.gnu.org
Subject: bug#39736: 27.0.60; wrong display of scaled checkerd pattern image
Date: Wed, 26 Feb 2020 19:32:28 +0900 [thread overview]
Message-ID: <86mu95fxkz.fsf@gmail.com> (raw)
In-Reply-To: <83v9nvhjps.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 24 Feb 2020 21:24:31 +0200")
[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> > 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.
>
> I didn't see any temporary display, either, FWIW.
I tested with various :scale values.
(let* ((data "P1\n2 2\n01\n10")
(buf (generate-new-buffer "tmp"))
(max (1+ (frame-char-height)))
(scale 4))
(switch-to-buffer buf)
(while (<= scale max)
(erase-buffer)
(insert (format "\nscale: %g" scale))
(goto-char (point-min))
(redisplay)
(insert-image (create-image data 'pbm t :scale scale))
(insert ?_)
(sit-for 0.5)
(setq scale (1+ scale))))
It seems that if the image is partially displayed under '_',
lower area is painted black and white.
And the maximum value which causes temporary display seems to be
(frame-char-height).
For example, just started after emacs -Q, (frame-char-height) is 16
and :scale 17 simply displays solid gray square.
After (set-frame-font "Courier New-18"), (frame-char-height) is 27
and :scale 28 simply displays solid gray square.
The attached image shows how the square image id displayed.
[-- Attachment #2: emacs-tmp2.png --]
[-- Type: image/png, Size: 2623 bytes --]
prev parent reply other threads:[~2020-02-26 10:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-22 14:26 bug#39736: 27.0.60; wrong display of scaled checkerd pattern image ynyaaa
2020-02-24 19:05 ` Alan Third
2020-02-24 19:24 ` Eli Zaretskii
2020-02-24 21:39 ` Alan Third
2020-02-26 10:32 ` ynyaaa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86mu95fxkz.fsf@gmail.com \
--to=ynyaaa@gmail.com \
--cc=39736@debbugs.gnu.org \
--cc=alan@idiocy.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).