Converting ESC/P2 output for modern printing

Anything QL Software or Programming Related.
RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Raspberry Pi - A commercial use?

Post by RWAP »

Ah - thanks - that might explain why the one user gets a green background to the converted images (although I don't). It might be the different versions of gcc.

As an aside - what is the difference?


User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Raspberry Pi - A commercial use?

Post by XorA »

RWAP wrote:Ah - thanks - that might explain why the one user gets a green background to the converted images (although I don't). It might be the different versions of gcc.

As an aside - what is the difference?
The first return true when any bits left of the checked bit is set. (1100 >> 1) = 110 which is still true.

The second masks out all bits to the left of checked bit. (1100 >> 1) & 1 = 0 which is false.


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Raspberry Pi - A commercial use?

Post by RWAP »

One of the main sticking points is the time taken to generate the final files... In particular, the PNG generation takes a while, and using ImageMagick to convert the PNG to PDF is quite slow.

I have just come across libharu which seems to include an example routine to convert PNG to PDF. Does anyone have any experience of this sort of thing?

http://libharu.org/demo/png_demo.c


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Raspberry Pi - A commercial use?

Post by RWAP »

XorA wrote: The first return true when any bits left of the checked bit is set. (1100 >> 1) = 110 which is still true.

The second masks out all bits to the left of checked bit. (1100 >> 1) & 1 = 0 which is false.
Ah yes I see now :)


User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Raspberry Pi - A commercial use?

Post by Peter »

RWAP wrote:One of the main sticking points is the time taken to generate the final files... In particular, the PNG generation takes a while, and using ImageMagick to convert the PNG to PDF is quite slow.
Thanks for this info. WIll save me the time to complete a QDOS port, which would then be way too slow.

Why are we discussing Raspberry PI software in the QL hardware section? :?


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Raspberry Pi - A commercial use?

Post by RWAP »

Peter wrote: Why are we discussing Raspberry PI software in the QL hardware section? :?
Is there a general hardware section then? Remember this is linked to the development of the Retro-Printer - a module which will allow the QL to print to modern USB and network GUI printers :)

I have at least now successfully got the 720dpi ESC.3 mode (Delta Row compression) which is what I use for printing in 720dpi from the ProWeSs colour drivers. I always wanted to implement 1440dpi (and even 2880dpi), but there are no details on the web anywhere...

By the way - I had a real issue with a simple division routine in C and am at a loss as to why it didn't work.

I expected:

Code: Select all

        bytePointer = seedrowStart + (xpos / 8);
        bitOffset = 7 - (xpos & 8)
to give me the pointer to a byte plus the bit offset (remainder), but the bitOffset for some reason came out as either 0 or 8 !!

I had to replace this with:

Code: Select all

        bytePointer = seedrowStart + (xpos / 8);
        bitOffset = 7 - (xpos - (8 * (xpos /8)));
Any suggestions as to why the first case did not work?

SuperBASIC is so much easier to develop in than C !


User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Raspberry Pi - A commercial use?

Post by Peter »

RWAP wrote:
Peter wrote:Why are we discussing Raspberry PI software in the QL hardware section? :?
Is there a general hardware section then? Remember this is linked to the development of the Retro-Printer - a module which will allow the QL to print to modern USB and network GUI printers :)
Hardware? This is a pure software discussion lately.


User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Raspberry Pi - A commercial use?

Post by Peter »

& is the bitwise AND operation. Remainder is %.


Ralf R.

Re: Raspberry Pi - A commercial use?

Post by Ralf R. »

RWAP wrote:I have at least now successfully got the 720dpi ESC.3 mode (Delta Row compression) which is what I use for printing in 720dpi from the ProWeSs colour drivers. I always wanted to implement 1440dpi (and even 2880dpi), but there are no details on the web anywhere...
Ain't there any books from Epson? When I bought my Epson EPL 5200 Laser, I also ordered the GQ Language Book from them for PROGS (but they did not succeed).

Or try to ask Jochen, he was very clever in using the GQ language (even from SuperBASIC), so maybe he was lucky in using the DPI modes you need.


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Raspberry Pi - A commercial use?

Post by RWAP »

Peter wrote:& is the bitwise AND operation. Remainder is %.
:oops: Of course - you would not believe how many times I looked at that and didn't spot it was the wrong character!!


Post Reply