-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Support all resvg options #12
base: dev
Are you sure you want to change the base?
Conversation
pytest.param( | ||
"resources/examples/svg/octocat.svg", | ||
resvg_py.SVGOptions( | ||
shape_rendering=resvg_py.ShapeRendering.GeometricPrecision, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jboarman Do you have handy examples of input/output pairs that might be worth testing here?
There's a bunch of examples in the upstream Rust repo, but it's probably overkill to check all of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until we implement the benchmark in issue #10, I think we can make use of a few random selections from the upstream repo that you identified in your comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I'll try to port a few of the test files to validate the options.
@jboarman You added this to the readme: from resvg import Options, render_from_file
options = Options()
options.width = 300
options.height = 200
options.background = "#FFAABB"
options.dpi = 96.0
options.languages = ["en", "fr", "es"]
options.shape_rendering = "optimizeSpeed"
options.text_rendering = "optimizeLegibility"
options.image_rendering = "optimizeQuality"
output_image = render_from_file("input.svg", options) is that the API you expect, with an end-to-end |
No description provided.