I'm not sure if this is really the right forum, but it is an announcement and help/discussion didn't seem to fit the bill. Anyway, here goes...
Ever wondered what a PPA print would look like, without wanting to waste all that paper finding out? Ever felt the urge to see a detailed packet analysis of a PPA stream? If so, the chances are your nerdity score is as high as mine. But never mind that now. With ppa2pnm, all your dreams can now come true.
Okay, that's a bit over the top, isn't it? Here's a more realistic spec:
Purpose : To highlight problems in pnm2ppa, eg data missing. There are many
: areas in a pnm2ppa file where a black line or coloured area is
: simply missing. This tool should help pinpoint those, and why.
Input : PPA stream from printer or from pnm2ppa
Output : ppm or pbm, depending on #define'd variable
Fixed : Pagesize=A4 - another #define
: Printer=HP720/1000 - other variants not implemented yet
: DPI=600 - goes hand-in-hand with the fixed pagesize
Options : -v = output textual packet analysis
: -o file = output ppm/pbm pages as file.00, file.01, ...
Problems: File-IO is primitive, memory management even more so.
: Requires >=100Mb mem+swap and plenty of time in colour '-o' mode
: Colour pixels are wrong size/position, it's driving me mad!!!
: Doesn't yet fulfill original purpose
Confused: I spell colour with a U. Sorry, guys...
: Emacs 20 has yet to understand my style for brace-indents, which
: may lead to inconsistencies. Sorry if it's hard to read...
Mind you, although it hasn't fulfilled its original purpose, a few issues have been highlighted. Firstly, in colour mode black is always masked over with green=yellow+cyan. This seems a bit wasteful. Secondly, there is no real need for MAXLINES to be 32 for black - as it is when colour is enabled. Especially once the first point is addressed, you can just read black lines right up to where the colour starts and do it 150 lines at a time. This would speed up the printer to be perhaps even half as fast as in windows...
Thirdly, unless my software is completely up the creek, I reckon the anti-aliasing code in pnm2ppa needs a change of direction. Where I should see this:
What I actually see is this:
But enough about that. I hope this tool finds a use within the project (I did try to put it on the anonymous uploads space but to no avail) since it'd be nice to have given something back to the Linux/BSD/etc PPA community. If people do find it useful, I'd be happy for it to be on sourceforge somewhere, or I could always use my currently useless website to keep track of updates.
Any bugs, or (better) bugfixes, let me know.
PS: If anyone has a Win98 tool to dump printer IO to a file, I'd like to know how...;)
Please excuse my crass mistake ealier - the so-called aliasing problem I mentioned was simply a big/little endian issue in my own code. I've fixed that, and the colour positioning. The updated (as of just now) correctly displays the RedHat A4 testpage. My pnm2ppa.conf file is also included so that anyone else should be able to replicate the results. Let me know what you think...