Salagir's Blog

Old name was: "Why do witches burn?"

Ceci est la version anglaise. Aller à la version Française

Photoshop Text Extractor

Le mars 17th, 2010

While making Geek’s World, I often change the text at the last moment. As a result, the content of the .psd file was more accurate than the text in the database.
Plus, I also used to translate from English to French directly in photoshop.

And as I want to display the text on my webpage (google indexation) and as visitors can search a strip by it’s textual content, I want the text to be accurate in the database ! Copy-pasting from the photoshop is a pain.

So I coded a text extractor.
The texts written in a Photoshop file, as long as they aren’t transformed into Bipmaps, are encoded into the .psd file.

Example of use:

$ perl PsdTextExtractor.pl 614-txt.psd
free samples
Hey, I paid 2 euros for this on a plane!
échantillon gratuit
Hé, j'ai payé 2 euros pour ça dans un avion !
Geek's World 484 by Salagir

I chose a strip with little text so the example isn’t too big. Note that the formatting of the text is forgotten.
I’m sure you guessed that I wrote another script that calls this one, deletes the copyright, splits the two languages, and updates the database :)

You can download the code:

Leave a Reply