If I'm not mistaken, there's an off-by-one error in
clutter_stage_read_pixels in this line:
y = stage_height - 1 - y - height;
It always reads an area one line lower than the user expected. Consider
for example when the user is reading the full stage... then stage_height
== height and y comes in as 0. This line sets the new y to -1 instead of 0.
This patch fixes the problem for me on clutter-0.8.4. It appears the
line hasn't changed in the latest git tree.
- Geoff
diff -Naurp a/clutter/clutter-stage.c b/clutter/clutter-stage.c
--- a/clutter/clutter-stage.c 2009-01-05 15:30:02.000000000 -0800
+++ b/clutter/clutter-stage.c 2009-01-05 15:30:07.000000000 -0800
@@ -1202,7 +1202,7 @@ clutter_stage_read_pixels (ClutterStage
/* The y co-ordinate should be given in OpenGL's coordinate system
so 0 is the bottom row */
- y = stage_height - 1 - y - height;
+ y = stage_height - y - height;
glFinish ();