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've been using the composite command to mask images and have run into a strange issue where an image I have is not being masked properly. I have tested the mask with other images and the mask has worked fine. Because of this, I think the issue lies with the source item being masked. I cannot for the life of me figure out why I get a blank image on output with this combination.
"Item" has a mean alpha of < 1%, and canvas has alpha=0. So you are compositing a very nearly transparent image over an entirely transparent image. I would expect the output to be almost entirely transparent.
I know because I read your verbose listings. For example, near the top of "Item", "Alpha" mean is 1.84609 (out of 255). The colours are about 253. So the image is nearly white, but also close to totally transparent.
"Canvas" is a very boring image. All the pixels are rgba(255,255,255,0). (I can tell by looking at the min and max of the four channels.) Every pixel is transparent white.
How can you fix it? Well, I don't know what you are trying to do.
snibgo wrote:I know because I read your verbose listings. For example, near the top of "Item", "Alpha" mean is 1.84609 (out of 255). The colours are about 253. So the image is nearly white, but also close to totally transparent.
"Canvas" is a very boring image. All the pixels are rgba(255,255,255,0). (I can tell by looking at the min and max of the four channels.) Every pixel is transparent white.
How can you fix it? Well, I don't know what you are trying to do.
The desired result is the boot with a little of its edge clipped by the mask. Right now I am getting a blank image. Thank you for the quick response and explanation.
This works for strict on off masking. What about gradient masking? Ie Instead of black and white for 0 or 100% I want to include gray for the inbetweens(alpha) like 33%, 27%, 77% etc. That Way we could accomplish something similar to this post Here but in command line.
The method needed would depend on the images you are working on. Looking at that stackoverflow post, there is a source/background image in RGB and a alpha/mask image in RGBA. The mask image is entirely black, only the alpha channel varies. Are these images the actual ones you are trying to combine? Knowing the character of all input images is necessary to give advice.
GreenKoopa wrote:The method needed would depend on the images you are working on. Looking at that stackoverflow post, there is a source/background image in RGB and a alpha/mask image in RGBA. The mask image is entirely black, only the alpha channel varies. Are these images the actual ones you are trying to combine? Knowing the character of all input images is necessary to give advice.
Either way is fine we're just trying to get one that works, currently we use a RGB source and a black and white only image as the mask. If possible we would like to use a white->black gradient or transparent to black mask. We would prefer whichever way works or is better.