Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
C44(1)				  DjVuLibre-3.5 			  C44(1)

NAME
     c44 - DjVuPhoto encode.

SYNOPSIS
     c44 [options] inputfilename [outputfilename]

DESCRIPTION
     Produces a DjVuPhoto encoded image.  The input image file inputfilename can
     be either a portable gray-map (PGM) or a portable pix-map (PPM).  Input im-
     ages  compressed  with  JPEG  are also accepted. It is however suggested to
     only use high quality JPEG files (low compression ratio,  large  size)  be-
     cause  the wavelet compression will increase the defects already present in
     highly compressed JPEG files.

     The program produces a DjVuPhoto file outputfilename.  If the  output  file
     name  is  not specified, a default file name will be generated by replacing
     the input file name suffix by suffix djvu.

     The main design objective for the DjVu wavelets consisted of allowing  pro-
     gressive rendering and smooth scrolling of large images with limited memory
     requirements.   Decoding functions process the compressed data and update a
     memory efficient representation of the wavelet coefficients.  Imaging func-
     tion then can quickly render an arbitrary segment of the  image  using  the
     available	data.	Both process can be carried out in two threads of execu-
     tion.  This design plays an important role in the DjVu system.  We investi-
     gated various state-of-the-art wavelet compression schemes.  Although these
     schemes may achieve slightly smaller file sizes, the decoding functions did
     not even approach our requirements.  The IW44 wavelets reach these require-
     ments today and may in the future	implement  more  modern  refinements  if
     these refinements can be implemented within our constraints.

QUALITY SELECTION OPTIONS
     DjVuPhoto files are logically composed of a sequence of "slices" containing
     successive  image refinements.  Slices are grouped in "chunks" defining the
     progressive rendering sequence.  The viewer is able to display an	interme-
     diate  image  after  processing each chunk.  A typical DjVuPhoto files con-
     tains 80 to 120 slices grouped into 1 to 4 chunks.

     The quality selection options provide various ways to specify the number of
     chunks and the number of slices per chunk.  The c44 program adds slices  to
     the  current chunk until exceeding a target number of slices, a target file
     size, or a target quality specification.  The following options define tar-
     gets for each chunk.  The option argument contain several numerical  values
     (one per chunk) separated by either commas or pluses.

     -slice n+...+n
	    Specify  the  number  of  slices in each chunk.  The option argument
	    contains plus-separated numerical values (one per chunk)  indicating
	    the  number  of  slices  per chunk.  Option -slice 74+13+10, for in-
	    stance, would be appropriate for compressing  a  photographic  image
	    with  three  progressive refinements.  More quality and more refine-
	    ments can be obtained with option -slice 72+11+10+10.

     -slice n,...,n
	    Specify the cumulative number of slices for each chunk.   Since  the
	    final quality is determined by the total number of slices, it is of-
	    ten  more  convenient  to use comma-separated values (one per chunk)
	    indicating the cumulative number of slices for each chunk (i.e.  in-
	    cluding those encoded in all previous chunks).  The values suggested
	    above   can   also	be  expressed  as  -slice  74,87,97  and  -slice
	    72,83,93,103.

     -size n,...,n
	    Specify size targets for each chunk expressed in bytes.  The  option
	    argument  can  be either a plus-separated list specifying a size for
	    each chunk, or a comma separated list  specifying  cumulative  sizes
	    for  each  chunk and all previous chunks.  Size targets are approxi-
	    mates.  Slices will be added to each chunk until exceeding the spec-
	    ified target.

     -bpp n,...,n
	    Specify size targets for each  chunk  expressed  in  bits-per-pixel.
	    Both comma-separated and plus-separated specifications are accepted.
	    Option -bpp 0.25,0.5,1 usually provides good results.

     -percent n,...,n
	    Specify size targets for each chunk expressed as a percentage of the
	    input file size.  Both comma-separated and plus-separated specifica-
	    tions  are accepted.  Results can be drastically different according
	    to the format of the input image (raw or JPEG compressed).

     -decibel n,...,n
	    Specify quality targets for each chunk expressed  as  a  comma-sepa-
	    rated  list of increasing decibel values.  Decibel values range from
	    16 (very low quality) to 48 (very  high  quality).	 This  criterion
	    should  not be relied upon when re-encoding an image previously com-
	    pressed by another compression scheme.  Selecting this  option  sig-
	    nificantly increases the compression time.

     -dbfrac frac
	    Indicate that the decibel values specified in option -decibel should
	    be	computed  by averaging the mean squared errors of only the frac-
	    tion frac of the most mis-represented blocks  of  32  x  32  pixels.
	    This  option  is useful with composite images containing solid color
	    features (e.g. an image with a large white border).

     Providing no quality specification options automatically selects a  default
     quality  specification -slice 74,89,99.  Multiple quality specification op-
     tions are allowed.  The program outputs a file whose total number of chunks
     is the largest number of chunks of all quality specifications.  Slices  are
     added  to	each  chunk  until  reaching  any of the quality target for this
     chunk.

OTHER OPTIONS
     The following additional options are supported:

     -dpi n
	    Specify the resolution information encoded into the output file  ex-
	    pressed in dots per inch. The resolution information encoded in DjVu
	    files  determine  how  the	decoder scales the image on a particular
	    display.  Meaningful resolutions range from 25 to 1200.  The default
	    value, 100 dpi, should be suitable for most photographic images.

     -gamma n
	    Specify the gamma correction information  encoded  into  the  output
	    file.   The  argument  n specified the gamma value of the device for
	    which the input image was designed. The default value is 2.2.   This
	    is appropriate for images designed for a standard computer monitor.

     -mask pbmfilename
	    The  design  of  the  IW44 wavelets allows for compressing partially
	    masked images.  This option can be used when  certain  pixels  of  a
	    background	image are going to be covered by foreground objects like
	    text or drawings.  File pbmfile  must  be  a  PBM  file  whose  size
	    matches  the  size	of  the input file.  Each black pixel in pbmfile
	    means that the value of the corresponding pixel in the input file is
	    irrelevant.  The IW44 encoder will replace the masked  pixels  by  a
	    color  value  whose  coding  cost  is  minimal (see http://www.djvu-
	    zone.org/djvu/techpapers/mask/index.djvu for technical details.)

     -crcbnormal
	    Select normal chrominance encoding.  Chrominance information is  en-
	    coded at the same resolution as the luminance.  This is the default.

     -crcbhalf
	    Selects  half resolution chrominance encoding.  Chrominance informa-
	    tion is encoded at half the luminance resolution.

     -crcbdelay n
	    This option can be used with -crcbnormal and -crcbhalf to modify the
	    quality of the chrominance information.  The option arguments speci-
	    fies a parameter n, expressed in slices, that reduces  the	bit-rate
	    associated	with  the chrominance.	The default chrominance encoding
	    delay is 10 slices.

     -crcbfull
	    Select the highest possible quality for encoding the chrominance in-
	    formation. This is equivalent to specifying -crcbnormal and -crcbde-
	    lay 0.

     -crcbnone
	    Disable the encoding of the chrominance.  Only the luminance  infor-
	    mation  will  be encoded. The resulting image will show in shades of
	    gray.

REMARKS
     The default quality setting of the DjVuLibre version of c44  has  been  in-
     creased.	It  produces larger files with a better quality.  Quality can be
     lowered using the quality selection options!

BUGS
     The encoder requires more memory than necessary.
     The rechunking capability is currently broken.

CREDITS
     This program was written by Leon Bottou  <leonb@users.sourceforge.net>  and
     was  then	improved  by  Andrei  Erofeev  <andrew_erofeev@yahoo.com>,  Bill
     Riemers <docbill@sourceforge.net> and many others.

SEE ALSO
     djvu(1), pnm(5), cjpeg(1).

DjVuLibre-3.5			   10/11/2001				  C44(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=c44&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help