Convert png to vectors

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?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert png to vectors

Post by fmw42 »

I looked at your image's histogram via

identify -verbose yourimage

That told me the 4 non-white colors with the highest counts. I compared the hex colors for those with the ones you (or Anthony) had specified and found that the ones you were using were not the same. Thus without the -fuzz XX% -fill... -opaque would not find them. It also told me that your image has an opaque alpha channel. So hex colors might need to have 8 characters to include the alpha channel. Sometimes with alpha channels enabled, you must specify the alpha even if opaque or IM cannot match the color. I don't know if this happens with 100% opaque alpha channel or not.

identify -verbose 1test_CR.png
Image: 1test_CR.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 580x527+0+0
Resolution: 28.35x28.35
Print size: 20.4586x18.5891
Units: PixelsPerCentimeter
Type: TrueColorMatte
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 1-bit
Channel statistics:
Red:
min: 72 (0.282353)
max: 255 (1)
mean: 236.702 (0.928244)
standard deviation: 45.7186 (0.179289)
kurtosis: 6.86958
skewness: -2.79529
Green:
min: 32 (0.12549)
max: 255 (1)
mean: 232.715 (0.912608)
standard deviation: 54.836 (0.215043)
kurtosis: 5.38728
skewness: -2.58827
Blue:
min: 139 (0.545098)
max: 255 (1)
mean: 240.535 (0.943274)
standard deviation: 32.5162 (0.127514)
kurtosis: 3.59884
skewness: -2.19861
Alpha:
min: 255 (1)
max: 255 (1)
mean: 255 (1)

standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 177.488 (0.696032)
standard deviation: 39.2253 (0.153825)
kurtosis: 113.556
skewness: -19.3221
Colors: 405
Histogram:
15601: ( 72, 61,139,255) #483D8B DarkSlateBlue
1: ( 73, 61,139,255) #493D8B srgba(73,61,139,1)
87: ( 73, 62,140,255) #493E8C srgba(73,62,140,1)
65: ( 74, 63,140,255) #4A3F8C srgba(74,63,140,1)
3: ( 74, 63,141,255) #4A3F8D srgba(74,63,141,1)
87: ( 75, 64,141,255) #4B408D srgba(75,64,141,1)
1: ( 76, 65,141,255) #4C418D srgba(76,65,141,1)
15: ( 76, 65,142,255) #4C418E srgba(76,65,142,1)
4: ( 76, 66,142,255) #4C428E srgba(76,66,142,1)
72: ( 77, 66,142,255) #4D428E srgba(77,66,142,1)
6: ( 77, 66,143,255) #4D428F srgba(77,66,143,1)
1: ( 77, 67,142,255) #4D438E srgba(77,67,142,1)
7: ( 77, 67,143,255) #4D438F srgba(77,67,143,1)
42: ( 78, 67,142,255) #4E438E srgba(78,67,142,1)
22: ( 78, 67,143,255) #4E438F srgba(78,67,143,1)
24: ( 79, 68,143,255) #4F448F srgba(79,68,143,1)
1: ( 79, 68,144,255) #4F4490 srgba(79,68,144,1)
28: ( 79, 69,144,255) #4F4590 srgba(79,69,144,1)
3: ( 80, 69,143,255) #50458F srgba(80,69,143,1)
20: ( 80, 69,144,255) #504590 srgba(80,69,144,1)
1: ( 80, 70,143,255) #50468F srgba(80,70,143,1)
6: ( 80, 70,144,255) #504690 srgba(80,70,144,1)
20: ( 80, 70,145,255) #504691 srgba(80,70,145,1)
1: ( 81, 59,139,255) #513B8B srgba(81,59,139,1)
75: ( 81, 70,143,255) #51468F srgba(81,70,143,1)
6: ( 81, 70,144,255) #514690 srgba(81,70,144,1)
25: ( 81, 70,145,255) #514691 srgba(81,70,145,1)
52: ( 81, 71,144,255) #514790 srgba(81,71,144,1)
4: ( 81, 71,145,255) #514791 srgba(81,71,145,1)
1: ( 81, 71,146,255) #514792 srgba(81,71,146,1)
1: ( 82, 71,144,255) #524790 srgba(82,71,144,1)
3: ( 82, 71,145,255) #524791 srgba(82,71,145,1)
21: ( 82, 72,144,255) #524890 srgba(82,72,144,1)
5: ( 82, 72,145,255) #524891 srgba(82,72,145,1)
33: ( 82, 72,146,255) #524892 srgba(82,72,146,1)
7: ( 83, 72,146,255) #534892 srgba(83,72,146,1)
1: ( 83, 73,145,255) #534991 srgba(83,73,145,1)
13: ( 83, 73,146,255) #534992 srgba(83,73,146,1)
14: ( 83, 73,147,255) #534993 srgba(83,73,147,1)
2: ( 84, 73,146,255) #544992 srgba(84,73,146,1)
4: ( 84, 73,147,255) #544993 srgba(84,73,147,1)
501: ( 84, 74,147,255) #544A93 srgba(84,74,147,1)
1: ( 84, 75,146,255) #544B92 srgba(84,75,146,1)
1: ( 85, 75,146,255) #554B92 srgba(85,75,146,1)
59: ( 85, 75,147,255) #554B93 srgba(85,75,147,1)
10: ( 85, 75,148,255) #554B94 srgba(85,75,148,1)
1: ( 86, 76,146,255) #564C92 srgba(86,76,146,1)
1: ( 86, 76,148,255) #564C94 srgba(86,76,148,1)
1: ( 87, 65,143,255) #57418F srgba(87,65,143,1)
26: ( 87, 77,146,255) #574D92 srgba(87,77,146,1)
21: ( 87, 77,149,255) #574D95 srgba(87,77,149,1)
2: ( 87, 78,149,255) #574E95 srgba(87,78,149,1)
4: ( 88, 77,149,255) #584D95 srgba(88,77,149,1)
9: ( 88, 78,149,255) #584E95 srgba(88,78,149,1)
1: ( 88, 79,147,255) #584F93 srgba(88,79,147,1)
1: ( 88, 79,149,255) #584F95 srgba(88,79,149,1)
1: ( 89, 68,145,255) #594491 srgba(89,68,145,1)
19: ( 89, 79,147,255) #594F93 srgba(89,79,147,1)
51: ( 89, 79,150,255) #594F96 srgba(89,79,150,1)
43: ( 89, 80,148,255) #595094 srgba(89,80,148,1)
4: ( 89, 80,150,255) #595096 srgba(89,80,150,1)
4: ( 90, 57,140,255) #5A398C srgba(90,57,140,1)
1: ( 90, 79,150,255) #5A4F96 srgba(90,79,150,1)
1: ( 90, 80,149,255) #5A5095 srgba(90,80,149,1)
1: ( 90, 80,150,255) #5A5096 srgba(90,80,150,1)
7: ( 90, 80,151,255) #5A5097 srgba(90,80,151,1)
1: ( 90, 81,149,255) #5A5195 srgba(90,81,149,1)
1: ( 91, 80,151,255) #5B5097 srgba(91,80,151,1)
1: ( 91, 81,149,255) #5B5195 srgba(91,81,149,1)
1: ( 91, 81,151,255) #5B5197 srgba(91,81,151,1)
1: ( 91, 81,152,255) #5B5198 srgba(91,81,152,1)
1: ( 91, 82,151,255) #5B5297 srgba(91,82,151,1)
1: ( 91, 82,152,255) #5B5298 srgba(91,82,152,1)
1: ( 92, 82,150,255) #5C5296 srgba(92,82,150,1)
17: ( 92, 82,152,255) #5C5298 srgba(92,82,152,1)
1: ( 93, 83,152,255) #5D5398 srgba(93,83,152,1)
1: ( 93, 83,153,255) #5D5399 srgba(93,83,153,1)
44: ( 93, 84,149,255) #5D5495 srgba(93,84,149,1)
1: ( 93, 84,153,255) #5D5499 srgba(93,84,153,1)
1: ( 94, 84,152,255) #5E5498 srgba(94,84,152,1)
1: ( 94, 84,153,255) #5E5499 srgba(94,84,153,1)
1: ( 95, 85,153,255) #5F5599 srgba(95,85,153,1)
3: ( 95, 85,154,255) #5F559A srgba(95,85,154,1)
280: ( 96, 87,155,255) #60579B srgba(96,87,155,1)
1: ( 97, 88,152,255) #615898 srgba(97,88,152,1)
2: ( 97, 88,155,255) #61589B srgba(97,88,155,1)
80: ( 98, 89,152,255) #625998 srgba(98,89,152,1)
2: ( 98, 89,156,255) #62599C srgba(98,89,156,1)
3: ( 99, 55,140,255) #63378C srgba(99,55,140,1)
1: ( 99, 90,157,255) #635A9D srgba(99,90,157,1)
1: (100, 90,156,255) #645A9C srgba(100,90,156,1)
1: (100, 91,157,255) #645B9D srgba(100,91,157,1)
1: (101, 91,157,255) #655B9D srgba(101,91,157,1)
2: (101, 91,158,255) #655B9E srgba(101,91,158,1)
66: (101, 92,153,255) #655C99 srgba(101,92,153,1)
45: (101, 92,158,255) #655C9E srgba(101,92,158,1)
2: (102, 93,158,255) #665D9E srgba(102,93,158,1)
6: (103, 94,159,255) #675E9F srgba(103,94,159,1)
1: (104, 94,160,255) #685EA0 srgba(104,94,160,1)
1: (104, 95,155,255) #685F9B srgba(104,95,155,1)
1: (104, 95,160,255) #685FA0 srgba(104,95,160,1)
1: (105, 96,156,255) #69609C srgba(105,96,156,1)
1: (105, 96,160,255) #6960A0 srgba(105,96,160,1)
1: (106, 96,161,255) #6A60A1 srgba(106,96,161,1)
3: (106, 97,161,255) #6A61A1 srgba(106,97,161,1)
1: (107, 98,162,255) #6B62A2 srgba(107,98,162,1)
99: (107, 99,156,255) #6B639C srgba(107,99,156,1)
8: (108, 53,140,255) #6C358C srgba(108,53,140,1)
3: (108, 99,162,255) #6C63A2 srgba(108,99,162,1)
280: (109,100,162,255) #6D64A2 srgba(109,100,162,1)
2: (109,100,163,255) #6D64A3 srgba(109,100,163,1)
20: (109,101,158,255) #6D659E srgba(109,101,158,1)
1: (110,101,163,255) #6E65A3 srgba(110,101,163,1)
22: (110,102,158,255) #6E669E srgba(110,102,158,1)
1: (110,103,158,255) #6E679E srgba(110,103,158,1)
1: (111,102,164,255) #6F66A4 srgba(111,102,164,1)
3: (111,103,160,255) #6F67A0 srgba(111,103,160,1)
1: (111,103,164,255) #6F67A4 srgba(111,103,164,1)
77: (112,103,164,255) #7067A4 srgba(112,103,164,1)
2: (113,105,165,255) #7169A5 srgba(113,105,165,1)
1: (113,105,166,255) #7169A6 srgba(113,105,166,1)
2: (114,105,163,255) #7269A3 srgba(114,105,163,1)
3: (114,106,166,255) #726AA6 srgba(114,106,166,1)
1: (115,106,166,255) #736AA6 srgba(115,106,166,1)
1: (115,107,164,255) #736BA4 srgba(115,107,164,1)
3: (115,107,165,255) #736BA5 srgba(115,107,165,1)
26: (116,109,161,255) #746DA1 srgba(116,109,161,1)
2: (118,109,168,255) #766DA8 srgba(118,109,168,1)
2: (118,110,168,255) #766EA8 srgba(118,110,168,1)
1: (119,111,168,255) #776FA8 srgba(119,111,168,1)
42: (119,113,163,255) #7771A3 srgba(119,113,163,1)
1: (121, 67,147,255) #794393 srgba(121,67,147,1)
896: (121,113,170,255) #7971AA srgba(121,113,170,1)
1: (122,115,171,255) #7A73AB srgba(122,115,171,1)
2: (123,114,171,255) #7B72AB srgba(123,114,171,1)
2: (123,115,172,255) #7B73AC srgba(123,115,172,1)
25: (124,116,172,255) #7C74AC srgba(124,116,172,1)
2: (125,117,173,255) #7D75AD srgba(125,117,173,1)
38: (125,118,165,255) #7D76A5 srgba(125,118,165,1)
2: (125,118,174,255) #7D76AE srgba(125,118,174,1)
1: (126, 49,141,255) #7E318D srgba(126,49,141,1)
1: (126,119,166,255) #7E77A6 srgba(126,119,166,1)
41: (126,120,166,255) #7E78A6 srgba(126,120,166,1)
1: (126,120,167,255) #7E78A7 srgba(126,120,167,1)
1: (127,119,174,255) #7F77AE srgba(127,119,174,1)
1: (127,120,175,255) #7F78AF srgba(127,120,175,1)
1: (129,123,170,255) #817BAA srgba(129,123,170,1)
1: (130,122,176,255) #827AB0 srgba(130,122,176,1)
29: (131,124,168,255) #837CA8 srgba(131,124,168,1)
2: (131,124,177,255) #837CB1 srgba(131,124,177,1)
206: (133,126,178,255) #857EB2 srgba(133,126,178,1)
126: (134,128,169,255) #8680A9 srgba(134,128,169,1)
2: (135, 47,141,255) #872F8D srgba(135,47,141,1)
1: (135,128,179,255) #8780B3 srgba(135,128,179,1)
1: (135,129,180,255) #8781B4 srgba(135,129,180,1)
4: (136,129,180,255) #8881B4 srgba(136,129,180,1)
4: (136,130,180,255) #8882B4 srgba(136,130,180,1)
2: (137,130,180,255) #8982B4 srgba(137,130,180,1)
41: (138,131,181,255) #8A83B5 srgba(138,131,181,1)
1: (140, 52,145,255) #8C3491 srgba(140,52,145,1)
1: (140,134,183,255) #8C86B7 srgba(140,134,183,1)
1: (141,135,183,255) #8D87B7 srgba(141,135,183,1)
1: (142, 77,156,255) #8E4D9C srgba(142,77,156,1)
3: (142,135,184,255) #8E87B8 srgba(142,135,184,1)
2: (142,136,184,255) #8E88B8 srgba(142,136,184,1)
28: (142,137,174,255) #8E89AE srgba(142,137,174,1)
49: (143,138,174,255) #8F8AAE srgba(143,138,174,1)
2: (144, 91,163,255) #905BA3 srgba(144,91,163,1)
5: (145, 45,142,255) #912D8E srgba(145,45,142,1)
1: (145,139,181,255) #918BB5 srgba(145,139,181,1)
335: (145,139,186,255) #918BBA srgba(145,139,186,1)
2: (146,139,186,255) #928BBA srgba(146,139,186,1)
1: (146,140,186,255) #928CBA srgba(146,140,186,1)
2: (147, 48,143,255) #93308F srgba(147,48,143,1)
1: (147, 48,144,255) #933090 srgba(147,48,144,1)
2: (147,140,187,255) #938CBB srgba(147,140,187,1)
27: (147,143,177,255) #938FB1 srgba(147,143,177,1)
1: (148,142,188,255) #948EBC srgba(148,142,188,1)
2: (150, 51,145,255) #963391 srgba(150,51,145,1)
2: (150,144,189,255) #9690BD srgba(150,144,189,1)
1: (151,145,189,255) #9791BD srgba(151,145,189,1)
43: (151,147,178,255) #9793B2 srgba(151,147,178,1)
2: (152,146,190,255) #9892BE srgba(152,146,190,1)
1: (153,147,189,255) #9993BD srgba(153,147,189,1)
36: (153,148,191,255) #9994BF srgba(153,148,191,1)
3: (154, 43,142,255) #9A2B8E srgba(154,43,142,1)
1: (156, 80,160,255) #9C50A0 srgba(156,80,160,1)
1: (156,150,192,255) #9C96C0 srgba(156,150,192,1)
1: (156,151,182,255) #9C97B6 srgba(156,151,182,1)
1: (157, 46,144,255) #9D2E90 srgba(157,46,144,1)
1: (157,151,193,255) #9D97C1 srgba(157,151,193,1)
1: (157,152,193,255) #9D98C1 srgba(157,152,193,1)
21: (157,153,181,255) #9D99B5 srgba(157,153,181,1)
1026: (158,152,193,255) #9E98C1 srgba(158,152,193,1)
1: (159, 48,145,255) #9F3091 srgba(159,48,145,1)
1: (159,153,194,255) #9F99C2 srgba(159,153,194,1)
1: (160,155,195,255) #A09BC3 srgba(160,155,195,1)
27: (160,156,183,255) #A09CB7 srgba(160,156,183,1)
1: (161,144,190,255) #A190BE srgba(161,144,190,1)
1: (161,156,196,255) #A19CC4 srgba(161,156,196,1)
1: (162,156,196,255) #A29CC4 srgba(162,156,196,1)
1: (163,122,181,255) #A37AB5 srgba(163,122,181,1)
1: (163,158,197,255) #A39EC5 srgba(163,158,197,1)
5: (164,159,198,255) #A49FC6 srgba(164,159,198,1)
1: (165, 44,144,255) #A52C90 srgba(165,44,144,1)
1: (165,136,187,255) #A588BB srgba(165,136,187,1)
1: (168,128,183,255) #A880B7 srgba(168,128,183,1)
1: (168,163,200,255) #A8A3C8 srgba(168,163,200,1)
107: (169,166,187,255) #A9A6BB srgba(169,166,187,1)
1: (169,166,192,255) #A9A6C0 srgba(169,166,192,1)
205: (170,165,201,255) #AAA5C9 srgba(170,165,201,1)
1637: (171, 44,179,255) #AB2CB3 srgba(171,44,179,1)
38: (171,166,202,255) #ABA6CA srgba(171,166,202,1)
1: (171,167,203,255) #ABA7CB srgba(171,167,203,1)
11: (172, 39,143,255) #AC278F srgba(172,39,143,1)
3: (172, 46,180,255) #AC2EB4 srgba(172,46,180,1)
1: (172,120,180,255) #AC78B4 srgba(172,120,180,1)
2: (172,166,203,255) #ACA6CB srgba(172,166,203,1)
64: (172,169,189,255) #ACA9BD srgba(172,169,189,1)
3: (172,169,190,255) #ACA9BE srgba(172,169,190,1)
1: (173, 40,143,255) #AD288F srgba(173,40,143,1)
2: (173, 47,181,255) #AD2FB5 srgba(173,47,181,1)
1: (173, 48,181,255) #AD30B5 srgba(173,48,181,1)
2: (173, 49,181,255) #AD31B5 srgba(173,49,181,1)
1: (173, 76,160,255) #AD4CA0 srgba(173,76,160,1)
56: (173,170,189,255) #ADAABD srgba(173,170,189,1)
1: (174,169,203,255) #AEA9CB srgba(174,169,203,1)
1: (174,169,204,255) #AEA9CC srgba(174,169,204,1)
1: (175, 52,182,255) #AF34B6 srgba(175,52,182,1)
1: (175, 53,183,255) #AF35B7 srgba(175,53,183,1)
1: (175,147,194,255) #AF93C2 srgba(175,147,194,1)
1: (175,170,205,255) #AFAACD srgba(175,170,205,1)
2: (176, 54,183,255) #B036B7 srgba(176,54,183,1)
6: (176, 55,183,255) #B037B7 srgba(176,55,183,1)
2: (176, 57,184,255) #B039B8 srgba(176,57,184,1)
1: (176,173,192,255) #B0ADC0 srgba(176,173,192,1)
1: (177, 57,184,255) #B139B8 srgba(177,57,184,1)
279: (177, 58,184,255) #B13AB8 srgba(177,58,184,1)
1: (178,104,174,255) #B268AE srgba(178,104,174,1)
46: (178,176,191,255) #B2B0BF srgba(178,176,191,1)
2: (179, 63,186,255) #B33FBA srgba(179,63,186,1)
1: (179,175,201,255) #B3AFC9 srgba(179,175,201,1)
1: (179,175,207,255) #B3AFCF srgba(179,175,207,1)
5: (180, 66,187,255) #B442BB srgba(180,66,187,1)
1: (180,176,207,255) #B4B0CF srgba(180,176,207,1)
4: (181, 37,143,255) #B5258F srgba(181,37,143,1)
3: (181,177,209,255) #B5B1D1 srgba(181,177,209,1)
1: (181,179,194,255) #B5B3C2 srgba(181,179,194,1)
26: (182, 72,189,255) #B648BD srgba(182,72,189,1)
346: (182,178,209,255) #B6B2D1 srgba(182,178,209,1)
1: (182,178,210,255) #B6B2D2 srgba(182,178,210,1)
1: (183, 72,189,255) #B748BD srgba(183,72,189,1)
1: (183, 72,190,255) #B748BE srgba(183,72,190,1)
1: (183,181,197,255) #B7B5C5 srgba(183,181,197,1)
1: (184, 52,149,255) #B83495 srgba(184,52,149,1)
1: (184, 75,190,255) #B84BBE srgba(184,75,190,1)
1: (184,181,202,255) #B8B5CA srgba(184,181,202,1)
4: (185, 53,151,255) #B93597 srgba(185,53,151,1)
2: (185, 78,192,255) #B94EC0 srgba(185,78,192,1)
1: (185, 88,167,255) #B958A7 srgba(185,88,167,1)
1: (186,138,179,255) #BA8AB3 srgba(186,138,179,1)
1: (186,183,212,255) #BAB7D4 srgba(186,183,212,1)
1: (187, 83,194,255) #BB53C2 srgba(187,83,194,1)
44: (187,185,196,255) #BBB9C4 srgba(187,185,196,1)
76: (187,186,196,255) #BBBAC4 srgba(187,186,196,1)
1: (188, 45,148,255) #BC2D94 srgba(188,45,148,1)
295: (188, 86,194,255) #BC56C2 srgba(188,86,194,1)
2: (189, 89,196,255) #BD59C4 srgba(189,89,196,1)
1: (189,139,192,255) #BD8BC0 srgba(189,139,192,1)
1: (189,185,213,255) #BDB9D5 srgba(189,185,213,1)
29: (190,186,214,255) #BEBAD6 srgba(190,186,214,1)
1: (190,187,208,255) #BEBBD0 srgba(190,187,208,1)
1: (191, 37,144,255) #BF2590 srgba(191,37,144,1)
3: (191,188,215,255) #BFBCD7 srgba(191,188,215,1)
2: (191,188,216,255) #BFBCD8 srgba(191,188,216,1)
1: (192, 37,144,255) #C02590 srgba(192,37,144,1)
4: (192, 96,198,255) #C060C6 srgba(192,96,198,1)
1: (192,189,210,255) #C0BDD2 srgba(192,189,210,1)
1: (194, 99,166,255) #C263A6 srgba(194,99,166,1)
49: (194,100,200,255) #C264C8 srgba(194,100,200,1)
1: (194,110,179,255) #C26EB3 srgba(194,110,179,1)
222: (194,191,217,255) #C2BFD9 srgba(194,191,217,1)
1: (194,192,203,255) #C2C0CB srgba(194,192,203,1)
1: (194,192,207,255) #C2C0CF srgba(194,192,207,1)
1: (195, 41,146,255) #C32992 srgba(195,41,146,1)
1: (195,103,201,255) #C367C9 srgba(195,103,201,1)
71: (195,195,200,255) #C3C3C8 srgba(195,195,200,1)
1: (196, 76,163,255) #C44CA3 srgba(196,76,163,1)
1: (197,195,211,255) #C5C3D3 srgba(197,195,211,1)
2: (198, 56,154,255) #C6389A srgba(198,56,154,1)
1: (198, 67,159,255) #C6439F srgba(198,67,159,1)
1: (198,103,168,255) #C667A8 srgba(198,103,168,1)
1: (198,110,203,255) #C66ECB srgba(198,110,203,1)
1: (198,195,219,255) #C6C3DB srgba(198,195,219,1)
4: (199, 34,144,255) #C72290 srgba(199,34,144,1)
18: (199,114,205,255) #C772CD srgba(199,114,205,1)
1: (200,197,221,255) #C8C5DD srgba(200,197,221,1)
2: (200,198,221,255) #C8C6DD srgba(200,198,221,1)
1: (201,198,222,255) #C9C6DE srgba(201,198,222,1)
1: (201,200,205,255) #C9C8CD srgba(201,200,205,1)
2: (202, 36,145,255) #CA2491 srgba(202,36,145,1)
1: (202,201,207,255) #CAC9CF srgba(202,201,207,1)
1: (203,122,208,255) #CB7AD0 srgba(203,122,208,1)
1: (204,201,222,255) #CCC9DE srgba(204,201,222,1)
26222: (204,204,204,255) #CCCCCC grey80
1: (205, 51,153,255) #CD3399 srgba(205,51,153,1)
274: (205,128,210,255) #CD80D2 srgba(205,128,210,1)
2: (205,129,210,255) #CD81D2 srgba(205,129,210,1)
18: (205,158,188,255) #CD9EBC srgba(205,158,188,1)
1: (205,170,192,255) #CDAAC0 srgba(205,170,192,1)
4: (205,181,196,255) #CDB5C4 srgba(205,181,196,1)
2: (205,193,200,255) #CDC1C8 srgba(205,193,200,1)
22: (206,112,172,255) #CE70AC srgba(206,112,172,1)
3: (206,124,176,255) #CE7CB0 srgba(206,124,176,1)
4: (206,135,180,255) #CE87B4 srgba(206,135,180,1)
2: (206,147,184,255) #CE93B8 srgba(206,147,184,1)
6: (206,206,206,255) #CECECE srgba(206,206,206,1)
16: (207, 78,160,255) #CF4EA0 srgba(207,78,160,1)
2: (207, 89,164,255) #CF59A4 srgba(207,89,164,1)
1: (207,101,168,255) #CF65A8 srgba(207,101,168,1)
2: (207,181,214,255) #CFB5D6 srgba(207,181,214,1)
796: (207,204,224,255) #CFCCE0 srgba(207,204,224,1)
4: (207,207,207,255) #CFCFCF grey81
2814: (208, 32,144,255) #D02090 srgba(208,32,144,1)
3: (208, 43,148,255) #D02B94 srgba(208,43,148,1)
2: (208, 55,152,255) #D03798 srgba(208,55,152,1)
5: (208, 66,156,255) #D0429C srgba(208,66,156,1)
1: (208,136,212,255) #D088D4 srgba(208,136,212,1)
134: (208,208,208,255) #D0D0D0 srgba(208,208,208,1)
1: (209, 35,146,255) #D12392 srgba(209,35,146,1)
1: (209, 44,150,255) #D12C96 srgba(209,44,150,1)
1: (209,137,213,255) #D189D5 srgba(209,137,213,1)
8: (209,209,209,255) #D1D1D1 grey82
61: (210,208,227,255) #D2D0E3 srgba(210,208,227,1)
4: (210,210,210,255) #D2D2D2 srgba(210,210,210,1)
1: (211, 43,150,255) #D32B96 srgba(211,43,150,1)
146: (211, 47,151,255) #D32F97 srgba(211,47,151,1)
48: (211,143,215,255) #D38FD7 srgba(211,143,215,1)
2: (211,209,228,255) #D3D1E4 srgba(211,209,228,1)
142: (211,211,211,255) #D3D3D3 LightGray
1: (212,212,212,255) #D4D4D4 grey83
1: (213,213,213,255) #D5D5D5 srgba(213,213,213,1)
93: (215, 61,159,255) #D73D9F srgba(215,61,159,1)
1: (215,143,197,255) #D78FC5 srgba(215,143,197,1)
1: (215,214,220,255) #D7D6DC srgba(215,214,220,1)
57: (215,215,215,255) #D7D7D7 srgba(215,215,215,1)
7: (216,157,220,255) #D89DDC srgba(216,157,220,1)
1: (216,216,216,255) #D8D8D8 srgba(216,216,216,1)
60: (218, 76,166,255) #DA4CA6 srgba(218,76,166,1)
2: (218, 88,172,255) #DA58AC srgba(218,88,172,1)
1: (218,123,183,255) #DA7BB7 srgba(218,123,183,1)
1: (218,217,222,255) #DAD9DE srgba(218,217,222,1)
73: (218,218,218,255) #DADADA srgba(218,218,218,1)
2: (219,124,189,255) #DB7CBD srgba(219,124,189,1)
1: (219,163,222,255) #DBA3DE srgba(219,163,222,1)
323: (219,217,232,255) #DBD9E8 srgba(219,217,232,1)
1: (220,218,229,255) #DCDAE5 srgba(220,218,229,1)
175: (221, 91,174,255) #DD5BAE srgba(221,91,174,1)
1: (221,168,224,255) #DDA8E0 srgba(221,168,224,1)
40: (221,221,221,255) #DDDDDD srgba(221,221,221,1)
1: (222,104,179,255) #DE68B3 srgba(222,104,179,1)
277: (222,171,225,255) #DEABE1 srgba(222,171,225,1)
4: (222,220,235,255) #DEDCEB srgba(222,220,235,1)
1: (223,176,206,255) #DFB0CE srgba(223,176,206,1)
47: (224,106,181,255) #E06AB5 srgba(224,106,181,1)
1: (224,164,208,255) #E0A4D0 srgba(224,164,208,1)
1: (225,130,193,255) #E182C1 srgba(225,130,193,1)
1: (225,177,215,255) #E1B1D7 srgba(225,177,215,1)
51: (225,225,225,255) #E1E1E1 srgba(225,225,225,1)
1: (226,116,186,255) #E274BA srgba(226,116,186,1)
102: (227,121,189,255) #E379BD srgba(227,121,189,1)
24: (227,185,230,255) #E3B9E6 srgba(227,185,230,1)
110: (228,228,228,255) #E4E4E4 srgba(228,228,228,1)
1: (229,130,193,255) #E582C1 srgba(229,130,193,1)
1: (229,189,231,255) #E5BDE7 srgba(229,189,231,1)
1: (229,229,229,255) #E5E5E5 grey90
228: (230,136,196,255) #E688C4 srgba(230,136,196,1)
347: (231,230,240,255) #E7E6F0 srgba(231,230,240,1)
82: (232,231,241,255) #E8E7F1 srgba(232,231,241,1)
42: (232,232,232,255) #E8E8E8 grey91
51: (233,151,203,255) #E997CB srgba(233,151,203,1)
108: (233,199,235,255) #E9C7EB srgba(233,199,235,1)
2: (235,202,236,255) #EBCAEC srgba(235,202,236,1)
64: (235,235,235,255) #EBEBEB grey92
111: (237,166,211,255) #EDA6D3 srgba(237,166,211,1)
1: (237,237,237,255) #EDEDED grey93
46: (238,238,238,255) #EEEEEE srgba(238,238,238,1)
276: (239,213,240,255) #EFD5F0 srgba(239,213,240,1)
54: (240,181,218,255) #F0B5DA srgba(240,181,218,1)
2: (241,194,224,255) #F1C2E0 srgba(241,194,224,1)
1: (241,229,242,255) #F1E5F2 srgba(241,229,242,1)
77: (242,242,242,255) #F2F2F2 grey95
221: (243,196,226,255) #F3C4E2 srgba(243,196,226,1)
522: (243,243,248,255) #F3F3F8 srgba(243,243,248,1)
12: (244,227,245,255) #F4E3F5 srgba(244,227,245,1)
2: (245,228,246,255) #F5E4F6 srgba(245,228,246,1)
54: (245,245,245,255) #F5F5F5 grey96
70: (246,211,233,255) #F6D3E9 srgba(246,211,233,1)
2: (246,246,246,255) #F6F6F6 srgba(246,246,246,1)
104: (249,226,241,255) #F9E2F1 srgba(249,226,241,1)
71: (249,249,249,255) #F9F9F9 srgba(249,249,249,1)
337: (250,241,250,255) #FAF1FA srgba(250,241,250,1)
128: (252,241,248,255) #FCF1F8 srgba(252,241,248,1)
126: (252,252,252,255) #FCFCFC grey99
245132: (255,255,255,255) #FFFFFF white


