Adjusting the movie brightness

Q: I'd like to change the brightness of a movie during playback, just as I can in QuickTime Player using the brightness control. Is there an API to do this?

A: The QuickTime Player makes use of a private, custom filter to adjust movie brightness during playback. The way it works is each movie frame is first rendered offscreen and the filter is applied to the frame. The modified frame is then copied back to the screen for display.

You can use a similar technique in your application with the QuickTime Brightness & Contrast Filter Effect (kBrightnessContrastImageFilterType ='brco'). Simply step through each frame of the movie, draw the frame to an offscreen buffer and apply the Brightness & Contrast Filter Effect. Finally, copy the modified image to the screen.

The Sample Code Project 'qtshoweffect' demonstrates this technique for effects in general, and the Sample Code Project 'QTEffects Explode' shows how to build and run an effect without presenting the effects dialog first. For more information about the QuickTime Effects, check the QuickTime Video and Effects Documentation.

Document Revision History

DateNotes
2004-09-16Demonstrates how to adjust the brightness of a movie for playback.

Posted: 2004-09-16


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.