t2p TODO list
$Id: TODO,v 1.18 2003/03/19 23:06:35 eric Exp $

No particular order.

-----------------------------------------------------------------------------

t2p:

* input handlers shouldn't use globals, use pointer to private structure
  instead.

* multiple "-b" options on command line

* page labels on command line

* pages containing multiple images
    * spec language needs major changes
    * split process_page into multiple parts:
        * open page
        * add image
        * close page

* overlay G4 images in different colors - use ImageMask and the fill color

* crop

* page sizes
    * metric
    * check page size, if off by too much, generate warning message and
      use actual scan size
    * multiple page sizes, pick the right one?

* range checking
    * rotation (0, 90, 180, or 270)
    * page number style (D, r, R, a, A)

* watermarking - in image?

* flip, transpose

* support PNG, BMP, and other input file formats

* generate text, line art - option to embed fonts

* bilevel thresholding of color and grey scale input

* automatic separation using timify code from Tim Shoppa?

* automatic image detection using DCT or FFT

* downsampling

-----------------------------------------------------------------------------

bitblt routines:

* finish optimized bitblt code

* optimize inner loops in flip_h and flip_v with Duff's Device

* check for endian problems
    * reading TIFF - don't bit-reverse on big-endian machines
    * rle table
    * g4_get_pixel()
    * g4_find_pixel()

* g4_find_pixel should use native instructions where available
    * 386:  BSF  bit scan forward
    * PowerPC:  CLTLZ, CNTLZW  count leasing zeros  (CNTLZD 64-bit)
    * MC68020:  BFFFO  bit field find first one
    * Alpha 21264A:  CTTZ  count trailing zeros

-----------------------------------------------------------------------------

PDF routines:

[Page numbers refer to _Portable Document Format Reference Manual_ by
Adobe Systems Incorporated, Addison-Wesley, 1993.]

* ModDate and CreationDate keys in Info dict

* ID key in trailer dict

* proper output of real numbers - variable precision, no exponent

* bookmarks (outline) should allow alternate destination specs, currently
  only /Fit is supported

* balance pages tree - currently a degenerate single-level tree, but the
  PDF spec recommends max. of 6 children per parent

* thumbnails

* PDF Page rotate attribute (p. 53)?

* memory management - need to reference count all structures and free
  them as appropriate - not necessary for t2p program

* when an object is written to the file, set a flag to indicate that
  it is now immutable

* name trees, number trees - when finalize is called, set immutable flag
  and allow no further changes

* buffered streams (vs. current callback mechanism for unbuffered streams)

* add support for streams with multiple filters

* linearize ("optimize")
