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?".
-bash-3.2$ convert alphabet/l.png alphabet/a.png alphabet/u.png alphabet/r.png alphabet/a.png -background none +append cache/laura.png
-bash-3.2$ convert alphabet/d.png alphabet/a.png alphabet/v.png alphabet/i.png alphabet/d.png -background none +append cache/david.png
-bash-3.2$ convert -size 837x585 xc:none \ cache/laura.png -gravity north -composite \ alphabet/plus.png -geometry +0+227 -gravity north -composite \ cache/david.png -geometry +0+393 -gravity north -composite \ final/composite.png
convert: unable to open image ` cache/laura.png': @ error/blob.c/OpenBlob/2491.
convert: unable to open file ` cache/laura.png' @ error/png.c/ReadPNGImage/3023.
convert: unable to open image ` alphabet/plus.png': @ error/blob.c/OpenBlob/2491.
convert: unable to open file ` alphabet/plus.png' @ error/png.c/ReadPNGImage/3023.
convert: unable to open image ` cache/david.png': @ error/blob.c/OpenBlob/2491.
convert: unable to open file ` cache/david.png' @ error/png.c/ReadPNGImage/3023.
convert: missing an image filename ` final/composite.png' @ error/convert.c/ConvertImageCommand/2970.
-bash-3.2$ ls cache/
david.png laura.png
-bash-3.2$ ls final/
-bash-3.2$
as you can see the first 2 converts are creating the images david.png and laura.png in the cache folder (folder has 777 permissions)
next you see that i'm trying to create a composite image with those 2 files but it says it can't open them... at the bottom i ls'd the cache dir just you can see that they are there.
Oddly, each filename in the error report has a leading space. I don't use bash much; have you got backslashes in your script that AREN'T the last character on lines?
It's in php, i thought i would just throw it in the command line for obvious reasons.
But here is the php code... maybe you could shed some light on it.
wow it was the spaces... i would have thought it would toss the spaces out... should it not be done through bash?
So the problem is solved but still curious if i should set the domain settings to use something besides bash to prevent this from happening again.
In bash, when the final character in a line is backslash, it means "ignore the newline". These backslashes aren't the final characters, because they are followed by a space, and there is no newline within the string.
I doubt it. Just remember which language each component is in, and follow the rules. You are building createcomp as a command in one long string, so it doesn't need "\\".
Yeah i know, just makes my code look a little cleaner
Thanks for the help.
I just have one more question and don't want to start a new thread since it's nothing to serious but...
That one long string doesn't seem to be conserving some of the transparency from the png... but at the same time it's preserving most of it... just little hints here and there. I tried placing a -background none somewhere in there but didn't take.
Something I'm missing about the comp i'm missing?