Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Visual artifacts in image when writing to disk



In the past it has worked fine on my PowerBook G4 without any visual artifacts. However when using a Mac Mini Core Duo, while the image shown on the screen live looks fine, when it is saved to file it suddenly introduces strange visual artifacts (see attached). The problem can be mitigated by increasing the shutter speed of the camera, but I find it strange that the image on screen (on the powerbook and mini) displays none of these artifacts.

Is there a way to fix this problem in software?

Here is the code I am using to write the image to disk:

NSImage * image = [[view valueForOutputKey:@"image"] copy];
NSData *imageData = [image TIFFRepresentation];
NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:imageData];
NSDictionary *imageProps = [NSDictionary dictionaryWithObject: [NSNumber numberWithFloat:0.9] forKey:NSImageCompressionFactor];
imageData = [imageRep representationUsingType:NSJPEGFileType properties:imageProps];
[imageData writeToFile:file atomically:YES];

Does it work if you just do this?

NSData *imageData = [image TIFFRepresentation];
[imageData writeToFile:file atomically:YES];

It's difficult to say what could go wrong without extensive investigation. You would need to fill a bug on bugreport.apple.com

________________________________________________________
Pierre-Olivier Latour                            	email@hidden
Quartz Composer Team				Apple Computer, Inc.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >Visual artifacts in image when writing to disk (From: Caleb Brown <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.