Forum und email

GdkPixbuf

An object holding information about images in memory.

Йерархия на обектите

Описание

A GdkPixbuf is an object that holds information about a whole image (all the color values [red/green/blue/alpha] for every single pixel) in memory.

Pixbufs can be created by loading an image file via GdkPixbuf::new_from_file, by using a given GD image object as source (GdkPixbuf::new_from_gd) or just using the normal constructor, creating an empty image.

A GdkPixbuf itself just contains the information, it does not display it in any way. To display an image in your application, you most likely want to use a GtkImage which uses a GdkPixbuf as source.

Constructors

GdkPixbuf (GdkColorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height);

-- Creates an empty image with the desired size.

GdkPixbuf::new_from_file (string filename);

-- Creates a pixbuf based on an image file.

GdkPixbuf::new_from_file_at_size (string filename, int width, int height);

-- Load an image file and scales it to the given size.

--

-- Create a pixbuf based on a GD image object

Методи

add_alpha()
  FIXME: Method parameters need to be fixed in the source.
composite()
 
composite_color()
 
composite_color_simple()
 
copy()
 
copy_area()
 
fill()
  Fill the whole image with a color.
fill_area()
  Fills a given area with a color.
get_bits_per_sample()
  Returns the number of bits per color value.
get_colorspace()
  Returns the color space of the pixbuf.
get_from_drawable()
 
get_from_image()
 
get_has_alpha()
  If the image has an alpha channel.
get_height()
  Returns the height of the image.
get_n_channels()
  Queries the number of channels of a pixbuf.
get_option()
  Look up a key in the option list.
get_pixel()
  Returns the color of a single pixel
get_pixels()
  Returns the bytes of the image in memory
get_rowstride()
  Returns the number of bytes between rows.
get_width()
  Returns the width of the image.
put_pixel()
  Fill a given pixel with a color.
render_pixmap_and_mask()
 
render_to_drawable()
 
render_to_drawable_alpha()
 
saturate_and_pixelate()
 
save()
  Save the pixbuf into a file.
scale()
 
scale_simple()
  Scales the image to a given size.
subpixbuf()
 

Полета

pixel_array: