Contour cut images
- fmw42
- Posts: 24459
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Contour cut images
I wrote a Unix bash shell script, contour, to do this and allows the image to be opaque (constant background color), transparent or a mask provided. It also allow the user to change the background color in the output. Give it a try if you like and let me know if that helps you. See my link below.
-
- Posts: 5
- Joined: 2018-06-26T20:44:13-07:00
- Authentication code: 1152
Re: Contour cut images
Fred, we are trying to accomplish the same thing with our sticker site. Currently we have parameters like this: -d 25 -s 0 -r 0 -f 0 -m floodfill -h offfmw42 wrote: ↑2017-03-31T09:59:55-07:00replace the -transparent with -draw "matte 0,0 floodfill"
Code: Select all
convert 3b01580253b94dce89bbbf3aa30b7b17.png -trim +repage -alpha off mario2.png convert \ \( mario2.png \ -trim +repage \ -bordercolor white -border 40 \ -fuzz 5% -fill none -draw "matte 0,0 floodfill" \ -alpha off -write mpr:img -alpha on \ -alpha extract -morphology dilate disk:20 \ -blur 0x1 -level 0x50% -write mpr:msk1 +delete \) \ \( mpr:msk1 -negate -fill gray30 -opaque black -blur 0x10 \ -fill gray95 -opaque gray30 -write mpr:msk2 +delete \) \ \( mpr:msk1 -morphology edgein diamond:1 -negate -write mpr:edg +delete \) \ mpr:img mpr:msk1 -alpha off -compose copy_opacity -composite \ mpr:msk2 -reverse -compose over -composite \ mpr:edg -compose multiply -composite \ mario2_result2.png
![]()
However, after reading some of the previous posts we are probably missing more than wrong parameters to input. We have got it looking good for shapes, but text is what we are trying to figure out now, and we have tried a few variations of parameters. Here is an example screenshot: https://gm1.ggpht.com/jH3Bm0lsLiad3diyC ... 630-l75-ft
Basically we would like to achieve one single contour line around the outside with the inside filled with white. Currently in the example link there are holes in the O and other parts. We have the shapes very similar to the Mario, but without the shadow effect, and this was done using the contour script. If you or anyone has any input it would be appreciated. Thanks!
-
- Posts: 5
- Joined: 2018-06-26T20:44:13-07:00
- Authentication code: 1152
Re: Contour cut images
sorry about that! https://prnt.sc/k12jj2 this one should work. thank you!
-
- Posts: 5
- Joined: 2018-06-26T20:44:13-07:00
- Authentication code: 1152
Re: Contour cut images
here is one of our predefined shapes with the same code and it works pretty well for previews like this on our predefined shapes: https://prnt.sc/k12k1n
but havent figured out the text yet.
but havent figured out the text yet.
- fmw42
- Posts: 24459
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Contour cut images
Sorry, but I still do not understand the issue. Can you show me an example from my script contour that does not work the way you want and explain the issue.
-
- Posts: 5
- Joined: 2018-06-26T20:44:13-07:00
- Authentication code: 1152
Re: Contour cut images
we are trying to get it to look like these examples without the shadow and instead of shadow we will just use one 1px or 2px grayish line to give the sticker shape on a white background when previewing. however, the real issue is we cannot get the inner white fill. ours is full of holes and extra lines compared to the examples. https://prnt.sc/k12opa https://prnt.sc/k12pdu https://prnt.sc/k12pmr
you can see the difference in their images compared to ours. they have one continuous outer line only, and the inner fill is all white except for the actual graphic. the outer line also makes a nice contour line to give the words shape for a sticker. it is with text only and it works great for our premade sticker shapes. i hope that helps clear it up some. thanks fred.
- fmw42
- Posts: 24459
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Contour cut images
I do not see the holes you mention. Which image is theirs (and who is they) and which is from my script? If you would like to take this offline, you may contact me directly (fmw at alink dot net). Please provide an example from my script and mark on it what is wrong and explain what you would like. Show me something similar that shows what you want for the same text. We can discuss customizing the script if you would like.