Merging/Combining an image and text file side by side -
is there way combine 2 different files (text, image) side side? output image or pdf file etc...? have found methods similar image files , system automated using bash script. looking similar thing. have frames video file , respective sensors data in other text file. need combine image info along sensor data in 1 file. output image, pdf etc... image file having naming sequence 0001.png
with imagemagick installed on linux distros , available macos , windows:
start picture.jpg
and text file called description.txt
these funky cogs found on internet place. newlines ok, , text gets smaller more add.
then this:
# width , height of picture read w h < <(convert picture.jpg -format '%w %h' info:-) # put text on grey background , append right of image convert -background lightgray -size ${w}x${h} -gravity center label:@description.txt picture.jpg +swap +append result.jpg
there many other possibilities , techniques:
geom=$(convert -format %g picture.jpg info:) convert -background lightgray -size $geom -gravity center -fill blue label:'cogs!' picture.jpg +swap +append result.jpg
convert -background darkgray -size $geom -gravity center -fill magenta label:'cogs!' picture.jpg +append -bordercolor black -border 10 result.jpg
Comments
Post a Comment