🎨 Using Python Scripts To Edit Photoshop Layers
I was trying to find out how to create multiple copies of the same image but insert a different line of text from a bank of lyrics I had created. I then found that using Photoshop you can quite easily manipulate your files with Python, saving them l...
ollierowles.hashnode.dev3 min read
Hey, thanks a lot for the article. I am trying to rasterize a layer that I imported into a psd document. I posted the question on stack overflow but didn't get any reply.
from photoshop import Session
with Session("C:/Users/Admin/Documents/images/edit_wall.psd", action="open") as ps:
doc = ps.active_document desc = ps.ActionDescriptor desc.putPath(ps.app.charIDToTypeID("null"), "C:/CG_CONTENT/wall_height.exr") event_id = ps.app.charIDToTypeID("Plc ") # `Plc` need one space in here. ps.app.executeAction(ps.app.charIDToTypeID("Plc "), desc) currentLayer = doc.activeLayer doc.rasterize(currentLayer)Can you point me in the right direction? Thanks.