Warning: file_put_contents(): Only -1 of 54 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
Prev   GdkPixbuf Constructor Next ( GdkColorspace colorspace , bool has_alpha int bits_per_sample width height ); Creates an empty image with the desired size. The parameter is always Gdk::COLORSPA...
Forum und email

GdkPixbuf Constructor

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

Creates an empty image with the desired size.

The colorspace parameter is always Gdk::COLORSPACE_RGB as Gtk itself doesn't support any other. has_alpha defines it the image has opacity (transparency) information for each pixel.

bits_per_sample is the number of bits reserved for each color sample (red/green/blue/alpha). This is normally 8.

Most times you don't want to create an image yourself but use an one existing in a file - use GdkPixbuf::new_from_file then.