Newlines in text files no longer work.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Posts: 1
Joined: 2018-08-16T01:52:48-07:00
Authentication code: 1152

Newlines in text files no longer work.

Post by alien_life_form » 2018-08-16T02:21:08-07:00

Using ImageMagick- on a linux (Fedora Core 28) platform.

Until recently the following:

Code: Select all

convert -size "$SZ" xc:"$BG" -font "$FN" -pointsize $PZ -fill "$FG" -annotate +"$BL"+"$BL" "@$infile" -trim -bordercolor "$BC" -border "$BL" +repage "$outfile"

Code: Select all

convert -size 2000x6000 xc:black -font Courier-Bold -pointsize 64 -fill white -annotate +90+90 @/tmp/lies.txt -trim -bordercolor '#000' -border 90 +repage /tmp/lies.png

Would convert the text file $infile to the image $outfile preserving formatting, etc.

It appears that one of the recent updates (I have no way of knowing which) broke the newline recogbnition - all the lines in the file are now drawn on on top of the other (I tried it also with a <CR><NL> terminated file, no change). Replacing -annotate with -draw (and changing the file accordingly) yields the same result.

Anybody else seeing something similar, or know if this is distro/platform dependent ?

User avatar
Site Admin
Posts: 10920
Joined: 2003-05-31T11:32:55-07:00

Re: Newlines in text files no longer work.

Post by magick » 2018-08-16T04:29:03-07:00

Likely this is a transient bug. We tried your command with the current release of ImageMagick and got expected results.

Posts: 4
Joined: 2018-01-04T00:22:13-07:00
Authentication code: 1152

Re: Newlines in text files no longer work.

Post by imma4 » 2018-09-03T05:17:04-07:00

Post Reply