デスクトップのスクリーンショットを取得
デスクトップのスクリーンショットはCGWindowListCreateImageで取得できる。
CGImageRef screenImageRef = CGWindowListCreateImage( [[NSScreen mainScreen]frame], kCGWindowListOptionOnScreenBelowWindow, kCGNullWindowID, kCGWindowImageDefault);
CGWindowListCreateImageのAPI Referenceは下記のようになっている。
CGWindowListCreateImage Returns a composite image based on a dynamically generated list of windows. CGImageRef CGWindowListCreateImage( CGRect screenBounds, CGWindowListOption windowOption, CGWindowID windowID, CGWindowImageOption imageOption ); ・ ・ ・ ・ Availability Available in Mac OS X v10.5 and later. Declared In CGWindow.h
CGWindowListCreateImage は、Mac OS X v10.5からなので10.4でも動かしたい場合は
この方法ではダメで他の方法でスクリーンショットを取得しなければならない。
どうするんだ?
要調査