Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
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: 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?
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 'qtshoweffect' demonstrates this technique for effects in general, and the Sample Code '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
Date | Notes |
---|---|
2004-09-16 | New document that demonstrates how to adjust the brightness of a movie for playback. |
Copyright © 2004 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2004-09-16