NSBitmapImageRep to NSMutableArray or NSMutableDictionary
-
01-07-2021 - |
Question
Is it possible to store NSBitmapImageRep
copy to NSMutableDictionary
or NSMutableArray
? I need to save copy of OpenGL texture somewhere so, that I could use it later. So if I would do glReadPixels
, store readed pixels to NSBitmapImageRep
and somehow store it to NSMutableDictionary
or NSMutableArray
will it work? Or maby there are some other ways to do it?
La solution
Yes, you can store it in an array / dictionary. If you specifically want to make a copy of the bitmap rep before you put it in an array, you can do so.
[array addObject:[bitmapRep copy]];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow