-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Plugin 'convertTransform' corrupts image #1810
Comments
The problem is ultimately rounding. The We make the assumption that there's no need to add more precision than there already is. So since it started with 2 decimal places, we assume that we can round to two decimal places at the end. We should make this do one of the following:
There may be edge cases where this still screws up the SVG, but this should certainly improve the situation for now. |
I created additional branch Thus enabling of plugin |
I'd actually consider this a bug based on my findings above. Rather than update the documentation, I intend to resolve the precision issue. You're correct, updating the |
I also get a corrupted image when using 'convertTransform'. I upload my files here to give you an other example of corruption:
|
Step to reproduce:
npm i
npm run build
serve
indist
directoryserve
excludedSvgoPluginsBecauseItCorruptImages
inwebpack.config.js
npm run build
serve
indist
directoryActual result:
Image was corrupted
Expected result:
Image on second view must be equal image on first view
Svgo version:
^3.0.2
NodeJS version:
v18.13.0
OS version:
Ubuntu 23.04
Lunar LobsterThe text was updated successfully, but these errors were encountered: