Copy link to clipboard
Copied
Hi everyone,
I often work with rasterized text layers where Layer Styles (like gradients) are lost. Manually recreating gradients using the Eyedropper tool takes too much time, Therefore, I'm looking for a script that can:
1, Auto-detect and extract the gradient from a rasterized layer.
2, Recreate the gradient and save it as a Custom Gradient in Photoshop.
3, (Optional) If possible, restore other lost Layer Styles like strokes or shadows.
I repeat this task often, so automation would be a huge time-saver.
Any guidance or script suggestions would be deeply appreciated!
🙏 Huge thanks in advance!
1 Correct answer
IMO I am afraid that there is no script solution for this problem.
A script can read coordinates and colour values, for example. But a colour gradient can have so many settings - it's like trying to turn an omelette back into an egg.
Sorry
Explore related tutorials & articles
Copy link to clipboard
Copied
Why are the gradients lost? What steps lead to this unwanted result? I obviously haven't seen this first hand. You're much better fixing this at the source.
Copy link to clipboard
Copied
Thanks for your response!
In my case, I don’t have access to the original layers with editable Layer Styles. The files source I receive already have rasterized text layers with gradients, meaning the original Gradient Overlay (or other effects) is lost.
That’s why I’m looking for an efficient method to extract and recreate gradients automatically. Since I have to do this process frequently, I’m looking for a way to automate it rather than manually recreating.
I was wondering if there’s any script that could help speed up this process? I’d really appreciate any suggestions!
Copy link to clipboard
Copied
IMO I am afraid that there is no script solution for this problem.
A script can read coordinates and colour values, for example. But a colour gradient can have so many settings - it's like trying to turn an omelette back into an egg.
Sorry
Copy link to clipboard
Copied
@BongBong6868 , as @Stephen Marsh already hinted at: The people sending you degraded files should stop deliberately damaging the images before handing them off to you.
• If I remember correctly Illustrator’s Image Trace has been improved in recent years and should be able to create proper gradients – I am not sure if it would do so well enough for your needs and it would likely not fit well inside your workflow.
• Libraries’ »Extract from Image« does not seem to be fully up to the task.
I guess I concur with @pixxxelschubser ’s assessment.
And the same goes for reconstructing Strokes and Drop Shadows, which you also mentioned in the original post.
In this day and age it may be tempting to wonder: »Couldn’t AI do it?« and the answer would probably be: »Yes« but would it be worth the resources?
Copy link to clipboard
Copied
Thank you all for your responses!
Copy link to clipboard
Copied
Are there any constraints on the gradients that might make evaluating easier – are they always linear, at 90˚, …?
Copy link to clipboard
Copied
Most of the gradients I’m working with are linear, and they are typically set at a fixed angle, like in this example (110°).

