Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating text layers #25

Open
igstan opened this issue Mar 21, 2014 · 9 comments
Open

Updating text layers #25

igstan opened this issue Mar 21, 2014 · 9 comments

Comments

@igstan
Copy link

igstan commented Mar 21, 2014

Hi,

Is it currently possible to update text layers in a PSD file? I have some sort of PSD template with a placeholder text layer, and I'd like to dynamically provide values for that layer and then generate a set of images. Is this possible with psd-tools?

@kmike
Copy link
Member

kmike commented Mar 21, 2014

Hi @igstan,

No, unfortunately it is not possible currently. The following is missing:

  1. there is no support for psd writing - currently psd-tools can only read psd files;
  2. layer composition utilities are quite basic (only alpha composition is supported), so if we start modifying layers and writing PSD files combined image could be incorrect;
  3. font data is not parsed for text layers (only text itself is extracted) - this part of PSD format is not documented by Adobe; there is an external implementation for that though (see https://github.com/codercarl/py-psd-engineData), and something like that will eventually become a builtin feature;
  4. font rendering is not implemented - for text layers psd-tools gets images from pre-rendered bitmaps stored in psd file; even if we start parsing font data, modifying images will require re-implementing parts of Photoshop text rendering engine.

I think that if we improve (1) and maybe (2) then what you want to do can be approximated without implementing (4) and (4): you can render the text using PIL. Nothing prevents implementation of (1) - even if psd-tools doesn't know how to parse some data, binary blobs are not discarded, but nobody is working on this feature AFAIK.

@ihrankouski
Copy link

Hello. Did anything changed?

@kmike
Copy link
Member

kmike commented Oct 30, 2016

Hey @ihrankouski!

  1. nothing changed;
  2. there is a PR with a much more advanced layer composition: Blend modes support for merging #49; it is not merged and requires some work;
  3. as I recall, parsing is improved, so it should be easier to get font information now;
  4. nothing changed.

@mediaotg
Copy link

Hello. Did anything change?

kyamagu added a commit that referenced this issue Feb 20, 2019
@kyamagu
Copy link
Contributor

kyamagu commented Feb 20, 2019

Editing text is very difficult. Perhaps requires freetype or equivalent.

@yooooyooo
Copy link

yooooyooo commented Nov 16, 2021

Hello. Did anything change and what are the difficulties? What should I do if I try to implement this feature? @kyamagu @kmike

@kroomz
Copy link

kroomz commented Oct 14, 2022

Is text layer editing still not possible with psd-tools?

@HitobitoArnold
Copy link

If editing text, some other part of data should also be modified.
Still have no idea which parts should be changed, and how to modify them. :((

@sokoloveav
Copy link

Hello! Still no updates on editing text layer with psd-tools?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

9 participants