This patch contains the new functions: GdkRegion* gdk_region_create_from_bitmap (GdkBitmap *bitmap, gint *width, gint *height); GdkBitmap* gdk_bitmap_create_from_region (GdkRegion *region, gint width, gint height); gdk_region_create_from_bitmap creates a region containing all the points which are set in the bitmap. It will also return the width and height if (optional) pointers are passed to the function. gdk_bitmap_create_from_region creates a bitmap in which all the points contained in the given region are set. The bitmap starts at (0,0), and extends to the width and height passed by the function call. If -1 is passed as width or height, the appropriate dimension of the bitmap will be determined from the clipbox containing the region.