Creating Gdk::Pixbuf from string data



Hi guys,

I write you again 'cause the reference is not so clear for me at this point...

It's clear that for to create a reference pointer to a Gdk::Pixbuf
using a file data could be done like as follows,

Glib::RefPtr<Gdk::Pixbuf> refPixbuf = Gdk::Pixbuf::create_from_file (filename);

But once here,
1) Is it possible to store the image data to a string var? Is the
method to_string() conceived to do so ?

std::string strPixbuf = refPixbuf->to_string();

2) If the step 1 is well reasoned... Is it possible to create a
reference pointer to a new Gdk::Pixbuf object using the last strPixbuf
data ??

Glus


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