Re: hello, Mr. Ronald Bultje



hi guo
 in gtk+2.0 u can show image without pixbuf.
 but for scale and other thing you need use
 pixbuf.

 vahid
---------------------------------------------

#include <gtk/gtk.h>

gint main (gint argc, gchar * argv[])
{
  GtkWidget *image;
  GtkWidget *win;
 
  gtk_init (&argc, &argv);
  win = gtk_window_new (GTK_WINDOW_TOPLEVEL);

  gtk_signal_connect (GTK_OBJECT (win), "destroy",  
gtk_main_quit, NULL);

  image = gtk_image_new_from_file
("/home/vahid/fig/747.tiff");//some picture jpeg,
tiff, gif or even animated gif !
 
  gtk_container_add (GTK_CONTAINER (win), image);
  gtk_widget_show_all (win);

  gtk_main ();
  return 0;
}
--- guo li <liguo503 hotmail com> wrote:
> 
> 
> Hi, Mr Ronald Bultje,
>    I am now having  a headache with displaying a
> jpeg picture using GTK,
> can you please send me the code you mentioned in the
> following:
> your help will be greatly appreciated.
> 
> regards,
> 
> sincerely
> Guo Li
> 
> -------------------------------------------
> Hi Zou,
> 
> >Where can I find any samples about using jpeg in
> gtk?
> >Who can give me a hint ? Thanks
> 
> use gdk-pixbuf. Don't use lib-jpeg, gdk-pixbuf was
> created to do this job
> for you. Documentation is probably available
> somewhere at gnome.org
> I can also give some sample code if you want (I use
> gdk-pixbuf for showing
> jpeg images too).
> 
> Ronald Bultje


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/



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