From: Phil Dyer via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "63231@debbugs.gnu.org" <63231@debbugs.gnu.org>
Subject: bug#63231: 28.1; image-converter should remove warning messages while conversion
Date: Thu, 07 Nov 2024 03:38:45 +0000 [thread overview]
Message-ID: <jLHfNjlJsUBjkmMfRCmldEUQTFco3oXBdeAU5mgpA38xoQmk_8PmalQ10scgzA7ADCjPG-XPCXB2wjfaK9VICbHA3K5URA_Qv_lHImWBQRE=@protonmail.com> (raw)
In-Reply-To: <eFBOP2I3XLMziHDKeCyCHrpVn2vHIb3W_5W-ueBvn-YE6pKY95jpfEwVxS6fQkyh-_teViAx29mxvRTBhztAA50hA2cHSUlk6iPF2-r4u58=@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]
I have hit this bug while opening heic images on Linux.
Imagemagick v7 is deprecating the "convert" CLI. It issues a warning:
'''
WARNING: The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert"
'''
It still produces the PNG, however, the resulting PNG has the following header:
'''
WARNING: The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert"
\3fff89PNG
\^Z
\^@\^@\^@
IHDR\^@\^@\3fff8c\^@\^@\^R\^P\^H\^B\^@\^@\^@p\3fffd3\3fffc0\3fffb1\^@\^@\^@ cHRM\^@\^@z&\^@\^@\3fff80\3fff84\^@\^@\3ffffa\^@\^@\^@\3fff80\3fffe8\^@\^@u0\^@\^@\3fffea`\^@\^@:\3fff98\^@\^@\^Wp\3fff9c\3fffbaQ<\^@\^@\^@\^FbKGD\^@\3fffff\^@\3fffff\^@\3fffff\3fffa0\3fffbd\3fffa7\3fff93\^@\^@\^@ pHYs\^@\^@\^K\^R\^@\^@\^K\^R\^A\3fffd2\3fffdd~\3ffffc\^@\^@\^@\^AorNT\^A\3fffcf\3fffa2w\3fff9a\^@\^@\3fff80\^@IDATx\3fffda\3fffc4\3ffffd\3fffe9\3fff97d\3fffd9q'\3fff88\3fff99\3fffdd\3ffff5-\3fffbe{\3fffec\3fff91\3fff99\3fff91k\3fffad@\^U
....more png content below
'''
A valid PNG should not have a CLI warning embedded in it. Both warnings and errors should be placed into the messages/warnings/error buffers or similar, not placed inside the string representation of the image file, which I can't read anyway without calling (image-convert) directly. What currently happens when opening a .hiec file with `image-use-external-converter` set tot is that the entire PNG string is dumped into the messages buffer and the original image buffer displays a blank square. Since `*message*` truncates older lines, the warning message and reason for failure is not visible anyway.
Properly handling the imagemagick v7 cli is important, but is a separate issue. The warning should not be returned inside the string representation of the converted image.
Regards,Phil
[-- Attachment #2: Type: text/html, Size: 5174 bytes --]
prev parent reply other threads:[~2024-11-07 3:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 8:02 bug#63231: 28.1; image-converter should remove warning messages while conversion awrhygty
2023-05-02 12:07 ` Eli Zaretskii
2023-05-02 13:56 ` awrhygty
2024-11-07 3:15 ` Phil Dyer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-07 3:35 ` Phil Dyer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-07 3:38 ` Phil Dyer via Bug reports for GNU Emacs, the Swiss army knife of text editors [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='jLHfNjlJsUBjkmMfRCmldEUQTFco3oXBdeAU5mgpA38xoQmk_8PmalQ10scgzA7ADCjPG-XPCXB2wjfaK9VICbHA3K5URA_Qv_lHImWBQRE=@protonmail.com' \
--to=bug-gnu-emacs@gnu.org \
--cc=63231@debbugs.gnu.org \
--cc=phildyer@protonmail.com \
/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).