diff options
-rw-r--r-- | macosx/tkMacOSXImage.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 11d42ae..60db7d0 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -649,7 +649,6 @@ CreateCGImageFromDrawableRect( CGContextRef cg_context = NULL; CGRect image_rect = CGRectMake(x, y, width, height); CGImageRef cg_image = NULL, result = NULL; - unsigned char *imageData = NULL; if (mac_drawable->flags & TK_IS_PIXMAP) { cg_context = TkMacOSXGetCGContextForDrawable(drawable); if (cg_context) { @@ -667,9 +666,8 @@ CreateCGImageFromDrawableRect( NSUInteger bytesPerPixel = 4, bytesPerRow = bytesPerPixel * view_width, bitsPerComponent = 8; - imageData = ckalloc(view_height * bytesPerRow); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - cg_context = CGBitmapContextCreate(imageData, view_width, view_height, + cg_context = CGBitmapContextCreate(NULL, view_width, view_height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); @@ -684,7 +682,6 @@ CreateCGImageFromDrawableRect( result = CGImageCreateWithImageInRect(cg_image, image_rect); CGImageRelease(cg_image); } - ckfree(imageData); return result; } |