1
osx에서 스크린 샷 (낮은 수준의 품질)을 프로그래밍 방식으로 가져 오는 방법이 있습니까? I이 기능을 runned 언제 150킬로바이트 및 600킬로바이트 이미지 사이 걸렸다품질이 낮은 스크린 샷을 찍는 방법
CGImageRef resizeImage(CGImageRef imageRef) {
CGRect thumRect;
CGPoint point;
point.x = 0;
point.y = 0;
thumRect.origin = point;
thumRect.size.height = 225;
thumRect.size.width = 360;
CGImageAlphaInfo alphaInfo = CGImageGetAlphaInfo(imageRef);
if (aplhaInfo == kCGImageAlphaNone)
alphaInfo = kCGImageAlphaNoneSkipLast;
CGContextRef bitmap = CGBitmapContextCreate(NULL, thumRect.size.width, thumRect.size.height, CGImageGetBitsPerComponent(imageRef), 4 * thumRect.size.width, CGImageGetColorSpace(imageRef), alphaInfo);
CGContextDrawImage(bitmap, thumRect, imageRef);
imageRef = CGBitmapContextCreateImage(bitmap);
CGContextRelease(bitmap);
return imageRef;
}
:
는 I 함수 아래와 같이 개발 하였다. thumRect 크기를 줄이면 이미지의 모든 문자를 읽을 수 없습니다. 그러나 나는이 이미지들을 가능한 한 낮게하고 싶다. 어떤 제안이나 다른 가능한 해결책이 있습니까?감사합니다.