You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I initialized 2048 paths, with half of them filled with solid colors, and the other half filled with gradient colors (including linear and radial gradient). I optimized the SVG using L2 loss. When I open the final SVG with a browser like Edge, it appears to be full of color patches as below.
However, the final PNG rendering result is great.
I use render_svg.py in diffvg/apps folder to convert SVG to PNG and I get the same result: SVG is poor but PNG is great.
What is the problem? I hope someone can help me.
The text was updated successfully, but these errors were encountered:
I found that the problem came from the color sampling process of forward rendering. The parameter pt passed in this function is the coordinate of the point in the image space (canvas_width*canvas_height), but in fact it should be the relative position of the point in the path, similar to begin and end in linearGradient.
I found that the problem came from the color sampling process of forward rendering. The parameter pt passed in this function is the coordinate of the point in the image space (canvas_width*canvas_height), but in fact it should be the relative position of the point in the path, similar to begin and end in linearGradient.
Great! Can you tell me how to solve the color sampling problem? I am not familiar with this.
I initialized 2048 paths, with half of them filled with solid colors, and the other half filled with gradient colors (including linear and radial gradient). I optimized the SVG using L2 loss. When I open the final SVG with a browser like Edge, it appears to be full of color patches as below.
However, the final PNG rendering result is great.
I use render_svg.py in diffvg/apps folder to convert SVG to PNG and I get the same result: SVG is poor but PNG is great.
What is the problem? I hope someone can help me.
The text was updated successfully, but these errors were encountered: