Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Image Conversion: SVG to PNG

by syphilis (Chancellor)
on Apr 23, 2017 at 09:44 UTC ( #1188667=note: print w/replies, xml ) Need Help??


in reply to Image Conversion: SVG to PNG

Has anyone successfully installed Image::LibRSVG on an MSWin platform?

I just have - and it builds ok, and passes its 27 tests.

Native Win32 LibRSVG libraries (both 32-bit and 64-bit) are available via MSYS2 pacman - and these are what I used.
During the compilation phase there are a number of warnings about the presence of deprecated symbols (in LibRSVG.xs) such as g_type_init, rsvg_pixbuf_from_file_at_size, rsvg_pixbuf_from_file_at_zoom, rsvg_pixbuf_from_file_at_zoom_with_max, and maybe some others as well.
Apart from that, the build proceeds fine, but the module initially wouldn't load for me because of incompatibilities between the libstdc++-6.dll that gets loaded (by perl at startup) and the libstdc++-6.dll that glib requires (which is located inside MSYS2 - and won't get loaded because libstdc++-6.dll has already been loaded).

The MSYS2 glib libraries are built using (I think) mingw64 ports of gcc-5.4.0. If your Windows perl was built using gcc-5.4.0 (and mine wasn't) then it will probably all work without any need to do the hurdling (with two twists and pyke) that I need to do.
Basically - I just rename the dlls to something unique, and alter the glib dlls to load the renamed versions. (It's the only way I know of getting around the problem.)

If you want a ppm package just let me know and I'll upload one - or, if you need help building Image::LibRSVG from source on Windows, just sing out.
(I'll probably create and upload PPM packages for this module anyway, now that I've built it.)

Update: PPM packages for Image-LibRSVG-0.07 have now been added to sisyphusion repo.
Well ... that filled in the evening quite effectively.
(If anyone testing this PPM package finds a problem, please let me know.)

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Image Conversion: SVG to PNG
by kcott (Chancellor) on Apr 23, 2017 at 18:01 UTC

    G'day Rob,

    Many thanks for testing the Image::LibRSVG installation and providing such detailed feedback.

    I'll wait for other replies but, in the absence of any better ideas, and given the PNG files Image::LibRSVG produces are well under half the size of those from convert, I'll probably go with this module.

    Thanks also for offers of help with a PPM package and Windows build. My current, day-to-day OS is Mac OS X — which is where I'll do the initial development — but, when written, the code will also be used on a Windows platform: that's some way off at this stage.

    — Ken

      Thanks also for offers of help with a PPM package and Windows build

      A little extra FYI:
      I ran a "ppm install" of Image-LibRSVG on "strawberry-perl-ld 5.24.0.1 #1 Wed May 11 11:19:43 2016 x64" (MSWin32-x64-multi-thread-ld) and ran your one-liners on the first svg file that came to hand.
      The generated png files look fine to me.

      Cheers,
      Rob

        ++ Again, many thanks for the effort you've put in on this: it is much appreciated.

        The only Windows box I currently have available is an old laptop, which sits in its bag for most of the year, and only sees the light of day every few months or so: I'll probably end up using this for the initial (deployment) tests. It's running Strawberry Perl (v5.12), so good to know Image::LibRSVG works with that. And, although the laptop is now fairly ancient, it's probably about a similar vintage to Image::LibRSVG, so I don't foresee any issues in that area.

        — Ken

Re^2: Image Conversion: SVG to PNG
by Anonymous Monk on Apr 23, 2017 at 09:48 UTC

    If you want a ppm package just let me know and I'll upload one - or, if you need help building Image::LibRSVG from source on Windows, just sing out. (I'll probably create and upload PPM packages for this module anyway, now that I've built it.)

    But but but http://www.sisyphusion.tk/ppm/Image-Magick.ppd

    :P

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1188667]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2017-09-20 23:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (241 votes). Check out past polls.

    Notices?