如何打印位图像TM-T88V [英] How print bit Image TM-T88V
问题描述
大家好我有下一个问题我无法打印我的位图,每24行没有白线。即我需要打印图像,但这个图像每24行到位有白线。
hi guys i have the next problem i can't print my bit image without white line each 24 lines. ie i need to print a image but this image have white lines each 24 lines to bits.
epson打印机将图像打印成下一种格式。
the epson printer print the image to the next format.
>line 23 01010101000010001010
>line 24 00001000100000000110
>line 25 --------- white line ------------
如何删除这条该死的白线?
how can delete this damn white line?
Image size
width:400px
height:73px
while (offset < height)
{
//format ESC* Epson printer
String modIMG = new String(new byte[]{0x1B, 0x2A, 33, 0, 2});
img.append(modIMG);
for (int x = 0; x < width; ++x) {
for (int k = 0; k < 3; ++k) {
byte slice= 0;
for (int b = 0; b < 8; ++b) {
int y = (((offset / 8) + k) * 8) + b;
int i = (y * width) + x;
boolean v = false;
if (i < bitSet.length()) {
v = bitSet.get(i);}
slice |= (byte) ((v ? 1 : 0) << (7 - b));
}
img.slice(new String(new byte[] {slice}));
}
}
offset += 24;
img.append(new String(new String(new byte[]{0x1B,0x33,30}));
}
谢谢并提前!
推荐答案
我解决了它设置页面模式跟随Marc Balmer的例如,但必须发送24 * 2点(线高双倍密度)的Feed才能使其正常工作:所以在每一片数据后发送命令 ESC J n
bytes {27,74,48}
。终于搞定了!
I solved it setting page mode followin Marc Balmer's example, but have to send feed for 24*2 dots (line height double density) to get it working: So after every slice of data send command ESC J n
bytes {27, 74, 48}
. And finally got it!
希望有所帮助!
这篇关于如何打印位图像TM-T88V的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!