Re: Images



If you just want to load and display an image, then I think Gtk::Image
is what you want as opposed to a Pixbuf.  Just add the loaded
Gtk::Image (which seems to work, if I interpret your mail correctly)
then to, say, your window's VBox and all should be well.

If that doesn't work, maybe some code of yours will help to tell why.

Cheers,

Andi.

P.S. Recently I discussed on this list a problem related to converting
Pixbuf and Gtk::Image to each other ("Extract image from Gtk::Image").
You may want to go and look for this thread.


On Sat, Jun 06, 2009 at 08:01:31PM -0500, sgayda2 illinois edu wrote:
> I am kinda new to gtkmm and i need a little help.
> 
> I am trying to load an image and display it. I tried using the image class and then giving it a filename, and it starts up but the image does not get displayed. I tried with an incorrect filename and it failed as expected so it wasnt the file. I also tried it by using the create_from_file and that works. It creates pixbuf of the correct size but when i pass it on to the image the image still has a height of 1 even though the pixbuf says 48.
> Can someone help me out in understanding why the image is not being displayed and how to to actually do it correctly?
> 
> -Stoyan
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list

-- 
Andreas Bauer,
baueran rsise anu edu au,
http://baueran.multics.org/


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