unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
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:15:09 +0000	[thread overview]
Message-ID: <K6U_uJc3zUeWUTRFKwopvsuIA7pMOjw67k7iq1n2eAeEp1H11cL1MG4P7SN5b6vu52A8S0m1m8JnPYCOWKPlzGyX-2vUHl5dkt_oPFy9mpY=@protonmail.com> (raw)
In-Reply-To: <TYZPR01MB3920383866B724A6F9A11C62C36F9@TYZPR01MB3920.apcprd01.prod.exchangelabs.com>

[-- Attachment #1: Type: text/plain, Size: 1821 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 to t​ 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: 4747 bytes --]

  parent reply	other threads:[~2024-11-07  3:15 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 [this message]
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

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='K6U_uJc3zUeWUTRFKwopvsuIA7pMOjw67k7iq1n2eAeEp1H11cL1MG4P7SN5b6vu52A8S0m1m8JnPYCOWKPlzGyX-2vUHl5dkt_oPFy9mpY=@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).