I am capturing a screenshot with SCScreenshotManager
's captureImageWithFilter
. The resulting PNG has the same resolution as the PNG taken from Command-Shift-3 (4112x2658) but is 10x larger (14.4MB vs 1.35MB).
My SCStreamConfiguration
uses the SCDisplay
's width and height and sets the color space to kCGColorSpaceSRGB
.
I currently save to file by initializing a NSBitmapImageRep
using initWithCGImage
, then representing as PNG with representationUsingType
NSBitmapImageFileTypePNG
, then writeToFile:atomically
.
Is there some configuration or compression I can use to bring down the PNG size to be more closely in-line with a Command-Shift-3 screenshot.
Thanks!