You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running "convert" on a PGM file with metadata between the magic number and dimension/bitdepth lines, any new line characters are removed. This behaviour started at 7.0.8-x from what I can tell. All prior versions that I have worked with have preserved the new line characters (7.0.7, 6.x).
Head of file before running convert:
$ head -n 6 white.pgm
P5
# metadata line 1
# metadata line 2
# metadata line 3
100 100
65535
Head of file after running convert:
$ head -n 4 new.pgm
P5
# metadata line 1 metadata line 2 metadata line 3
100 100
65535
If this isn't a bug, would it be possible to add in a flag of '-preserve-exact-metadata' or something like that?
Steps to Reproduce
Create a blank PGM file convert -size 100x100 xc:white white.pgm
Insert metadata into file sed -i -e '/^P5/s/P5/P5\n# metadata line 1\n# metadata line 2\n# metadata line 3/g' white.pgm
Run convert (note, I realize that running convert on this image actually doesn't accomplish anything, but, it's the most basic example) convert white.pgm new.pgm
Description
When running "convert" on a PGM file with metadata between the magic number and dimension/bitdepth lines, any new line characters are removed. This behaviour started at 7.0.8-x from what I can tell. All prior versions that I have worked with have preserved the new line characters (7.0.7, 6.x).
Head of file before running convert:
Head of file after running convert:
If this isn't a bug, would it be possible to add in a flag of '-preserve-exact-metadata' or something like that?
Steps to Reproduce
convert -size 100x100 xc:white white.pgm
sed -i -e '/^P5/s/P5/P5\n# metadata line 1\n# metadata line 2\n# metadata line 3/g' white.pgm
convert white.pgm new.pgm
System Configuration
The text was updated successfully, but these errors were encountered: