1Gtk2::Gdk::Image(3)   User Contributed Perl Documentation  Gtk2::Gdk::Image(3)
2
3
4

NAME

6       Gtk2::Gdk::Image - wrapper for GdkImage
7

DESCRIPTION

9       A "Gtk2::Gdk::Image" is a 2-D array of pixel values in client-side
10       memory.  It can optionally use shared memory with the X server for fast
11       copying to or from a window or pixmap.
12
13       If you're thinking of using this then look at "Gtk2::Gdk::Pixbuf"
14       first.  GdkPixbuf has many more features, in particular file read and
15       write (PNG, JPEG, etc).  But a GdkImage lets you work directly in pixel
16       values instead of expanding to RGB components.
17
18       See Gtk2::Gdk::Drawable for "draw_image", "get_image" and
19       "copy_to_image" methods to draw or fetch images to or from a window or
20       pixmap.
21
22       The various "get" methods are Gtk 2.22 style.  For previous versions
23       they're direct field access.
24

HIERARCHY

26         Glib::Object
27         +----Gtk2::Gdk::Image
28

METHODS

30   image or undef = Gtk2::Gdk::Image->new ($type, $visual, $width, $height)
31       ·   $type (Gtk2::Gdk::ImageType)
32
33       ·   $visual (Gtk2::Gdk::Visual)
34
35       ·   $width (integer)
36
37       ·   $height (integer)
38
39   integer = $image->get_bits_per_pixel
40   byteorder = $image->get_byte_order
41   integer = $image->get_bytes_per_line
42   integer = $image->get_bytes_per_pixel
43   colormap = $image->get_colormap
44   $image->set_colormap ($colormap)
45       ·   $colormap (Gtk2::Gdk::Colormap)
46
47   integer = $image->get_depth
48   integer = $image->get_height
49   imagetype = $image->get_image_type
50   unsigned = $image->get_pixel ($x, $y)
51       ·   $x (integer)
52
53       ·   $y (integer)
54
55   string = $image->get_pixels()
56       Return a copy of the raw pixel data memory from $image.  This is
57       "bytes_per_line * height" many bytes.
58
59   $image->put_pixel ($x, $y, $pixel)
60       ·   $x (integer)
61
62       ·   $y (integer)
63
64       ·   $pixel (unsigned)
65
66   visual = $image->get_visual
67   integer = $image->get_width

ENUMS AND FLAGS

69   enum Gtk2::Gdk::ByteOrder
70       ·   'lsb-first' / 'GDK_LSB_FIRST'
71
72       ·   'msb-first' / 'GDK_MSB_FIRST'
73
74   enum Gtk2::Gdk::ImageType
75       ·   'normal' / 'GDK_IMAGE_NORMAL'
76
77       ·   'shared' / 'GDK_IMAGE_SHARED'
78
79       ·   'fastest' / 'GDK_IMAGE_FASTEST'
80

SEE ALSO

82       Gtk2, Glib::Object
83
85       Copyright (C) 2003-2011 by the gtk2-perl team.
86
87       This software is licensed under the LGPL.  See Gtk2 for a full notice.
88
89
90
91perl v5.30.1                      2020-01-30               Gtk2::Gdk::Image(3)
Impressum