Created
February 15, 2013 17:03
-
-
Save ccgus/4961749 to your computer and use it in GitHub Desktop.
replacing NSImage reps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSImage *iRep = [NSImage imageNamed:[fileName stringByDeletingPathExtension]]; | |
if (iRep) { | |
NSImage *ni = [[NSImage alloc] initByReferencingFile:output]; | |
for (NSImageRep *r in [[iRep representations] copy]) { | |
[iRep removeRepresentation:r]; | |
} | |
[iRep addRepresentations:[ni representations]]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment