I wonder how to fix the size of a png when converting svg to png with Rsvg.jl
Currently I am using the demo code
using Rsvg
using Cairo
filename_in = "a4.svg"
filename_out = "a4.png"
r = Rsvg.handle_new_from_file(filename_in);
d = Rsvg.handle_get_dimensions(r);
cs = Cairo.CairoImageSurface(d.width,d.height,Cairo.FORMAT_ARGB32);
c = Cairo.CairoContext(cs);
Rsvg.handle_render_cairo(c,r);
Cairo.write_to_png(cs,filename_out);
I played around with set_default_dpi(dpi::Float64)
and handle_set_dpi(handle::RsvgHandle, dpi::Float64)
but without success.
Can anybody help?