When I convert my NSMutableArray Into NSdata,I get NSMutableArray data in bytes.
Now I want To convert it into UIImage, because I want to send My Array data by Email, but I get null in UIImage.
Here is my code.
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:viewArray];
UIImage *image = [UIImage imageWithData:data];
[controller addAttachmentData:image mimeType:@"image/png"
fileName:@"labelData"];
To convert an image to string you need a method to convert NSData to a base64Encoded string and back (lots of examples http://cocoadev.com/wiki/BaseSixtyFour). The easiest ones to use are categories on NSData so you can do something like this:
Try this way may help you out.