#1006441 imagemagick-6.q16: multiline comments are not idempotent in pgm codec

Package:
imagemagick-6.q16
Source:
imagemagick
Description:
image manipulation programs -- quantum depth Q16
Submitter:
Mathieu Malaterre
Date:
2022-02-25 13:09:03 UTC
Severity:
normal
#1006441#5
Date:
2022-02-25 13:05:22 UTC
From:
To:
Dear Maintainer,

I cannot do a round-trip operation pgm -> jpg -> pgm while preserving
multilines comments.

Steps:

% convert -comment 'hello\nworld\n!' -depth 8 -size 8x8 xc:black black.pgm
% convert black.pgm black.jpg
% convert black.jpg idem.pgm
% head black.pgm idem.pgm
==> black.pgm <==
P5
#hello
#world
#!
8 8
255

==> idem.pgm <==
P5
#hello
#world
#!
#
8 8
255