Re: Creating Gdk::Pixbuf from string data
- From: Glus Xof <gtglus gmail com>
- To: Kjell Ahlstedt <kjell ahlstedt bredband net>
- Cc: gtkmm-list gnome org
- Subject: Re: Creating Gdk::Pixbuf from string data
- Date: Tue, 15 Jan 2013 12:11:05 +0100
2013/1/15 Kjell Ahlstedt <kjell ahlstedt bredband net>:
> Unfortunately, it won't work. When I tested to_string() on a Gdk::Pixbuf, it
> returned an empty string.
Yes, I see. For me, it returns an empty string also...
> I agree that the documentation is unclear. I checked the source code of the
> underlying C classes, GdkPixbuf and GIcon.
> GdkPixbuf implements the GIcon interface, but it only implements part of the
> interface. It does not implement the virtual functions to_tokens() and
> from_tokens(), and therefore a GdkPixbuf can't be serialized to a string.
> Nor can it be created from a string.
>
> Kjell
Thanks a lot !... but in this case, must we wait ??
Anyone could say anymore ??
Should it be necessary to open a new bug to request this feature ??
Glus
> 2013-01-14 17:20, Glus Xof skrev:
>
>> 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]