Add a comment about why the resource data is mutableCopy'd.

This commit is contained in:
Nate Weaver 2012-07-08 09:53:46 -05:00
parent 53b735f144
commit db738486d1

View File

@ -81,6 +81,8 @@
[resImage autorelease];
resImage = [[NSImage alloc] init];
// -mutableCopy the data instead of retaining, so we don't get inverted pixels on reopening the resource
// (since switching to NSCalibratedWhiteColorSpace)
resData = [[resource data] mutableCopy];
planes[0] = (unsigned char*) [resData bytes];
NSUInteger plane0length = 0;