[Gnome-print] First draft of new encoding routines



OK, I have a first draft of some new encoding routines:

    http://www.tir.com/~sgifford/filter/

They are implemented in several files which can work apart from
gnome-print.  To use them with gnome-print, you have to copy some
files into a copy of the gnome-print 1-4-branch tree and apply a
patch.  Instructions are included in the tarfile, in
"gnome-print.notes".  Fairly complete library documentation is also
included in "README".

I'd appreciate any comments on what's there so far, and what needs to
happen to make it a part of a gnome-print release.  Here are the
things I already know are wrong with it; I don't know how to fix all
of them, so hints and advice would be appreciated.

Currently, the patch just makes gnome-print always use the new
routines; I didn't include a compile-time or run-time option.  I can
do that in the next iteration, but I wanted to send out what I'd done
so far, so if I'm going in the wrong direction somebody can stop me
now.  Besides, if I'm going to do it, I should do it right, and I
don't know enough about the configuration system to do it right.

Currently, it only works in gnome-print-ps.c, not gnome-print-ps2.c.
When I compiled gnome-print, it called the routines in
gnome-print-ps.c, so that's what I patched.  If somebody can tell me
what to do to make gnome-print use gnome-print-ps2.c (and if I need to
do this), I can patch that too.  I can try working it in other places,
too, if the design looks OK.

Currently, it always encodes in RLE+A85.

Probably with this patch it's impossible to produce PostScript
language-level 1 documents, although I should be able to fix that
without too much work if I find out how to tell what language level
I'm writing at.

I haven't tested in on a big-endian machine yet; I will later this
week.  I don't think it contains any endian-dependant code.

Here's the other comments and notes from the 'gnome-print.notes':

Current Issues:

  * Only images are encoded, and only when written to PostScript.

  * Only a RunLengthEncode+ASCII85Encode filter is supported.

  * Invalid PostScript LanguageLevel 1 documents are probably produced
    (although it should be straightforward to fix).

Comments:

  * I don't know enough about the configuration of gnome-print to know
    how to infer what an appropriate set of drivers are.  Things I'd
    need to know are:

    - Language level supported (1 can only use ASCIIHexEncode,
                                2 supports ASCII85Encode and 
                                  RunLengthEncode,
                                3 supports FlateEncode (not yet 
                                  implemented)
                               )

    - Whether it can handle 8-bit input.  GhostScript has no problem
      with 8-bit input, so we're wasting 25% of space by
      ASCII85Encoding binary data.

    - Possibly more specific information about what filters are
      supported.

  * I've tried to write this library in a way that is easily
    extensible, and that lends itself to external dymanic modules.
    Hopefully those will be implemented someday, by me or by somebody
    else.

  * Currently, this library is halfway between a seperate library and
    a part of gnome-print.  I could be convinced to go either way ---
    spinning it off into a seperate library that gnome-print can be
    compiled with, or integrating it completely into gnome-print.  The
    reason it's somewhat seperate right now is because of the tests
    included, which are quite nice (if I do say so myself), and I'm
    not sure how to incorporate them into the gnome-print build
    process.

Thanks!

----ScottG.




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