Hello,
I'm writing an application that must print arbitrary images onto a monochrome receipt printer, that behaves like an old dot matrix printer (I think). I think that I can use a QBitmap to do so - I'd certainly need to use some form of dithering, because I'm converting full colour images into greyscale bitmaps. I need to get 8 pixels at a time, in the form of a single byte (1 bit per pixel), and then feed them to the printer in what is perhaps a slightly unusual order.
So, I'd instantiate a QBitmap, and use its toData() method to create a bitmap from a PNG file buffer, at the same time resizing it to conform it to the correct resolution, and then somehow retrieve those raw bits from the QBitmap.
Is this general approach sound? How can I retrieve those raw bits?
Regards,
Sternocera
Bookmarks