There are several unanswered questions related to printing images dynamically with P25mi, none with accepted answers. A couple links below.
How to convert image to
Its easiest to start with a black and white image (I used .png) 4 bytes are allocated to each pixel, the data of which you can get by using CgContextRef and CgContextDrawImage (I used the CGBitmapContextCreate method to populate an array of pixel data as well as create a black and white image from the edited data array. I averaged the rgb values for each pixel and then changed all pixel values to black or white (alpha == 255) depending on the average of rgb's.
Then you need to package every 8 pixels into 1 print byte (thus for a pixel of 4 bytes, look at a set of 32 bytes in the data array and set the binary values of the print byte on or off depending on whether a pixel is black (add pow(2, 7 - (position of pixel in 8 pixel sequence) ) or white (do nothing).
I converted a .png image to black and white .png and then to binary and printed the values on my screen. Try to keep the width of your .png in multiples of 8 or you'll have trouble (since you need to convert 8 bytes into 1 byte.