GdkPixbuf
An object holding information about images in memory.
Object Hierarchy
Description
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
-- 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.GdkPixbuf::new_from_xpm_data ( data);--GdkPixbuf::new_from_gd ( gd_image);-- Create a pixbuf based on a GD image object
Methods
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() Â
Fields
pixel_array: Â