Page 1 of 1

Modify text layer in a TIFF (or PSD) image

Posted: 2017-04-01T05:50:07-07:00
by stylesheets
Hi,

I need to process some images:
  • Read a PSD (or TIFF) image. My images consist of a background image and a text layer (with PSD styles applied to it)
  • Modify a text layer without losing the layer styling
  • Save to PNG
I'm really new to ImageMagick, but it seems from other posts in this forum that this can be done.

Ideally, I need to proceed either via command line or using .NET

Any help on how to do this would be more than welcome!

Cheers!

Re: Modify text layer in a TIFF (or PSD) image

Posted: 2017-04-01T06:28:56-07:00
by snibgo
IM is a raster image processor. It can read raster images from PSD files, and some metadata. But a PSD text layer doesn't (as far as I know) store the text in a form that IM can read or write.

To modify the text layer of a PSD, a Photoshop script seems the obvious tool.

Re: Modify text layer in a TIFF (or PSD) image

Posted: 2017-04-01T07:31:56-07:00
by stylesheets
snibgo wrote: 2017-04-01T06:28:56-07:00 IM is a raster image processor. It can read raster images from PSD files, and some metadata. But a PSD text layer doesn't (as far as I know) store the text in a form that IM can read or write.

To modify the text layer of a PSD, a Photoshop script seems the obvious tool.
I'd like to stay away from photoshop, would this be possible if I used TIFF files?

Thank you!

Re: Modify text layer in a TIFF (or PSD) image

Posted: 2017-04-01T08:21:30-07:00
by Bonzo
I would delete the text layer and start from fresh. I do not see how you can read any styling etc. from a raster image.

You could possibly use some OCR to read the text.
I'm really new to ImageMagick, but it seems from other posts in this forum that this can be done.
What are these posts?

Re: Modify text layer in a TIFF (or PSD) image

Posted: 2017-04-01T09:26:32-07:00
by snibgo
As Bonzo says, if your text has been rasterized, then OCR might get the text back, as text.
stylesheets wrote:... would this be possible if I used TIFF files?
Try it and see. Create a text layer in PS, save as both PSD and TIFF. Then try:

Code: Select all

identify -verbose yourfile.psd
identify -verbose yourfile.tiff
Does your text appear in the output? Also try exiftool.