I wanna display a image from the internet
how can I put it?
I wanna display a image from the internet how can I put it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
GTK+ doesn’t read files from the Internet, you’re going to have to do that part yourself.
Once you have the pixel data in memory in a known format (such as JPEG or PNG), call
gdk_pixbuf_new_from_stream()(after setting up an in-memory stream) to load it.Then hand that pixbuf to
gtk_image_new_from_pixbuf(), add your GtkImage to a GtkWindow, callgtk_widget_show_all()on the window, and you should be done.