Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the png is incorrect #81

Open
luqinghui opened this issue May 15, 2020 · 2 comments
Open

the png is incorrect #81

luqinghui opened this issue May 15, 2020 · 2 comments

Comments

@luqinghui
Copy link

luqinghui commented May 15, 2020

I download some svg from iconfont, but the generated png is wrong.

the generated json:

{
  "s1": {
    "height": 64,
    "pixelRatio": 2,
    "width": 64,
    "x": 0,
    "y": 0
  },
  "s2": {
    "height": 64,
    "pixelRatio": 2,
    "width": 64,
    "x": 64,
    "y": 0
  },
  "s3": {
    "height": 64,
    "pixelRatio": 2,
    "width": 64,
    "x": 0,
    "y": 64
  },
  "s4": {
    "height": 64,
    "pixelRatio": 2,
    "width": 64,
    "x": 64,
    "y": 64
  }
}

the result should be:

but the generated png:

the svg file1:

<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1589531854168" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2487" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M513.8 247.2C367.8 247.2 249 366 249 512s118.8 264.8 264.8 264.8S778.6 658 778.6 512 659.8 247.2 513.8 247.2z m0 484.6C392.6 731.8 294 633.2 294 512c0-121.2 98.6-219.8 219.8-219.8S733.6 390.8 733.6 512c0 121.2-98.6 219.8-219.8 219.8z" fill="#333333" p-id="2488"></path><path d="M908 512c0-3.3-0.8-6.4-2.1-9.3-2.2-99.3-41.9-196-115.8-269.8C674.6 117.3 503 84.8 353.2 150.2c-11.4 5-16.6 18.2-11.6 29.6 5 11.4 18.2 16.6 29.6 11.6 132.8-58 284.8-29.2 387.2 73.3s131.2 254.4 73.3 387.2c-5 11.4 0.2 24.6 11.6 29.6 2.9 1.3 6 1.9 9 1.9 8.7 0 16.9-5 20.6-13.5 21-48.2 31.8-98.6 33.1-148.7 1.2-2.8 2-5.9 2-9.2z" fill="#27A27D" p-id="2489"></path><path d="M651 832.6c-132.8 57.9-284.8 29.1-387.2-73.3-102.4-102.5-131.2-254.4-73.3-387.2 5-11.4-0.2-24.6-11.6-29.6s-24.7 0.2-29.6 11.6c-65.4 149.8-32.9 321.4 82.7 437 76 76 176.1 116.1 278.4 116.1 53.3 0 107.3-10.9 158.7-33.3 11.4-5 16.6-18.2 11.6-29.6-5-11.5-18.3-16.7-29.7-11.7z" fill="#333333" p-id="2490"></path><path d="M263.8 264.7c8.8-8.8 8.8-23 0-31.8s-23-8.8-31.8 0-8.8 23 0 31.8 23 8.8 31.8 0z" fill="#27A27D" p-id="2491"></path><path d="M758.4 759.3c-8.8 8.8-8.8 23 0 31.8s23 8.8 31.8 0 8.8-23 0-31.8-23.1-8.8-31.8 0z" fill="#333333" p-id="2492"></path></svg>

the svg file2:

<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1589531898642" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2643" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M659.5 478.2c18.6 0 33.8 15.1 33.8 33.8 0 18.6-15.1 33.7-33.8 33.7-18.7 0-33.8-15.1-33.8-33.7 0-18.7 15.1-33.8 33.8-33.8M512 478.2c18.6 0 33.8 15.1 33.8 33.8 0 18.6-15.1 33.7-33.8 33.7-18.7 0-33.8-15.1-33.8-33.7 0-18.7 15.1-33.8 33.8-33.8M364.5 478.2c18.7 0 33.8 15.1 33.8 33.8 0 18.6-15.1 33.7-33.8 33.7-18.6 0-33.8-15.1-33.8-33.7 0.1-18.7 15.2-33.8 33.8-33.8" fill="#27A27D" p-id="2644"></path><path d="M129.5 827V521.2c0-214.3 170.1-390 379.2-391.7 102.8-0.3 200.6 38.9 273.7 112s112.9 170.3 112 273.8C892.7 724.4 717 894.5 502.7 894.5H197c-37.2 0-67.5-30.3-67.5-67.5z m379.6-652.5C324.6 176 174.5 331.6 174.5 521.2V827c0 12.4 10.1 22.5 22.5 22.5h305.7c189.6 0 345.2-150.1 346.7-334.6 0.8-91.3-34.3-177.1-98.9-241.6-63.8-63.8-148.4-98.8-238.6-98.8h-2.8z" fill="#333333" p-id="2645"></path></svg>

the svg file3:

<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1589531915090" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2766" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M776.2 894.5H247.8c-30.9 0-60.8-12.9-82-35.5-21.2-22.5-32.2-53.2-30.3-84l33.8-540c3.7-59.2 53-105.5 112.3-105.5h460.9c59.3 0 108.6 46.3 112.3 105.5l33.8 540c1.9 30.9-9.1 61.5-30.3 84-21.3 22.6-51.2 35.5-82.1 35.5z m-494.7-720c-35.6 0-65.1 27.8-67.4 63.3l-33.8 540c-1.2 18.8 5.3 36.7 18.2 50.4 12.9 13.7 30.4 21.3 49.2 21.3h528.4c18.8 0 36.3-7.6 49.2-21.3 12.9-13.7 19.3-31.6 18.2-50.4l-33.8-540c-2.2-35.5-31.8-63.3-67.4-63.3H281.5z" fill="#333333" p-id="2767"></path><path d="M512 504.7c-114.4 0-207.5-93.1-207.5-207.5 0-12.4 10.1-22.5 22.5-22.5s22.5 10.1 22.5 22.5c0 89.6 72.9 162.5 162.5 162.5s162.5-72.9 162.5-162.5c0-12.4 10.1-22.5 22.5-22.5s22.5 10.1 22.5 22.5c0 114.5-93.1 207.5-207.5 207.5z" fill="#27A27D" p-id="2768"></path></svg>

the svg file4:

<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1589531925100" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2889" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M582.6 917H253.3c-37.2 0-67.5-30.3-67.5-67.5v-675c0-37.2 30.3-67.5 67.5-67.5h517.5c37.2 0 67.5 30.3 67.5 67.5v486.8c0 141-114.7 255.7-255.7 255.7zM253.3 152c-12.4 0-22.5 10.1-22.5 22.5v675c0 12.4 10.1 22.5 22.5 22.5h329.3c116.2 0 210.7-94.5 210.7-210.7V174.5c0-12.4-10.1-22.5-22.5-22.5H253.3z" fill="#333333" p-id="2890"></path><path d="M676.6 356.8H347.4c-12.4 0-22.5-10.1-22.5-22.5s10.1-22.5 22.5-22.5h329.1c12.4 0 22.5 10.1 22.5 22.5s-10 22.5-22.4 22.5zM512 491.8H347.4c-12.4 0-22.5-10.1-22.5-22.5s10.1-22.5 22.5-22.5H512c12.4 0 22.5 10.1 22.5 22.5s-10.1 22.5-22.5 22.5z" fill="#27A27D" p-id="2891"></path></svg>
@jseppi
Copy link
Contributor

jseppi commented May 15, 2020

@luqinghui It looks like your generated png image didn't make it into the issue.
Could you add it and expound on how it is wrong?

@luqinghui
Copy link
Author

@jseppi sorry😂, i upload the image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants