The Shape of Everything
A website mostly about Mac stuff, written by August "Gus" Mueller
» Acorn
» Retrobatch
» Mastodon
» Micro.blog
» Instagram
» Github
» Maybe Pizza?
» Archives
» Feed
» Micro feed
January 28, 2005
(This post is from my old, old, super old site. My views have changed over the years, hopefully my writing has improved, and there is now more than a handful of folks reading my site. Enjoy.)

Friday, January 28th, 2005

I think I found a business reason for buying a 30" cinema display.

I was in the local Apple store the other day to get a copy of iWork, and while I was there I thought I would see just how blazingly fast FlySketch works on a dual 2.5 ghz machine. And neat- it also just happened to have a 30" display hooked up to it. So I noodled around a bit with various things, and then hit the screen capture button in FlySketch, and waited for the image to be placed.

And then I waited some more. And a little longer...

It seemed like forever, when it was really only like 4 seconds, but that was way longer than I have to wait for this particular operation on my 3 year old mac + 23" display. That's no good.

What I do is capture the whole screen, and then crop out the rect that FlySketch has its window open to. A better way to do this is to just pull out the pixels that I need from CGDisplayBaseAddress(), and just forget the bit about cropping. So I wrote a little bit of code this evening to just copy the pixels I needed instead of everything, and it seems to make a difference.

Of course, I'm no longer at the Apple store so I can't test out my change. Which is why I really need to buy one for home. Just in case something like this ever pops up again.

And since the 30" will only work with the dual NVIDIA's GeForce 6800 Ultra blah blah blah, I'll have to get that as well... and the dual 2.5 ghz G5 since that's what the card fits in.

Let's see... that's only $6,448.00.

Yea. Or maybe I won't do that.

I should also mention, that this is the second time this bit of code has been optimized. The first time was by Kevin Ballard, who was kind enough to give me some code that boosted performance over the original version. Both versions used CGDisplayBaseAddress() to get the pixels, but his version had a much more efficient way of copying the bits.

Something tells me that there is probably a better way than using CGDisplayBaseAddress() to get a copy of everything, since both Snapz Pro and Apple's command-shift-3 are pretty fast, and that's what they do. Maybe I'll burn an ADC incident some day to find out for sure.

-- posted 6:23 pm