I want to hard code the binary data for an image in a class file. When the class gets initialized, create an NSImage from that data. Storing the image in the resources folder is not an option.
Is this possible and how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have 2 NSData Categories I use here (encodeBase64WithNewlines:NO and decodeBase64WithNewlines:NO) You will have to include libcrypto.dylib for them to work. I think I copied them from Cocoa Dev