Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
i have the following script, but i don't seem to understand why its not working. i CD into a directory with hundreds of PSD's and i need to simply over lay that one image and save them back out to a different directory, keeping them as layered PSDs.
when i run it as below, it simply takes the last file in the folder, and coverts it into the MANI.psd file, then gives me this error.
"composite: no decode delegate for this image format `' @ error/constitute.c/ReadImage/509."
"composite" needs two input filenames and an output filename. One of your input ends in "Out/" so it is a directory, not a file. Your output filename is "*.psd" which would (if it worked) create a filename called *.psd, which I don't think you want.
Do your two PSD files have multiple layers or just one layer. You can composite the flattened PSD with each other. But I don't think you can composite multi-layer PSD files in ImageMagick.
composite -gravity center /Users/flieckb/Desktop/MANI.psd /Users/flieckb/Desktop/Out/ -format psd "*.psd"
This syntax does not make sense to me. You have only one input. Composite needs two input images. You have some output directory following the input, but no image with it. That does not work. You also have *.psd at the end. Composite does not allow wildcards as you have used them.
See https://www.imagemagick.org/Usage/compose/
fmw42 wrote: ↑2018-09-04T10:01:40-07:00
Do your two PSD files have multiple layers or just one layer. You can composite the flattened PSD with each other. But I don't think you can composite multi-layer PSD files in ImageMagick.
composite -gravity center /Users/flieckb/Desktop/MANI.psd /Users/flieckb/Desktop/Out/ -format psd "*.psd"
This syntax does not make sense to me. You have only one input. Composite needs two input images. You have some output directory following the input, but no image with it. That does not work. You also have *.psd at the end. Composite does not allow wildcards as you have used them.
See https://www.imagemagick.org/Usage/compose/
You would need to create the image using label. Then separate all the PSD layers into say PNG files. Then create a new flattened layer from all the layers including the new text image, but without the old flattened layer. Then combine the layers into a new PSD file.
But note, ImageMagick can only handle simple layers. It does not know how to deal with groups or adjustment layers as far as I know. But I will defer to the ImageMagick developers to explain further if I am wrong, since there has been some new developments with PSD files.
Can you post your PSD file to some free hosting service that does not change the format or zip it and then post and then put the URL here, so that I can review your PSD file. Also what version of ImageMagick and platform are you using? If on Linux, then provide the ImageMagick version with date.
Hi fred, here's some sample PSD's. i read more into it, i wonder if -draw is a better option to simply put a visual marker in my PSD files. its just something so retouchers don't grab these while they are out with someone getting retouched.
Hi Fred, the 2nd works well. is this something i can batch a whole directory of files out as some side shell script by telling image magick where images will be, and where i want them placed?
For the second command, you would have to write a script loop over each file in a given directory and then output to another empty existing directory. What is your platform? Unix or Windows?
If on Unix (Linux or Mac), then try the following. Folder1 has your images and is on my desktop. Folder 2 is empty, but already created.
cd
cd desktop/folder1
list=`ls | egrep ".psd"`
for img in $list; do
echo "$img"
magick $img \
\( -clone 0 -alpha transparent -gravity south -pointsize 300 -fill red -annotate +0+20 "TESTING" \) \
../folder2/$img
done
Thanks this is a great working start, the only issue i see is that the changes aren't visible in bridge or in preview, so you can't see any update till you open the image. How do you get IM to regenerate the thumbnails?
Yes, for me all the photoshop meta data is lost as well as the color profile. This is likely because I recreated the flattened layer. But I cannot say for sure. The only way to handle that is to extract the profile from the original image first, then put it back at the end.
If you want to composite two PSD files with the same number of layers, then you could separate the layers into PNG files. The composite each pair of PNG files. Then regenerate the PSD file from each of the composited layers.