The main problem was that you did the -opaque before the +opaque and you need to reverse the order.

Your hex colors must have "#xxxxxx" with double quotes on both sides for Windows. It looks below like you did not use double quotes on both sides of your color specifications and you did not tell us your exact modified command. So it is hard to know what you have done wrong.

The -fuzz can be different for each color. Just put -fuzz XX% after each +clone. But with the colors I specified, I was able to get meaningful results for each output image even without the -fuzz, because I used the exact hex values from the histogram and not just similar close values. But note your image features were anti-aliased, so you have similar colors next to the pure colors above. It depends upon whether you want to include those similar colors or not. If you do, then you need to include -fuzz and experiment with the values so as to get what you want from your image without too much excess. If you do not, the leave off the -fuzz.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Convert png to vectors

Post by anthony »

VanGog wrote:Thanks a lot. I don't understand where you find the information that the colors are not precise and the alpha channel present (?).

When I write the command, I got this error:

convert.exe: unrecognized color `'#483D8B'' @ warning/color.c/GetColorCompliance /947.
convert.exe: unrecognized color `'#AB2CB3'' @ warning/color.c/GetColorCompliance /947.
convert.exe: unrecognized color `'#D02090'' @ warning/color.c/GetColorCompliance /947.
convert.exe: unrecognized color `'#CCCCCC'' @ warning/color.c/GetColorCompliance /947.

