Re: [Gimp-user] Epson <esc>i print format (Gutenprint question)



On 3/1/22 8:59 AM, Gary Aitken wrote:
I have a simple image with one straight line of a single color.
Using the gutenprint dialog, I can print that file.
If I do a "reverse translation" of the raw file, there is one escp2 command
in it to print the line, shown below with some notes:

0000006a  1b  (  U 05 00 08 08 08 40 0b
         units; (page1=08), (vt1=08), (hz1=08), (base2= 40 0b = 0xb40 = 2880)
...
000000c0  1b  i 12 01 02 68 01 01 00
         Print color1, compress1, bits1, bytes2, lines2, data...
         color1 = 0x12 = 18 = light cyan
         compress1 = 1 (TIFF compression)
         bits1 (bits/pixel) = 0x2 = 2
         bytes2 = ???? = 0x068 = 360
         lines2 is # lines to print = 0x0001 = 1
         data = unknown, not dumped; specifies the dot size, 2 bits each
00000124  0c
         FF

What I don't understand is what bytes2 is counting.
There are 100 bytes between 000000c0 and 00000124.
What does the 360 mean?
Do the horizontal units factor or the compression type factor into this
in some way?

My oversight, I see the bytes2 is a count of pixels in each line.
But the question remains:

How do you compute where the next command (the FF) is?

Do you have to actually decode the tiff data?
The data doesn't look like tiff (I don't know squat about tiff), but aren't
the first two bytes of tiff supposed to be "II" or "MM" describing little/big
endian format?  And this data starts with 0xde:

The actual data, not shown above, looks like this:

00000c0 691b 0112 6802 0101 de00 1200 9a05 6959
          i esc               de   ... more data
00000d0 5999 a565 5999 6566 5996 9695 655a fd56
00000e0 1f66 9a59 6656 6566 5996 9665 9659 6666
00000f0 6559 9999 9565 6695 9965 a665 6666 6969
0000100 5566 95fe 9919 6596 5996 5696 9666 665a
0000110 5956 6669 0456 1044 0041 4110 0040 8140
0000120 9000 0d00 1b0c 1b40 5228 0008 5200 4d45
                     FF


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]