放一下 簡單的code 作個備份

#include
#include
#include

int main(int argc, char**argv)
{
GtkWidget *window;

GtkWidget *frame;

GdkPixbuf *pixbuf;

GtkWidget *img;

gtk_init(&argc, &argv);

window=gtk_window_new(GTK_WINDOW_TOPLEVEL);

pixbuf = NULL;

pixbuf = gdk_pixbuf_new_from_file(“test00.jpg”,GError);

img = gtk_image_new_from_pixbuf(pixbuf);

gtk_container_add(GTK_CONTAINER(window),img);

gtk_widget_show_all(window);

gtk_main();

return 0;
}

  1. 「Anderson」的個人頭像
    Anderson

    </p>
    應該要直接用 GdkPixbuf

  2. 「Anderson」的個人頭像
    Anderson

    應該要直接用 GdkPixbuf

  3. 「tttt」的個人頭像
    tttt

    應該要直接用 GdkPixbuf

發佈留言

Quote of the week

"People ask me what I do in the winter when there's no baseball. I'll tell you what I do. I stare out the window and wait for spring."

~ Rogers Hornsby

Designed with WordPress