-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
Today I wanted to print an image (bitmap) captured with the Pi's camera on the thermal printer. The bitmap is captured properly, but the printer only prints "empty" lines instead of the picture. This is my code snippet:
private` void printImage(Bitmap bitmap) {
if (bitmap != null) {
Bitmap resizedBitmap = Bitmap.createScaledBitmap(bitmap, 384, 256, false);
// Print a bitmap
mThermalPrinter.enqueue(new ThermalPrinter.BitmapJob().printBitmap(resizedBitmap));
} else {
Log.d(TAG, "Bitmap == null");
}
}
I also tried printing other bitmaps created from drawable resources but nothing changed. The logcat doesn't show any errors or warnings at all.
The printer is initialized in the onCreate() method of the activity. The printer itself is on firmware v2.69, printing texts works without issues.
mThermalPrinter = new ThermalPrinter("UART0");
Has anyone experienced similar issues? #
Metadata
Metadata
Assignees
Labels
No labels