extract psd text layer's text

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
itsmaddy
Posts: 4
Joined: 2011-12-19T00:44:58-07:00
Authentication code: 8675308

extract psd text layer's text

Post by itsmaddy »

Hello everyone,
does anybody know if we can extract the text of the particular layer in psd file.
http://www.imagehousing.com/image/926034
i want to extract the text in the psd text layer,using imagick.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: extract psd text layer's text

Post by fmw42 »

The file you show is a PNG image and not PSD. I don't see any way to download the PSD file.


Do you want text as characters or text as a binary image.

The former would require OCR. The latter could be done via thresholding.
User avatar
itsmaddy
Posts: 4
Joined: 2011-12-19T00:44:58-07:00
Authentication code: 8675308

Re: extract psd text layer's text

Post by itsmaddy »

hey fmw42,
what i wanted is to extract the text from the text layer of the psd file.
you can download the psd file from the below link.
http://mirrorimg.net/im1/m5y.psd

in the provided psd file there are three layers named title,title content,header background.
out of these, 2 layers are text layer.(title,title content)
I want to get the text in the layer(title and title content)
i.e. for title layer - 'your title goes here' as my extracted text.
how can i extract the text from these two layers using imagemagick.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: extract psd text layer's text

Post by Bonzo »

As fmw42 says the text will just be an image and you can not alter it.

This will save an image of all the layers:

Code: Select all

convert m5y.psd m5y.psd.png
This will select the layers you want:

Code: Select all

convert m5y.psd[2] layer2.png
convert m5y.psd[3] layer3.png
Post Reply