lehitoskin / ivy

Ivy, the Taggable Image Viewer
GNU General Public License v3.0
16 stars 3 forks source link

SVG support #47

Closed lehitoskin closed 8 years ago

lehitoskin commented 8 years ago

Test adding SVG support (via rsvg package).

lehitoskin commented 8 years ago

The rsvg package is a wrapper for librsvg - would need to package it for Windows/OS X?

@IonoclastBrigham Does OS X have librsvg available in mac ports?

IonoclastBrigham commented 8 years ago

Do we need to be able to link to a system package for distribution purposes? Or just convenience? I'd assume it can be built on Mac, without having done any research. But I'm out of town until Tuesday and doesn't being my laptop.

On Sep 9, 2016 3:17 PM, "Lehi Toskin" notifications@github.com wrote:

The rsvg package is a wrapper for librsvg - would need to package it for Windows/OS X?

@IonoclastBrigham https://github.com/IonoclastBrigham Does OS X have librsvg available in mac ports?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lehitoskin/ivy/issues/47#issuecomment-246056148, or mute the thread https://github.com/notifications/unsubscribe-auth/AHFAlPI0QQ40zPWgqE-aIuzV6iyMNR57ks5qodr5gaJpZM4J3d2A .

lehitoskin commented 8 years ago

We can specify any path for a library. For a distributable package, we can have it search for a local .dylib (or .dll), for ease of use. This might be easiest for Windows, instead of having the user compile/install librsvg, we just supply one ourselves.

lehitoskin commented 8 years ago

Building librsvg with mingw-64 fails at config.sub. Had to download a new version of config.guess that recognizes mingw-64 as a build platform, but doing the same for config.sub still complains it doesn't recognize mingw-64. Maybe I should try with cygwin instead?

Edit: I'll try copying those particular files from my Gentoo system and see how it goes first.

lehitoskin commented 8 years ago

Update (for posterity):

I have successfully compiled librsvg.dll on Windows, yet the Racket FFI doesn't seem to want to recognize the DLL - it does recognize other libraries, even a small shared library I wrote and compiled. That being said, if I link the small library against librsvg, it is no longer recognized by the FFI, just like for librsvg.

lehitoskin commented 8 years ago

Added in a0d62ae3212d19918ebfcb98ba19a00b95681054

I ended up using a pre-compiled 32-bit package the nice people at the Racket mailing list found.

IonoclastBrigham commented 8 years ago

Found some weird rendering issues. Side by side: left is in Ivy, right is in Mac QuickLook.

screen shot 2016-10-02 at 10 00 13 pm

Original file found via google image search at http://www.awesomeinc.com/

lehitoskin commented 8 years ago

Bizarro. I shall investigate

lehitoskin commented 8 years ago

2016-10-02-221920_1245x628_scrot

lehitoskin commented 8 years ago

This appears to be a bug in librsvg, since browsers and inkscape can render it just fine while GNOME-based applications (i.e. those that use librsvg) have the problem.

lehitoskin commented 8 years ago

Just made a new issue for this specifically.