I wan to print an image on a bluetooth printer. I got some sample code by the printer manufacturer. Here is the code -
unsigned char buffer3[796]={
I guess, the printer will not take any image format? However, here is how you can convert an image to a byte array, hope this will help:
NSData *data = [NSData dataWithContentsOfFile:imagePath];
NSUInteger length = [data length];
Byte *bytes = (Byte*)malloc(length);
memcpy(bytes, [data bytes], length);