我創建了NSBitmapImageRep witch我填寫了glReadPixels信息。它看起來像這樣:glReadPixels - > NSData - >保存圖像
NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:width pixelsHigh:height bitsPerSample:8 samplesPerPixel:3 hasAlpha:NO isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:3 * width bitsPerPixel:0];
glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, [imageRep bitmapData]);
和更高版本把它變成NSData並寫入文件。但是我倒過來倒像。我該如何解決它?