Hello,
I have a CGImageRef which i have created by:
CGImageRef screenShot = CGWindowListCreateImage(bound , kCGWindowListOptionOnScreenOnly, kCGNullWindowID, kCGWindowImageDefault );
This CGImageRef is now used to create NSBitmapImageRep:
NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage:cgImage];
data=[bitmapRep representationUsingType:NSJPEGFileType properties:[NSDictionary dictionaryWithObject:NSImageCompressionMethod forKey
"compression"]];
Now i have the image data with me, i want change the color depth per pixel to 256 colors or 32 bit, How can i do that?
Thanks,
Ruhi.
I have a CGImageRef which i have created by:
CGImageRef screenShot = CGWindowListCreateImage(bound , kCGWindowListOptionOnScreenOnly, kCGNullWindowID, kCGWindowImageDefault );
This CGImageRef is now used to create NSBitmapImageRep:
NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage:cgImage];
data=[bitmapRep representationUsingType:NSJPEGFileType properties:[NSDictionary dictionaryWithObject:NSImageCompressionMethod forKey
Now i have the image data with me, i want change the color depth per pixel to 256 colors or 32 bit, How can i do that?
Thanks,
Ruhi.