from wand.image import Image
with Image(filename="base.png") as img:
img.read(filename="background.png")
img.read(filename="image.png")
img.read(filename="sub_box.png")
img.read(filename="cta_box.png")
img.read(filename="sub_text.png")
img.read(filename="cta_text.png")
img.save(filename="final.psd")
I wrote this code to stack png images into a psd file
The code does work, the file has all the layers, but the color is all grayscale
(png images aren’t grayscale)
https://docs.wand-py.org/en/0.6.13/wand/image.html
Any ideas for solving this problem?
I tried to change the image.format to psd, checked the image.colorspace but couldn’t solve the problem
2
Answers
The problem was quite simple: When I changed the first line to
with Image(filename="background.png") as img:
It solved the issue
I guess you should first read the file you opened for some reason
This will help you stack images one over other. Also if have examples of files please attach it to question itself.