loading a displaying an image in GTK 1.2.

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

 



I am trying to us imlib with GTK.1.2 to load and display a jpeg. I have to stick with 1.2 since I am using it in an embedded enviroment and can not move to 2.0
I am not getting any errors when I run my code but also no image.

Here is the code

void Display::OpenDisplay(void){   
    //lkyb=this;

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_default_size((GtkWindow*)window,640,240);   
    gtk_widget_show ((GtkWidget *)window);
    OpenSplash();
    gdk_flush();

}

void Display::OpenSplash(void){
    GdkPixmap    *p;
    im=gdk_imlib_load_image("/home/david/images/beach.jpg");
    gdk_imlib_render(im,640,240);
    p=gdk_imlib_move_image(im);
    gdk_draw_pixmap(window->window,window->style->fg_gc[GTK_WIDGET_STATE (window)],
                  p,
                  640,240,
                  640,240,
                  640, 240);
}

Any suggestions?
The documention for gdk_imlib is sparse to say the least. I would be more than willing to use another library if you know of that works with GTK 1.2
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux