I've got images as IplImage that I want to display in a small Gtkmm application. How can I convert them to something Gtk can display?
Solved:
IplImage* image;
cvCvtColor(image, image, CV_BGR2RGB);
Glib::RefPtr<Gdk::Pixbuf> pixbuf = Gdk::Pixbuf::create_from_data(
(guint8*)image->imageData,
Gdk::COLORSPACE_RGB,
false,
image->depth,
image->width,
image->height,
image->widthStep);
Gtk::Image gtk_img;
gtk_img.set(pixbuf);