Introduction to Gdk Pixbuf

The Gdk Pixbuf package is a toolkit for image loading and pixel buffer manipulation. It is used by GTK+ 2 and GTK+ 3 to load and manipulate images. In the past it was distributed as part of GTK+ 2 but it was split off into a separate package in preparation for the change to GTK+ 3.



Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

Package Information

Gdk Pixbuf Dependencies


GLib-2.80.0 (GObject Introspection required for GNOME), libjpeg-turbo-3.0.1, libpng-1.6.43, and shared-mime-info-2.4



Gi-DocGen-2023.3 (to generate documentation), libavif-1.0.4 (runtime dependency, needed for loading AVIF images), libjxl-0.10.2 (runtime dependency, needed for loading JPEG XL images), and webp-pixbuf-loader-0.2.7 (runtime dependency, needed for loading WebP images)

Installation of Gdk Pixbuf

Fix an issue causing the package fail to build with -Dothers=enabled:

sed 's/enabled_loaders_contains/enabled_loaders.contains/' \
    -i tests/

Install Gdk Pixbuf by running the following commands:

mkdir build &&
cd    build &&

meson setup ..            \
      --prefix=/usr       \
      --buildtype=release \
      -Dothers=enabled    \
      --wrap-mode=nofallback &&

If you have Gi-DocGen-2023.3 installed and wish to build the API documentation for this package, issue:

sed "/docs_dir =/s@\$@ / 'gdk-pixbuf-2.42.11'@" -i ../docs/ &&
meson configure -Dgtk_doc=true                                         &&

To test the results, issue: ninja test. The tests make a heavy use of disk.

Now, as the root user:

ninja install


If you installed the package on to your system using a DESTDIR method, an important file was not installed and should be copied and/or generated. Generate it using the following command as the root user:

gdk-pixbuf-query-loaders --update-cache

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

--wrap-mode=nofallback: This switch prevents meson from using subproject fallbacks for any dependency declarations in the build files, stopping it downloading any optional dependency which is not installed on the system.

-Dothers=enabled: Enable the loaders for various image formats, for example BMP and XPM.

-Dman=false: Use this option if you do not want to generate manual pages, or if you do not want to install docutils-0.21.2.


Installed Programs: gdk-pixbuf-csource, gdk-pixbuf-pixdata, gdk-pixbuf-query-loaders, and gdk-pixbuf-thumbnailer
Installed Libraries:
Installed Directories: /usr/{include,lib}/gdk-pixbuf-2.0, /usr/libexec/installed-tests/gdk-pixbuf, /usr/share/installed-tests/gdk-pixbuf, /usr/share/gtk-doc/html/gdk-pixbuf, and /usr/share/thumbnailers

Short Descriptions


is a small utility that generates C code containing images, used for compiling images directly into programs


is a tool used to convert GdkPixbuf to GdkPixdata


collects information about loadable modules for Gdk Pixbuf and writes it to the default cache file location, or to stdout


creates thumbnails of pictures for use in other applications

contains functions used to load and render images