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?".
If I want to customize the width of the output border in pixel, what should I do? I can change the argument in the octagon kernel, but I would like to control exactly how wide it is.
Because this is the border, I would like when it is enlarges, it is aligned it in the middle, not in left or right.
Also, sometimes I would like the output to be a dotted line or a stroked line. Is there any way to manipulate this?
Sorry this is not very clear to me. Can you show examples of what you want to happen and explain what you are trying to do for each example with an example output. You have too many cases. Break this into parts for each case with examples.
Sorry for making you confused. I'll try to explain better.
These are three images of the output when the argument of octagon is 1, 3 and 5:
The point is, when you enlarge the border, it expand inside. I would like it to expand equally inside and outside, which means the heart of the border is unmoved.
Sometimes I would like the output to be a dotted line or a dashed line. Is there a way to change the code to achieve that?
The point is, when you enlarge the border, it expand inside. I would like it to expand equally inside and outside, which means the heart of the border is unmoved.
Yes, there is. Replace edgein with edge and half the octagon:size
Sometimes I would like the output to be a dotted line or a dashed line. Is there a way to change the code to achieve that?
I have tried to do that myself, and haven't succeeded. I ask you in a seperate thread viewtopic.php?f=1&t=26191&p=114987#p114987 and you say there is no way. So can you help me again? Thank you.
I will have to get back to you later with updates on the script. I will be out most of the day.
Sorry I misunderstood your question. If you have a raster image with lines, I do not think you can easily change solid lines to dashed lines. You can only do that if you have a vector image such as SVG. The only way I can think to do that is to use the image as a mask and composite it with some other image that has a tiny checkerboard pattern.
The point is, when you enlarge the border, it expand inside. I would like it to expand equally inside and outside, which means the heart of the border is unmoved.
This works for me by changing edgein to edge and making -bordercolor none and -border = octagon value or larger if needed and then shave by octagon value. So here I use octagon:2 which will add about 2 pixels to each side of the edge.
convert.im6: unable to open image `-opaque': No such file or directory @ error/blob.c/OpenBlob/2638.
convert.im6: no decode delegate for this image format `-opaque' @ error/constitute.c/ReadImage/544.
convert.im6: unable to open image `white': No such file or directory @ error/blob.c/OpenBlob/2638.
convert.im6: no decode delegate for this image format `white' @ error/constitute.c/ReadImage/544.