image - montage command of ImageMagick does not read from file -


i use ubuntu 14.0.4. can use command label each image it's name:

montage -label '%t' -size 512x512 "./img/*.*[120x90]" -geometry +5+5 photo.png 

i want label images list of strings, written in text file. docs say:

-label name

use option assign specific label image ... if first character of string @, image label read file titled remaining characters in string. labels in file literal, no embedded formatting characters recognized.

but not use file provide label. use command this:

montage -label @un.txt -size 512x512 "./img/*.*[120x90]" -geometry +5+5 photo.png  

above, un.txt name of text file in ./img/ path. sample result:

enter image description here

in result, images labeled string @un.txt instead of content of un.txt. error in terminal:

montage.im6: improper image header `./img/un.txt' @ error/txt.c/readtxtimage/429

if move un.txt current (.) directory , run above command again, image (there no label) , below error:

enter image description here

montage.im6: not authorized `@un.txt' @ error/property.c/interpretimageproperties/2959.

note:

  1. all images jpg
  2. the version of imagemagick imagemagick 6.7.7-10

updated answer

maybe have wrong syntax label:

convert -size 100x100 xc:red label:@label.txt -append result.png 

enter image description here

where label.txt contains fred.

original answer

it related vulnerability discovered in imagemagick, see here.

you need update site policy file. can discover location running this:

convert -debug configure logo: null: 2>&1 | grep -ei "searching|loading" 

and in same directory/folder other xml config files.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -