Need help with warning: passing argument 1 of ... from distinct Objective C type
Need help with warning: passing argument 1 of ... from distinct Objective C type
- Subject: Need help with warning: passing argument 1 of ... from distinct Objective C type
- From: Jason Horn <email@hidden>
- Date: Tue, 6 Nov 2007 13:07:40 -0500
I am getting a compiler warning that makes no sense to me:
warning: passing argument 1 of 'setImage:' from distinct Objective C
type
My code is generating a CIImage and then passing it to a view object
(VideoView) for drawing. As far as I can tell, the compiler is trying
to tell me that the object (CIImage) that I am sending to the setImage
method is of the wrong type. But it looks right to me. Does anyone
know what is going wrong here?
CIImage *resultImg;
CIFilter *sbcAdjust;
CIImage *ciImage = [CIImage alloc];
[ciImage initWithBitmapImageRep:bitmap];
sbcAdjust = [CIFilter filterWithName:@"CIColorControls"];
[sbcAdjust setDefaults];
[sbcAdjust setValue:ciImage forKey:@"inputImage"];
[sbcAdjust setValue:[NSNumber numberWithFloat:brightness]
forKey:@"inputBrightness"];
[sbcAdjust setValue:[NSNumber numberWithFloat:contrast]
forKey:@"inputContrast"];
resultImg = [sbcAdjust valueForKey: @"outputImage"];
[videoView setImage:resultImg];
In the VideoView class, setImage is defined as follows:
- (void)setImage:(CIImage *)frameImage
{
[frameImage retain];
[image release];
image = frameImage;
[self setNeedsDisplay:YES];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden