cant remove gray blobs of this image srgba to gray (update ) (solved)?

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?".
Post Reply
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

cant remove gray blobs of this image srgba to gray (update ) (solved)?

Post by diegomage »

IM trying with posterize depth8 , threshold and png 8 but nothings works

Code: Select all

convert skeleton.jpg -morphology HMT LineEnds -threshold 50% -fill white -opaque white -negate png8:mmmm

Code: Select all

convert mmmm  -depth 8 +dither   -posterize 2  -threshold 99% zlineends.jpg
this is my image
Image

please help me


Image

I see the format of my image and is srgba
Last edited by diegomage on 2017-10-14T12:21:02-07:00, edited 3 times in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cant remove gray blobs of this image ?

Post by fmw42 »

Your original image is empty? Have you posted the correct image? Your output mmm needs a suffix?
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image ?

Post by diegomage »

is original there are blobs black in the image with blobs gray
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image ?

Post by diegomage »

for example when I save this image with another software this dither command works well but with imagemagick not works well IM dont know what is the correct format for remove blobs
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image ?

Post by diegomage »

the extra image is my image enlarge for show the gray blobs in the image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cant remove gray blobs of this image ?

Post by fmw42 »

OK. I can see the dots after -auto-level and expanding. What is you want to do with the original. If you just want to remove the dots. User -morphology close octagon:X. where X=1 or 2, for example. Or use -evaluate max 3x3 or 5x5.

If that is not why you want, then please explain further .
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image ?

Post by diegomage »

this is rare but i think that the problem is the format because a use kolourpaint for example for remove blobs using contrast method and works but with imagemagick not works

I dont know why
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image srgba tp gray (update ) ?

Post by diegomage »

I see the format of my image and I view that this is SRGBA ; exist any way to convert to grayscale ?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: cant remove gray blobs of this image srgba to gray (update ) ?

Post by snibgo »

Exiftool says the supplied image file, qMTdc.jpg, has only one color component. So it is grayscale.
snibgo's IM pages: im.snibgo.com
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image srgba to gray (update ) ?

Post by diegomage »

I use all this filter in my image and WORKS and solve my problem
1) remove alpha

Code: Select all

convert image -alpha off  -type GrayScale -colorspace GRAY mmmm
2) convert srgb to rgb

Code: Select all

convert mmmm -colorspace gray -threshold 45% -depth 8  -type bilevel -set colorspace sRGB -colorspace RGB   +dither   -posterize 2  -threshold 99.9% -negate  zlineefndds.jpg
3) convert rgb to gray

Code: Select all

convert    zlineefndds.jpg   -set colorspace sRGB -colorspace RGB   -type GrayScale -colorspace GRAY -separate -average   png8:zzzz.jpg
4) posterize threshold and maximum contrast

Code: Select all

convert   zzzz.jpg +dither   -posterize 2  -threshold 99.9%  -brightness-contrast -0,50  zzz2
VERY THANKYOU FOR YOUR HELP
Post Reply