[solved] Issue with GTK-2 and SVG images

Please post any bugs you have found
Post Reply
Message
Author
ljfr
Posts: 176
Joined: Thu 23 Apr 2009, 08:35

[solved] Issue with GTK-2 and SVG images

#1 Post by ljfr »

Hi, I cannot open SVG images with few GTK-2 based applications starting from a vanilla 4.30, 2 examples:
-with gpicview-0.1.9 from the official repo, try to open a svg image, I get:

Code: Select all

Couldn't recognize the image file format for file 'book.svg'
-If you compile gcompris-8.4.12, you get an error message "Could't find or load ... strategy.svg" on the first panel,which seems to come from this line 85 in gameutil.c:
pixmap = gdk_pixbuf_new_from_file(filename,NULL);
where it fails to load the svg images, this was also experienced by pccampbell87 on puppy 4.20 on this post:
http://www.murga-linux.com/puppy/viewto ... 0&start=15

I am starting from a vanilla 4.3, so all those libraries are installed: libcairo2, librsvg2, ... the module /usr/lib/gtk-2.0/2.10.0/loaders/svg_loader.so, ...

A way to solve this problem is to install a slackware 12.2 version of GTK-2 -using gslapt:
gtk+2-2.12.12-i486-1.tgz
...but I would rather use a puppy officially package GTK-2 version, can
someone check that it is really a gtk-2 issue?

regards,
Last edited by ljfr on Tue 13 Oct 2009, 15:00, edited 1 time in total.

ljfr
Posts: 176
Joined: Thu 23 Apr 2009, 08:35

Compilation options used for GTK-2

#2 Post by ljfr »

Hi,

where can I find compilations option used for this package:
gtk+-2.14.7-pup4

regards,

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#3 Post by BarryK »

gtk:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu --with-xinput=yes --enable-debug=minimum

SVG support is not provided by the GTK package, it is provided by 'librsvg'.

To configure librsvg:

# ln -s seamonkey-config /usr/bin/mozilla-config
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu --enable-pixbuf-loader --enable-mozilla-plugin --with-svgz

You may find that if you compile 'libcroco', an optional dependency of librsvg, that may give wider SVG support.
[url]https://bkhome.org/news/[/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

Subsequent to that post Barry's posted about this to his blog, which you might be interested in http://www.puppylinux.com/blog
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

ljfr
Posts: 176
Joined: Thu 23 Apr 2009, 08:35

Update of shared-mime-info

#5 Post by ljfr »

Hi, thanks for your guidelines,

it seems we just have to update shared-mime-info, I tried the last version 0.70, and it solved the issue (tested with viewnor and gqview),see:
http://library.gnome.org/devel/gtk/unst ... lding.html
http://www.freedesktop.org/wiki/Softwar ... -mime-info

If you want to investigate further, some clues:

on gtk 2.14, gdk-pixbuf changes
* Support loading OS X icns format
* Support loading JPEG 2000 images
* Support loading and saving to GIO streams
* Use GIO for mime information

Code: Select all

Release notes for 2.14
======================
...

* gdk-pixbuf will use GIO for mime type detection if possible. For
  this to work, shared-mime-info needs to be installed and XDG_DATA_DIRS
  set accordingly at configure time. Otherwise, gdk-pixbuf falls
  back to its built-in sniffing implementation.
regards,

Loopback to BarryK sum-up:
http://puppylinux.com/blog/?viewDetailed=01166

Post Reply