The version below supports 640x480 and 1280x720 resolutions. https://gist.github.com/1501766
I've also added support for multiple live video Santas. I'm not keen on my use of class variables to store images, but it was the only way I could think of to prevent repeatedly downloading the same image. Al On 20 Dec 2011, at 13:53, Jordan K. Hubbard wrote: > Yeah, I figured as much and was able to fix it by making that change right > after reporting the bug, but shouldn't we be able to some how make this > camera resolution independent? > > I'm no expert on the AvCapture class, but AVCaptureSessionPresetHigh is > another preset which at least does not hard-code the resolution of the > camera, leaving as the sole exercise to the reader the size of the frame. > I'm not sure how to query that bit of info, and on the MacBook Air the 720p > resolution results in the same incorrect offset for mustache, glasses and hat > - only 640x480 delivers the correct results there. Clearly, we haven't quite > made this hardware independent yet, but we're getting closer I think! > > - Jordan > > P.S. Kudos to Matt for posting such an interesting and amusing challenge! > I've already learned far more about the AVCaptureSession class than I would > have ever been motivated to learn otherwise, and I work for the company! :) > > On Dec 20, 2011, at 2:24 PM, Paul Vinieratos wrote: > >> oh.. I changed the preset. replace all 1280 with 640 and all 720 with 480 >> and check again. >> >> On 20 Δεκ 2011, at 15:20, "Jordan K. Hubbard" <j...@apple.com> wrote: >> >>> >>> On Dec 20, 2011, at 11:34 AM, Pavlos Vinieratos wrote: >>> >>>> https://gist.github.com/1501117 >>>> how is that? :) >>> >>> Now broken on the MacBook Air. :-) >>> >>> 2011-12-20 14:19:52.115 macruby[4131:60b] *** Can't add >>> <AVCaptureDeviceInput: 0x401336a00 [FaceTime Camera (Built-in)]> because >>> the device does not support AVCaptureSessionPreset1280x720. Use >>> -[AVCaptureDevice supportsAVCaptureSessionPreset:]. >>> >>> - Jordan >>> >>> _______________________________________________ >>> MacRuby-devel mailing list >>> MacRuby-devel@lists.macosforge.org >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >> _______________________________________________ >> MacRuby-devel mailing list >> MacRuby-devel@lists.macosforge.org >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > _______________________________________________ > MacRuby-devel mailing list > MacRuby-devel@lists.macosforge.org > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel