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'm trying to trim an image using a given mask. The problem is that my image has transparent areas and I need to cut a given area, preserving the transparent areas, so I can't just apply the mask and then use the trim function. Once mask is variable, I don't know the positioning or the dimension of the white area.
Is there any other way to achieve it without using the trim bounding box? This functions calls the function 'GetImageBoundingBox', which is part of the ImageMagick core API (unstable API), unavailable in most of ImageMagicks libraries, such as Imagick.
This works for me on IM 6.9.0.0 Q16 Mac OSX. Simply extract the alpha channel from the image and multiply by the mask. Then put the new alpha channel back into the image.
Both methods work, but remove the line at the bottom. Why are there lines under the images on the your examples above? When I download them, they have no lines. So perhaps this is what you want anyway. If the lines are real, then they should be included in your image or added after the processing.