Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC

Boinx Starts with Sample Code: FotoMagico Is a Powerful Digital Slideshow

Peter Baumgartner loves digital photography. So when he couldn't find an image presentation program he liked, he decided to write his own.

Starting with sample code from the ADC website, he was able to build a basic slideshow application in just four weeks. When the final product was released six months later as FotoMagico, it quickly gained praise from reviewers and developers alike, winning the runner-up award for Best Mac OS X User Experience in the 2006 Apple Design Awards.



Such an accolade is even more impressive given the fact that FotoMagico was the first application Baumgartner wrote in Cocoa—and his first OpenGL application. But he says that Core Foundation, one of Cocoa's central frameworks, paved the way.

“Core Foundation is very easy to learn because it has very clear concepts,” explains Baumgartner. “Once you understand a few important principles, you can pretty much use all of the API.”

OpenGL and Graphics Performance

FotoMagico was designed to let photographers tell a story, and its features provide the tools to make that process effortless. Because FotoMagico is a graphics-centric program, OpenGL was an “obvious choice,” Peter says, although the standard requires attention to some low-level details. And, indeed, he found it challenging at first. Fortunately, he got a lot of help from OpenGL-specific tools from Apple.

“Apple's OpenGL Profiler and OpenGL Driver Monitor were truly valuable tools,” he explains. “They were especially important because FotoMagico depends on the horsepower of the graphics card, and if something doesn't work as expected you need to find out why. OpenGL Profiler does that well. Without it, I would have been lost many times.”

To improve performance, Baumgartner also took advantage of several features in Quartz, such as Core Video and Core Image APIs, which implement a wealth of filters, effects, and transitions in target applications. To speed up processing time, he also took advantage of the ImageIO framework's benefits.

“I think the trend among applications generally is that more and more graphics processing is being offloaded to the graphics card,” Peter says. “Core Image uses the graphics card to do its job so the main processor doesn't need to spend time processing the image. We relied on it extensively.”

Slideshows have to be able to accept many media file types, so Baumgartner naturally turned to ImageIO and QuickTime to manage all the low-level format details—especially after the first FotoMagico version, when it became clear that users wanted features that QuickTime could easily supply.

“The initial focus was mainly on live presentation of a slideshow,” he explains. “But we found that, for a lot of customers, sharing the slideshow—on a website or DVD—was very important. So I had to spend a lot of time developing those features, and that's where QuickTime comes in. Whether it's on a website or presentation on a DVD, you always need a QuickTime file.”

Learning by Doing

Although he's a relative newcomer to Cocoa, Baumgartner has been programming for more than 15 years. His college friend, Oliver Breidenbach, now CEO of Munich-based Boinx Software, introduced him to the Macintosh platform.

“Oliver and I met at Technical University of Munich, where I was a computer science major,” says Baumgartner. “Back then—in 1990—he got me excited about the Mac, and that's how I got started in Mac programming. The first thing I did on it was my thesis at the university, which was about color image processing and image acquisition using high-res scientific cameras. That was on Mac OS Version 7.”

When Breidenbach saw the prototype version of FotoMagico, he was impressed enough to promise marketing and distribution for the finished product. Baumgartner got to work adding features he felt were missing in other slideshow programs: complex, fast-rendering image-transformation effects and advanced shot-to-shot transitions. Six months later, FotoMagico was born.

A lot has changed since Baumgartner first started Mac programming, and he used the FotoMagico project as an opportunity to learn the newer technologies that specifically helped produce a consumer-level slideshow application. Ultimately, he found the time well spent, as Mac OS X now handles many of the previously “tedious” tasks.

“I pretty much learned Cocoa, OpenGL, and programming with QuickTime by doing FotoMagico,” Peter says. “Coming from Classic Mac OS programming ... well, I started out in System 7. You had to write all of this stuff yourself to store lists or trees of data. You had to write all these classes yourself. Now it's all provided by Core Foundation, and it's always consistent and reliable. Since it's always the same concept, you know how it will work. And since technologies like Core Image use the power of the graphics card, performance is also lot faster than it was in the past.”

Beyond these newer APIs and frameworks, Baumgartner also appreciates the tools Apple makes available, such as the development environment Xcode.

“Of course,” he says, “we're using Xcode, along with other tools that Apple provides, like Interface Builder and a host of debugging and analysis tools. Besides OpenGL Profiler and OpenGL Driver Monitor, there's ObjectAlloc for finding memory management problems and Shark for general performance optimization. Without those tools, it would not have been possible.”

Satisfying Users with a Strong UI

Such programming advantages are hidden from end users, however. All they see is how quickly the program responds to their commands and how easily they can perform tasks. Baumgartner is especially meticulous at maintaining FotoMagico's ease of use even as he adds features.

“One of my design goals was to keep the user interface clean and simple—no visual clutter,” he says. “The most important controls are always visible in the main window, while more obscure functions are hidden away but accessible via the menu. In FotoMagico, the application should be easy to grasp for the casual user, while the advanced stuff remains available for the professional who doesn't mind going through a menu.”
Peter illustrates this principle: “For example, we took a long look at the so-called [pan-and-zoom] 'Ken Burns effect' and decided it would be even easier if you could see the start and finish position side by side and be able to preview the animation at any time without having to pre-render anything.”

The result: Users simply drag and drop images from their iPhoto or Aperture libraries directly onto the FotoMagio stage or storyboard. Adding titles, transitions, and audio is easy, and slideshows can be exported in QuickTime format for DVD, web, iPod, or HD video. And when it's time to share the completed slideshow, FotoMagico gives its users full control over items such as pace, screen size, and volume on any device that's connected to a computer. Other features, such as precise control over movement of text and video, have set FotoMagico apart from its competitors and endeared it to users in fields ranging from filmmaking to live multimedia presentation to vacation planning.

But as any software developer knows, even the happiest users have ideas for new features. Baumgartner says he was surprised at how users took the program and made it their own.

“FotoMagico is pretty much my first try at writing a consumer application,” he explains. “Once a product gets into the hands of customers, you never know what's going to happen. You have your own plans, but users make feature requests, and sometimes they take a product in a direction you didn't expect at first. One thing that was clear right at the beginning was that customers really wanted to be able to edit titles. So we added that, using Cocoa Text.”

Baumgartner says he's ready for customer feature requests and will continue to take advantage of new Mac OS X technologies. For example, he's looking forward to using the recently released version of QuickTime's API in the next version.

“I'm constantly refining the code,” Peter says. “Will I start using QT Kit? Definitely. I'm already rewriting some parts of FotoMagico using it and find it very easy to use. With the new APIs. I have to write less code; less code means fewer bugs and less to maintain.”

For more information about FotoMagico and other products, see the Boinx website.