compiling against gdk-pixbuf

Hello everybody, I'm trying to compile this little test program, that use
gdk-pixbuf; but from the command line, but I can't get it compiled.

Here is the program:

#include <gdk-pixbuf/gdk-pixbuf.h>

main (int argc, char **argv)
        GdkPixbuf *pixbuf;
        GdkColorspace colorSpace;
        int channels;
        gboolean alpha;
        int bits_per_sample;
        int bits_per_pixel;
        int width;
        int height;
        int rowstride;

        if (argc > 2) {
                pixbuf = gdk_pixbuf_new_from_file (argv[1]);
                if (!pixbuf) {
                        printf (Ërror, can't load image\n");
                } else {
                        colorSpace = gdk_pixbuf_get_colorspace (pixbuf);
                        printf ("ColorSp        ace: %i\n", colorSpace);
        return 0;

any suggestion?


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