Image conversion to Binary / Ascii characters
Hi there.
I've got a little problem here, hope anyone has an idea....
So there is this needleprinter (WincorNixdorf ND210) I want to use for printing images.
I figured out how to get it to do what I want and that i printing images.
It has a quite complicated Esc-Sequence to get that done which is formated like this:
ESC * m n1 n2 [ d ] k
What it does is printing Pixels in columns, so for example a graphic like this:
1000001
0100010
0010100
0001000
0001000
0010100
0100010
1000001
would be transfered into columns and then the bits would be converted to bytes:
129 66 36 24 36 66 129
then the necessary command are appenden and prepended and it looks like this:
27 42 0 7 0 129 66 36 24 36 66 129 27 74 16
sent via serial the printer does his job.
So far so good - now my problems:
I am loading the picture I want to print into a lcd, then I use "getpixel" to get the rgb-values.
these are added together and if a certain value is reached I decide wheather a pixel needs to be black or not.
then the next pixel in the row below is checked and so on.
When I have 8 pixels (zl group 8) I convert the bits to a byte, another zl group collects the bytes and that's it.
But the big problem is: It takes ages!!!
I was wondering if anyone has an idea how to do this in an other way.
It would be great if I could get a whole row of pixels at once or sth like this.
I stumbled upon the jit.matrix but I don't know how I could use it for that purpouse...
thanks 4 help,
greetings
Andi
Using matrix might help
Yup indeed. I agree with JKO. Using a 3rd party tool whose way of processing is simple and fast to do with the image conversion work can save a lot of time for us. Remeber to check ite free trial package first if possible. I hope you success. Good luck.
Hi, arron
I wonder do you have any recommendation about pdf to image converter? I am looking forward to it. Any suggetsion will be appreciated. Thanks in advance.
Best regards,
Peter