gdk-pixbuf-creating          package:RGtk2          R Documentation

_I_m_a_g_e _D_a_t_a _i_n _M_e_m_o_r_y

_D_e_s_c_r_i_p_t_i_o_n:

     Creating a pixbuf from image data that is already in memory.

_M_e_t_h_o_d_s _a_n_d _F_u_n_c_t_i_o_n_s:

     'gdkPixbufNew(colorspace, has.alpha, bits.per.sample, width,
     height)'
      'gdkPixbufNewFromData(data, colorspace, has.alpha,
     bits.per.sample, width, height, rowstride)'
      'gdkPixbufNewFromXpmData(data)'
      'gdkPixbufNewSubpixbuf(object, src.x, src.y, width, height)'
      'gdkPixbufCopy(object)'

_D_e_t_a_i_l_e_d _D_e_s_c_r_i_p_t_i_o_n:

     The most basic way to create a pixbuf is to wrap an existing pixel
     buffer with a 'GdkPixbuf' structure.  You can use the
     'gdkPixbufNewFromData' function to do this You need to specify the
     destroy notification function that will be called when the data
     buffer needs to be freed; this will happen when a 'GdkPixbuf' is
     finalized by the reference counting functions If you have a chunk
     of static data compiled into your application, you can pass in
     'NULL' as the destroy notification function so that the data will
     not be freed.

     The 'gdkPixbufNew' function can be used as a convenience to create
     a pixbuf with an empty buffer.  This is equivalent to allocating a
     data buffer using '\code{malloc()}' and  then wrapping it with
     'gdkPixbufNewFromData'.  The 'gdkPixbufNew'  function will compute
     an optimal rowstride so that rendering can be  performed with an
     efficient algorithm.

     As a special case, you can use the 'gdkPixbufNewFromXpmData'
     function to create a pixbuf from inline XPM image data.

     You can also copy an existing pixbuf with the 'gdkPixbufCopy'
     function.  This is not the same as just doing a 'gObjectRef()' on
     the old pixbuf; the copy function will actually duplicate the
     pixel data in memory and create a new 'GdkPixbuf' structure for
     it.

_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf-creating.html>

