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

Trimmed images for paths with gradients when path is greater than 800x600 px #22

Open
jrdiaz opened this issue Sep 10, 2019 · 0 comments

Comments

@jrdiaz
Copy link

jrdiaz commented Sep 10, 2019

Hello, because a problem with canvg related to paths with gradients greater than 800x600 pixels (Canvg issue), when using img2svg to create images from those SVG's in a nodejs environment, the resulting images contains trimmed areas like this one

canvg-gradient-testcase

A workarround for this issue that I've used is to include clientWidth and clientHeight values in the options on instantiation and inject that information in a parentNode object at Workarround place

	if (options && options.clientWidth && options.clientHeight) {
		canvas.parentNode = {
			clientWidth : parseFloat(options.clientWidth),
			clientHeight : parseFloat(options.clientHeight)
		};
	}

This is a working workarround for the real issue but not a real fix for the problem.

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

No branches or pull requests

1 participant