Page 1 of 1
[Help Wanted] Fill outside of the circle
Posted: 2017-07-04T00:23:49-07:00
by metal0077
Hi Guys I want to fill outside of the circle, leaving letters in the middle, and the rest one solid color
The ideal is letters Black and the rest white, its possible?
The image:
Re: [Help Wanted] Fill outside of the circle
Posted: 2017-07-04T01:03:38-07:00
by fmw42
What is your IM version and platform? Please always provide that, since syntax differs. Try the following:
Code: Select all
convert input.jpg -fuzz 50% -fill black -opaque black -bordercolor white -border 2 -fill black -draw "color 0,0 floodfill" -alpha off -negate result.png
Re: [Help Wanted] Fill outside of the circle
Posted: 2017-07-04T14:12:56-07:00
by metal0077
fmw42 wrote: ↑2017-07-04T01:03:38-07:00
What is your IM version and platform? Please always provide that, since syntax differs. Try the following:
Code: Select all
convert input.jpg -fuzz 50% -fill black -opaque black -bordercolor white -border 2 -fill black -draw "color 0,0 floodfill" -alpha off -negate result.png
@fmw42 Thanks for the response!
The version:
Code: Select all
$ identify --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-05-26 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
The image is almost OK.
But opening with my OCR software, I got an error
Code: Select all
Warning. Invalid resolution 0 dpi.
So I can't work with that output image yet
Re: [Help Wanted] Fill outside of the circle
Posted: 2017-07-04T15:04:29-07:00
by fmw42
try simply adding units and density.
Code: Select all
convert input.jpg -fuzz 50% -fill black -opaque black -bordercolor white -border 2 -fill black -draw "color 0,0 floodfill" -alpha off -negate -units pixelsperinch -density 72 result.png