1
 unsigned char *ImgBytes = [ImgBytes stringByAppendingString:getStringForImage:imageView.image]; 

error Bad Receiver Type Unsigned char

2

1 Answer 1

0
NSString *ImgBytes; ImgBytes=[ImgBytes stringByAppendingString:[self getStringForImage:imageView.image]]; ImgBytes=[ImgBytes stringByAppendingString:[NSString stringWithFormat:@"^%@",q]]; -(NSString*)getStringForImage:(UIImage*)img { @try { NSData *data = UIImagePNGRepresentation(img); NSUInteger len = data.length; uint8_t bytes = (uint8_t )[data bytes]; NSMutableString *result = [NSMutableString stringWithCapacity:len]; for (NSUInteger i = 0; i < len; i++) { if (i) { [result appendString:@","]; } [result appendFormat:@"%d",bytes]; } return result; } @catch (NSException * e) { NSLog(@"Exception: %@", e); } @finally { NSLog(@"finally"); } } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.