How would I go about appending this binary string
111000111000111111000111000111
to an NSMutableData object that contains a png
(NSMutableData *dataForPNGFile = UIImagePNGRepresentation(p.Image);)
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.
You’d need to parse the string into an
NSData, then append that.I’m not aware of anything built in, so e.g.
So assumptions are that your source string is only 1s and 0s, that it’s written from most significant to least significant digit and that it’s byte rather than word oriented.
Also,
UIImagePNGRepresentationreturns immutable data so you’ll need to take a mutable copy of that.