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?".
Very new to IM, so I'm sorry if this has an obvious answer.
I'm on a shared server with IM version 6.2.6. I'm trying to compose two images together using the command line.
This command (composite image.jpg shirt.jpg result.jpg) seems to reproduce image.jpg and shirt.jpg and call them result-0.jpg and result-1.jpg.
I tried using the convert command. This command (convert shirt.jpg image.jpg -composite result.jpg) produces result.jpg that looks like shirt.jpg with a black square the size of image.jpg on top of it. Something like this ...
I really have no idea what to try next. Any suggestions for me?
Thank you for the suggestion, but I have read through that documentation many times and nothing I have tried has been any better.
I'm trying to keep the commands simple initially to eliminate variables. Then when I get it working I'll add in things like size and positioning. As it is, it seems to me like either of those simple commands ('composite image.jpg shirt.jpg result.jpg' OR 'composite image.jpg shirt.jpg result.jpg') should take these images:
and turn them into something more like this:
losttime your command from what I can see should work. All I can think of is something is wrong with your input images.
Bonzo your example is exactly the same as the composite form, and should yeald the same result, bad if imputs are bad. The advantage of convert is that you can do other things before and after the composition.
and finally.. el_supremo Your command will do the job and will probably do what losttime really wants, (it adds black, never white to an image), but that is not dealing with the original problem.
losttime please post some links to the problem images so we can play with them and verify your problem and figure out the cause or the fix.
Lastly, applogies to everyone if I seem a little testy.
Yes, what I'd really like to accomplish is what would be acheived by '-compose multiply', but since that wasn't working for me I thought I'd just try these simple commands for now.
Hmm ... in gathering the image links for you I discovered that my base image ('shirt.jpg') has some sort of error that prevents it from being displayed in the web browser. I've been noticing lately that Photoshop images saved as jpgs seem to have errors unless you specifically use the "Save for Web" feature. I won't be able to get an error-free file until Monday, but I imagine that could fix my problem. Until then, here are the image links anyway:
As you say there is an error on the shirt jpg as when I download and try opening it I get the following errors:
Premature end of JPEG file Exif data will be ignored.
Corrupt JPEG data: 167854 exteneous bytes before marker 0xd9 Exif data will be ignored.
JPEG downstream contains no image Exif data will be ignored.
P.S. Searching google for " photoshop Corrupt JPEG data: extraneous bytes before marker " I found other people have had this problem and some old IM posts about it. Seems IM could cope with it as somebody could open similar corrupted images in 3.9.2
Now that I have an error free file on the server, the "convert" command works wonderfully. The "composite" command still yields two, non-composited files. Any idea why that would be happening?