-
-
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
Include support for SVG embedded base64 images in pre-compiled binaries #601
Comments
For the record, when installing Sharp v0.16.1 with VIPS already installed, I receive the following error:
An issue which might in part be related to this one - #588 |
Hello. do you happen to have a copy of what the command My best guess would be that you were using an installation of vips with *magick as a dependency. If so, this library might have been used to decode the SVG format instead of the now-preferred librsvg. Are you able to provide the SVG at fault, or at least a similar example that fails in a similar manner? |
Here's an example of the SVG I'm using. As you can see, it's pretty simple, so I suspect this is an OSX installation problem which might well be related to - #602 - as well as - #588 On Windows, the conversion process works, though I do suspect a problem with embeddded JPG's:
|
As for the output of
|
Thank you. I also found a good example of embedded base64 PNG and JPEG images in the W3C's test suite - see https://dev.w3.org/SVG/profiles/1.2T/test/svg/struct-image-04-t.svg As you've discovered, using a custom installation of libvips with *magick support works. There's a security gotcha here as *magick will probably go and fetch remote URLs, local files and all sorts of other things, so make sure you trust the image sources. librsvg is much more conservative in this regard. For embedded images to work, librsvg has to be compiled with support for gdk-pixbuf, which has to be compiled with support for whichever image formats are required. For OS X, my best guess is the pre-compiled OS X tarball is missing the gdk-pixbuf loaders. For Linux, the pre-compiled binaries currently exclude JPEG and PNG. I'll look at including/enabling these for the next major release. |
v0.17.0 now available with pre-compiled binaries that include everything required for embedded base64 images in SVG files. |
I've just upgraded to version 0.16.1 on OSX, as I was keen to test out the smart cropping functionality.
To do so, I had to uninstall the version of VIPS I found here - http://www.vips.ecs.soton.ac.uk/index.php?title=Build_on_OS_X - The installation now works, but unfortunately embedded Base64 images in .svg files will not render on output to .png (and on output to .jpeg, the area containing the Base64 image renders a black square).
Interestingly, before upgrading, and while I had the Homebrew build of VIPS installed, Base64 images did work...
Any ideas as to what might have changed, and how I can fix it to render Base64 images in .svg's again?
The text was updated successfully, but these errors were encountered: