Re: Brightness/contrast in NSMovieView?
Re: Brightness/contrast in NSMovieView?
- Subject: Re: Brightness/contrast in NSMovieView?
- From: Matt Neuburg <email@hidden>
- Date: Thu, 13 Jul 2006 16:12:07 -0700
- Thread-topic: Brightness/contrast in NSMovieView?
> Date: Wed, 12 Jul 2006 15:35:47 -0400
> From: Michael Watson <email@hidden>
> Subject: Brightness/contrast in NSMovieView?
>
> I've got a QuickTime movie loaded into an NSMovieView, and now I'd
> like to be able to adjust the brightness, a la QuickTime Player's A/V
> controls. I'm attempting to use SetMovieVisualBrightness() but am
> having little luck. Here's a snippet that *should* turn the image
> completely white:
>
>
> NSMovie *viewMovie = [myNSMovieView movie];
> Movie moov = [viewMovie QTMovie];
> Float32 brightness = 1.0;
>
> OSStatus err = SetMovieVisualBrightness(moov, brightness, 0);
>
> if (err != noErr)
> {
> NSLog(@"error");
> }
> else
> {
> NSLog(@"no error");
> }
>
> myNSMovieView is an IBOutlet pointing to the NSMovieView instance in
> question.
>
> The console shows "no error", which suggests things are moving along
> correctly. It's starting to look like it's not actually possible to
> change brightness/contrast/etc with NSMovieView-based movies. Has
> anyone been able to do this?
NSMovie has always been quirky. It's easy to do what you describe using
QTKit (the interface control would now, mutatis mutandis, be a QTMovieView):
SetMovieVisualBrightness ([[movieView movie] quickTimeMovie], 1.0, 0);
There just happens to be a nice QTKit article featured on the front page of
developer.apple.com right now:
<http://developer.apple.com/quicktime/qtkit.html>
The "Hello World" example project (a sort of QuickTime Player on diorets*)
is here:
<http://developer.apple.com/samplecode/QTKitPlayer/index.html>
m.
* Diorets: the opposite of steroids.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide - Second Edition!
http://www.amazon.com/gp/product/0596102119
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden