-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SVG does not render embedded image with a dimension greater than 10000 pixels #4309
Comments
I don't know what this refers to, please can you provide more details.
Please can you provide complete information that allows someone else to reproduce. This will include complete, standalone code and a sample image. |
When a certain Base64 is too large, the image generated by sharp will be missing this layer. code like:
|
When size of an image in an SVG is too large, version 0.33.5 of Sharp will fail (version 0.33.4 is OK) to render that image during the conversion process. @lovell demo code(the path should change to your local path) // Example function to convert SVG buffer to PNG
} catch (err) { // Example usage
} catch (err) { |
This is probably related to the upstream librsvg issue at https://gitlab.gnome.org/GNOME/librsvg/-/issues/1093 |
The latest release of librsvg was 9 years ago. |
There's a new release of librsvg every month or so, please see https://gitlab.gnome.org/GNOME/librsvg/-/tags The prebuilt binaries provided by sharp always use the most recent version of librsvg available at that point in time. You can view the version you are using via Please subscribe to the upstream issue at https://gitlab.gnome.org/GNOME/librsvg/-/issues/1093 for updates about this specific problem. |
"After upgrading from version 0.33.4 to 0.33.5 of the sharp library, the memory leak issue has been resolved, but there are rendering failures with high-resolution images."
sharp(imgBuffer, {
unlimited: true
})
.toFormat(type)
.withMetadata({ density: dpi, icc: colourspace } as any)
.toBuffer((err, data) => {
The text was updated successfully, but these errors were encountered: