This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Read SVG with small viewbox, resize, and save to raster

Hey,

I know this topic is "covered" in the docs but I have come across a strange use case.

I have SVG's with a viewBox that is small. As an example say 200 x 200. (viewBox="0 0 200 200")

If I were to rasterize then resize those SVG's to 500 x 500 it (obviously) becomes extremely pixelated.

My question is, can I resize it while it is still a vector THEN export that resized vector to a raster format (in theory pixelation should be minimal since the resize occurred while it was a vector).

Thanks
Hi,

Unfortunately, this is a known issue. There is a problem in the internal combiner which rasterizes vector data without scaling before blending.

As a workaround, you can try to use the GraphicsContainer.Scale method, but it doesn't work well with the pen's width. I suppose we'll add a similar method with a single argument, which will fit your needs.

Sorry for the inconvenience.