1
0
mirror of https://git.familie-radermacher.ch/linux/ptouch-print.git synced 2026-03-07 06:34:18 +00:00

added more devices, even though printing does NOT work with them

This commit is contained in:
Dominic Radermacher
2016-12-10 09:57:33 +01:00
parent 91f3ebe14c
commit 4d8bb9179f
3 changed files with 27 additions and 2 deletions

View File

@@ -59,11 +59,21 @@ void rasterline_setpixel(uint8_t rasterline[16], int pixel)
return;
}
void unsupported_printer(ptouch_dev ptdev)
{
printf(_("your printer unfortunately is not supported by this tool\n"));
printf(_("the rasterdata a transferred in some other (unknown) format\n"));
exit(1);
}
int print_img(ptouch_dev ptdev, gdImage *im)
{
int d,i,k,offset,tape_width;
uint8_t rasterline[16];
if ((ptdev->devinfo->flags & FLAG_UNSUP_RASTER) == FLAG_UNSUP_RASTER) {
unsupported_printer(ptdev);
}
tape_width=ptouch_getmaxwidth(ptdev);
/* find out whether color 0 or color 1 is darker */
d=(gdImageRed(im,1)+gdImageGreen(im,1)+gdImageBlue(im,1) < gdImageRed(im,0)+gdImageGreen(im,0)+gdImageBlue(im,0))?1:0;