Cant remove ColorSyncProfile
Cant remove ColorSyncProfile
- Subject: Cant remove ColorSyncProfile
- From: Stephan Burlot <email@hidden>
- Date: Thu, 24 Nov 2005 14:47:03 +0100
Hi,
I'm struggling with color profiles, and I narrowed one of my problems:
using setProperty:NSImageColorSyncProfileData withValue:nil on a
bitmaprep doesnt clear the profile.
Documentation says: "if value is nil, the value at property is cleared."
Using the code below, the saved file has the same color profile as
the SRC image.
What gives?
Thanks for any help,
Stephan
PS: XCode 2.2, MacOSX 10.4.3
NSBitmapImageRep *theBitmap = [NSImageRep
imageRepWithContentsOfFile:SRC];
if (theBitmap != nil)
{
[theBitmap setProperty:NSImageColorSyncProfileData withValue:nil];
}
else
{
NSLog(@"image has no bitmaprep");
return;
}
NSData *bitmapData = [(NSBitmapImageRep *)theBitmap
representationUsingType: NSJPEGFileType
properties:[NSDictionary dictionaryWithObject:
[NSDecimalNumber numberWithFloat:0.8]
forKey:NSImageCompressionFactor]];
[bitmapData writeToFile:DST atomically:NO];
_______________________________________________
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