summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/Quartz')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
index 573a5df8e..1702ca4ab 100644
--- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
@@ -104,7 +104,10 @@ Fl_RGB_Image* Fl_Quartz_Image_Surface_Driver::image()
CGContextFlush(offscreen);
int W = CGBitmapContextGetWidth(offscreen);
int H = CGBitmapContextGetHeight(offscreen);
+ int save_w = width, save_h = height;
+ width = W; height = H;
unsigned char *data = fl_read_image(NULL, 0, 0, W, H, 0);
+ width = save_w; height = save_h;
Fl_RGB_Image *image = new Fl_RGB_Image(data, W, H);
image->alloc_array = 1;
return image;