Image Value Transformer setting image alpha less than 1.0
Image Value Transformer setting image alpha less than 1.0
- Subject: Image Value Transformer setting image alpha less than 1.0
- From: Gustavo Pizano <email@hidden>
- Date: Fri, 11 Jun 2010 14:59:11 +0200
Hello all..
In my Core Data app, Im fetching a NSData property corresponding an image.
Now Im binding an NSImageWell value to the Entity's array controller and setting the propper keypath and setting the value transformer to IZImageTransformer
The image value for each MO appears but I realized that its opacity its less than 1.0, I mean its not 100% opaque.
this is what Im doing in the IZImageTransformer
+(Class)transformedValueClass{
return [NSImage class];
}
+ (BOOL)allowsReverseTransformation
{
return NO;
}
-(id)transformedValue:(id)value{
if(value == nil)return nil;
NSImage * image;
if ([value isKindOfClass:[NSData class]]) {
image = [[NSImage alloc] initWithData:(NSData *)value];
}
else {
[NSException raise: NSInternalInconsistencyException
format: @"Value (%@) is not a NSData.",
[value class]];
}
return [image autorelease];
}
any idea why Im not getting full opacity?
Thx
Gustavo
_______________________________________________
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