summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pixman/pixman-bits-image.c21
-rw-r--r--pixman/pixman.h10
2 files changed, 26 insertions, 5 deletions
diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index a286497..2dfaa43 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -1373,3 +1373,24 @@ pixman_image_create_bits (pixman_format_code_t format,
return image;
}
+
+PIXMAN_EXPORT pixman_image_t *
+pixman_image_create_bits_cs (pixman_color_space_t *color_space,
+ pixman_format_code_t format,
+ int width,
+ int height,
+ uint32_t * bits,
+ int rowstride_bytes)
+{
+ pixman_image_t *image;
+
+ assert (pixman_color_space_get_num_components (color_space) == 3);
+
+ image = pixman_image_create_bits (format, width, height, bits, rowstride_bytes);
+ if (image)
+ {
+ image->common.color_space = pixman_color_space_ref (color_space);
+ }
+
+ return image;
+}
diff --git a/pixman/pixman.h b/pixman/pixman.h
index 0f2e703..4654d0e 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -777,14 +777,14 @@ pixman_image_t *pixman_image_create_conical_gradient_cs (pixman_color_space_t
const double *stops_offsets,
const double *stops_colors,
int n_stops);
-/*
-NYI
+
pixman_image_t *pixman_image_create_bits_cs (pixman_color_space_t *color_space,
- pixman_format_t *format,
+ pixman_format_code_t format,
int width,
int height,
- void *bits);
-*/
+ uint32_t *bits,
+ int rowstride_bytes);
+
/* Destructor */
pixman_image_t *pixman_image_ref (pixman_image_t *image);