Porting applications from Imlib to gdk-pixbuf

Table of Contents
Differences between Imlib and gdk-pixbuf
Converting Applications to gdk-pixbuf

This appendix contains the basic steps needed to port an application that uses the Imlib library to use gdk-pixbuf instead.

Note: This appendix refers to version 1 of the Imlib library; this discussion is not relevant to Imlib 2. Also, we discuss the gdk_imlib API instead of the Xlib-based API.


Prior to the GNOME 1.2 platform, the Imlib library was the preferred way of loading and rendering images in GNOME applications. Unfortunately, Imlib has important design limitations that make it hard to write efficient and highly modular applications.

The gdk-pixbuf library was designed as a solution to Imlib's shortcomings. It provides a simple, orthogonal API and convenience functions for the most common operations. In addition, it supports full transparency information for images, or alpha channel. More importantly, it has well-defined semantics for memory management through the use of reference counting; Imlib has an intractably complex memory management mechanism and cache that will make your head spin.