Do I use the fuzz right?

+clone -fuzz 50% -fill ....

Sorry DOS user not UNIX shell. See
http://www.imagemagick.org/Usage/windows/#dos

Specifically -fuzz 50%% and use double quotes instead of single quotes,
And finnally use '^' on the end of the line rather than '\'. Next line I believe needs to start with a space, but that is normal practice so should not be a problem.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

Re: Convert png to vectors

Post by VanGog »

Once again I checked the verbose report and #483D8B is not there, but the three other are there. Also I looked for alpha channel and not found. Idk how you identify it? What does mean the first number before color specification? e.g.
26222: .... is it number of the color? I see this report for first time, good to know about it.
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

Re: Convert png to vectors

Post by VanGog »

When I sent my last post I did not see answers here, but I did the update.... I see... I was on page one, so I did not see the new replies.

Thanx for your explanation. I never heard about 8 digits for hex color format...
I understand you used the command for verbose, but I did use it and I copied report and I searched in editor for hex colors from the code sent here (now idk from which post I took it), I found 3/4 colors in the report. Also I searched for the "alpha" word and found nothing. So I am surprised, you have different results than me. I also had forgotten about the double percentage in DOS and one again, about double quotes. It was late night and probably not thinking too much.

I run the code and I got not error. Succeed! I have four files, I just set the fuzz to 15, 7 ,10 and 2 %. It's incredible that these files have only few hundreds of kilobytes from the file which has almost 14MB. That's great! So thanx to your efforts.
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

Re: Convert png to vectors

Post by VanGog »

I try to run autotrace independently, but is it possible to specify location for cache drive? Or I must move the program on drive where is enough space?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Convert png to vectors

Post by anthony »

The four separte files are smaller as they only have two colors in each, without any anti-alising edge shades. As such they compress will using a palette.

As for the autotrace command. I have only gone by the manpage for my use. You may need to look at their forums for more information about it.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

Re: Convert png to vectors

Post by VanGog »

OK, I have coverted to esp. I can open it in photoshop but to my bad luck it wants to converts them into raster :-( I thought I could open it as vectors to use it as a layer with curves (shape layer or how is it called).
Post Reply