Changes

Jump to navigation Jump to search
Line 216: Line 216:  
=== Save the GdkPixbuf into a buffer ===
 
=== Save the GdkPixbuf into a buffer ===
   −
This was very difficult to find out. The gtk2 version of the code was using <pre>pixbuf.save_to_callback</pre> to save the Image on the Journal's Preview Entry but that function no longer exist in Gtk3. So, I found a similar one called <pre>pixbuf.save_to_callbackv</pre> that I couldn't find out how to use it. Even more, I realized that this function call another callback function that doesn't do so much. Reading I found an alternative (and easier) way to do this using <pre>pibuxf.save_to_bufferv</pre>:
+
This was very difficult to find out. The gtk2 version of the code was using <tt>pixbuf.save_to_callback</tt> to save the Image on the Journal's Preview Entry but that function no longer exist in Gtk3. So, I found a similar one called <tt>pixbuf.save_to_callbackv</tt> that I couldn't find out how to use it. Even more, I realized that this function call another callback function that doesn't do so much. Reading I found an alternative (and easier) way to do this using <tt>pibuxf.save_to_bufferv</tt>:
    
  succes, data = pixbuf2.save_to_bufferv('png', [], [])
 
  succes, data = pixbuf2.save_to_bufferv('png', [], [])
266

edits

Navigation menu