1

Have to add different text over an image. The texts are in the table. There are about 10,000. How can I automate this process? Maybe script for Photoshop? Or something else? Thank you in advance!

Mohd Asim Suhail
  • 2,176
  • 1
  • 16
  • 23
Nick Datsky
  • 13
  • 1
  • 3
  • What format is the table? What OS do you have available? Do you have to add all 10,000 texts to the same image - I hope it's big. Where do you have to place them on the image? What font? What colour? What size? – Mark Setchell Jan 31 '17 at 22:05
  • @MarkSetchell >What format is the table? CSV >What OS do you have available? macOS >Do you have to add all 10,000 texts to the same image - I hope it's big. Where do you have to place them on the image? Each text (row in the table) - on a separate image. The output will turn out 10,000 similar images. >What font? What colour? What size? At different patterns different fonts. – Nick Datsky Feb 01 '17 at 18:22
  • It is possible to read in a CSV in Photoshop and then add text from it to an image. But you'll need to "fill in the gaps" as Nick Datsky suggests. Also Stack Overflow isn't a script writing service. – Mr Mystery Guest Feb 06 '17 at 10:44

2 Answers2

2

Indesign, data merge works on both text and image. https://www.youtube.com/watch?v=ktcbTtC3-Xk

There is a variable function in photoshop check this tutorial https://www.youtube.com/watch?v=3IzpItHTvyo

0

I would recommend ImageMagick. It is most simply installed on macOS with homebrew, just:

brew install imagemagick

Then if your table looks like this in table.csv

base1.png,180,100,result1.png,I have a dream
base2.png,20,90,result2.png,Four score and seven years ago
base3.png,50,180,result3.png,Gonna build me a wall

You would do the following in bash in the Terminal:

#!/bin/bash
while IFS=, read base x y result text; do
   echo DEBUG: $base $x $y $result $text
   convert "$base" -pointsize 18 -annotate +${x}+${y} "$text" "$result"
done < table.csv

And you would get this:

enter image description here enter image description here enter image description here

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432