-
Notifications
You must be signed in to change notification settings - Fork 187
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
Modifying Defined Image Variables, Saving change to ImageResources #375
Comments
I solved the issue! I was misled by the documentation on the """
py:attribute:: signature
Binary signature, always ``b'8BIM'``.
""" However the signature for Resource type IMAGE_READY_VARIABLES is actually new_resource = ImageResource(b'MeSa', key=Resource.IMAGE_READY_VARIABLES, data=xml_str.encode()) Now the data is represented correctly in Photoshop! 💪 Perhaps that comment should be edited since sometimes 8BIM is not the correct signature? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there! I'm trying to modify an Image Resource, specifically the
IMAGE_READY_VARIABLES
which are variables in Photoshop used for Data Sets to govern a layer's visibility for example. Here you can see an example of the operation I'm performing:Just for a quick test, I decided to modify the replace the IMAGE_READY_VARIABLES with just one of the variables that already exists in the document, effectively trimming the other 2 variables. Here is the output when I read them originally:
Here is the output of what I changed it to:
Looks identical right? Welp, it may look totally correct BUT now when I open the PSD, Photoshop acts as though no variables are defined at all. I've now used this same process to define variables dynamically for each layer, among many other tests, I cannot get these variables written to this section to be recognized. Does anyone have any ideas? There is no way as far as I've found to modify defined variables in Photoshop using action descriptors or the Photoshop API so modifying them defined in the PSD file is my last hope. Any ideas to get this to work would be hugely appreciated!
The text was updated successfully, but these errors were encountered: