Search found 82 matches

by coloring
2018-03-03T13:30:02-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 7189

Re: Write-mask not working with define connected components?

This is an image from later in the process, but you can see that the edgeout effect from earlier had created an enclosed area, and thus created an unintended "hole" (depending on the image, it can be much worse than this), which is left in the image's final result (as you can see, we can f...
by coloring
2018-03-03T12:33:02-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 7189

Re: Write-mask not working with define connected components?

Yes, it seems to not be compatible. Write mask works for me in other areas My other idea to pursue is to overlay the mask image onto the edgeout (which will leave only the unwanted holes), use define to remove the holes, then use the mask again to cut out the original part in the edgeout. Is it viab...
by coloring
2018-03-03T09:59:15-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 7189

Write-mask not working with define connected components?

Hi, I have a mask, and also morphology edgeout from the mask. I want to remove unwanted black holes inside the edgeout, but since there may be holes I need to keep, I am trying to use a write-mask using the original alpha mask to keep the connected components code from removing parts I want to keep....
by coloring
2018-03-02T16:59:49-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: [SOLVED] Imagemagick transparent background and white image outlines

Here is my final code. Removes all the gaps inside, and trims the final image. Works great, thank you very much! :) Edit: gah, actually, trim isn't working! I can't figure it why magick \( image.png +repage -bordercolor white -border 1x1 \ -fuzz 10% -fill transparent -floodfill +0+0 white -shave 1x1...
by coloring
2018-03-01T20:24:03-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: [SOLVED] Imagemagick transparent background and white image outlines

I mean the code above. (Your script is really nice by the way) This is an example of the edges clipped (not enough room for expansion of edgeout and dilation) https://image.ibb.co/dmFMDH/result1.png And here I increased the image size a little to account for expansion (unfortunately, I wasn't able t...
by coloring
2018-03-01T19:23:56-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: [SOLVED] Imagemagick transparent background and white image outlines

Is there a way to create some extra working space and trim it afterwards so that the edgeout and dilation don't get clipped if they go beyond the previous image bounds? (I'm trying to figure out how to do that right now)
by coloring
2018-03-01T15:48:06-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

That's exactly my intended result, thank you very much! I will study the steps carefully :)
by coloring
2018-03-01T11:47:06-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

So far this is what I have. 1st, I remove all white on the outside border. (I decided not to mess with the white inside the image) 2, get the alpha mask 3, enlarge the border (to create room for extra working space), dilate the edges (so I can create a white outline in the final result), and trim of...
by coloring
2018-02-28T18:18:50-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

I do not see any Bug report on this forum regarding this issue. I believe the problem is with the Linux package in the repository, not your program, so I filed the bug with the package maintainer. Others have filed similar bug reports to this one there as well. https://github.com/termux/termux-pack...
by coloring
2018-02-28T16:51:26-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

Note in IM 7 the correct command is magick, not magick convert. Try magick alone and see if that helps. magics image.png -transparent white tmp.png magics tmp.png -alpha extract tmp2.png magick tmp2.png \ -define connected-components:mean-color=true \ -define connected-components:area-threshold=30 ...
by coloring
2018-02-28T15:58:48-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

I do not get that corruption for your new image using IM 7.0.7.23 Q16 Mac OSX. What is your platform/OS? What version of libpng are you using? convert -list format PNG* PNG rw- Portable Network Graphics ( libpng 1.6.34 ) PNG* rw- Portable Network Graphics (libpng 1.6.34) I'm using an Android ARM aa...
by coloring
2018-02-28T11:54:53-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

Do you know what's happening? Please post a reproducible example: the input, the output with unwanted lines or whatever, and the command that made it. Source image: https://image.ibb.co/mR372c/bitmoji2003792811.png Commands: $ magick convert image.png -transparent white tmp.png $ magick convert tmp...
by coloring
2018-02-28T11:30:19-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

Thank you very much. You've given me some ideas I'm going to play around with, see how I can further optimize the process. I'll post back with my further questions. By the way, when I'm using imagemagick, I keep seeing graphics corruptions like this (horizontal lines that are in the wrong places, an...
by coloring
2018-02-28T08:56:57-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

Bonzo wrote: 2018-02-28T08:28:36-07:00 You should be able to use -background none or transparent
Check my updated second post, I think it should be clearer about what I'm trying to achieve :)
by coloring
2018-02-28T08:27:01-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 39069

Re: Imagemagick transparent background and white image outlines

Forgive my bad example commands. The commands are supposed to be examples. I'll try to find some images to illustrate what I'm trying to do Edit: Take this image for example https://image.ibb.co/nkR72c/bitmoji_20180228075147.png First, I want to replace all the white with transparency. The reason wh...