Re: [gtkmm] (no subject)



Paulo Pinto <pjmlp progtools org> writes:

> If I'm not mistaken you can read SVG images but I'm not aware of
> capabilities to read other vector formats. Someone correct me if
> I'm wrong.

GTK+ installs binary loaders, e.g.:

  ole:~$ ls /usr/lib/gtk-2.0/2.4.0/loaders
  libpixbufloader-ani.la   libpixbufloader-pcx.la  libpixbufloader-tiff.la
  libpixbufloader-ani.so   libpixbufloader-pcx.so  libpixbufloader-tiff.so
  libpixbufloader-bmp.la   libpixbufloader-png.la  libpixbufloader-wbmp.la
  libpixbufloader-bmp.so   libpixbufloader-png.so  libpixbufloader-wbmp.so
  libpixbufloader-gif.la   libpixbufloader-pnm.la  libpixbufloader-xbm.la
  libpixbufloader-gif.so   libpixbufloader-pnm.so  libpixbufloader-xbm.so
  libpixbufloader-ico.la   libpixbufloader-ras.la  libpixbufloader-xpm.la
  libpixbufloader-ico.so   libpixbufloader-ras.so  libpixbufloader-xpm.so
  libpixbufloader-jpeg.la  libpixbufloader-tga.la  svg_loader.so
  libpixbufloader-jpeg.so  libpixbufloader-tga.so

You can ask what MIME types they support with
'gdk-pixbuf-query-loaders'. So if you want another format, I think you
have two options: either write a back-end loader for GTK+ (which
anyone can then use) or write a custom one which simply converts the
vector format into the Gdk::Pixbuf format (four bytes pr. pixel,
RGBA).

Or you could always use the 'convert' program from ImageMagick to
convert the image (perhaps ImageMagick even provides an in-program
representation you can use).

-- 
Ole Laursen
http://www.cs.aau.dk/~olau/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]