C44(1)

C44(1) β€” the c44 glow-up πŸ’…

okay bestie, we're doing the DjVuLibre-3.5 thing today, so buckle up πŸŽ€


✨ NAME ✨

c44 β€” DjVuPhoto encode. that's it, that's the girl πŸ’–


🌸 SYNOPSIS 🌸

c44 [options] inputfilename [outputfilename]

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, this makes a DjVuPhoto encoded image. the input file inputfilename can be a portable gray-map (PGM) or a portable pix-map (PPM). images compressed with JPEG are also accepted, no cap. but β€” and listen β€” it's suggested you only use high quality JPEG files (low compression ratio, large size) because the wavelet compression will increase the defects that are already sitting in highly compressed JPEG files. it's giving "don't make it worse, babe" 😭

the program produces a DjVuPhoto file called outputfilename. if you don't specify the output file name, a default file name gets generated by replacing the input file name suffix with the suffix djvu. automatic. iconic. ✨

now, the main design objective for the DjVu wavelets was allowing progressive 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 functions can then quickly render an arbitrary segment of the image using the available data. both processes can be carried out in two threads of execution. this design plays an important role in the DjVu system, fr fr. we investigated 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 requirements today, and may in the future implement more modern refinements if those refinements can be implemented within our constraints. she's ambitious, we love that for her πŸ‘‘


πŸ’– 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 intermediate image after processing each chunk. a typical DjVuPhoto file contains 80 to 120 slices grouped into 1 to 4 chunks. okay so that's the anatomy, periodt.

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 targets for each chunk. the option argument contains several numerical values (one per chunk) separated by either commas or pluses. pick your separator, bestie 🫢

  • -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 instance, would be appropriate for compressing a photographic image with three progressive refinements. more quality and more refinements can be obtained with option -slice 72+11+10+10. yes, she's eating πŸ’…
  • -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 often more convenient to use comma-separated values (one per chunk) indicating the cumulative number of slices for each chunk (i.e. including 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. math is math, she contains multitudes ✨
  • -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 approximates (yes, approximates, we said what we said πŸ™ˆ). slices will be added to each chunk until exceeding the specified 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. lowkey a classic 🌸
  • -percent n,...,n β€” specify size targets for each chunk expressed as a percentage of the input file size. both comma-separated and plus-separated specifications are accepted. results can be drastically different according to the format of the input image (raw or JPEG compressed). so like, know your input, okay? 😭
  • -decibel n,...,n β€” specify quality targets for each chunk expressed as a comma-separated 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 compressed by another compression scheme. selecting this option significantly increases the compression time. she's thorough but she takes her time, iykyk 🐌
  • -dbfrac frac β€” indicate that the decibel values specified in option -decibel should be computed by averaging the mean squared errors of only the fraction 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). very niche, very demure πŸŽ€
providing no quality specification options automatically selects a default quality specification -slice 74,89,99. multiple quality specification options 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. (any. not all. any. noted πŸ’–)

🌈 OTHER OPTIONS 🌈

the following additional options are supported:

  • -dpi n β€” specify the resolution information encoded into the output file expressed 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 specifies 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. your monitor could never πŸ’…
  • -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.djvuzone.org/djvu/techpapers/mask/index.djvu for technical details.)
  • -crcbnormal β€” select normal chrominance encoding. chrominance information is encoded at the same resolution as the luminance. this is the default. ✨
  • -crcbhalf β€” selects half resolution chrominance encoding. chrominance information 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 argument specifies 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 information. this is equivalent to specifying -crcbnormal and -crcbdelay 0. go big or go home, queen πŸ‘‘
  • -crcbnone β€” disable the encoding of the chrominance. only the luminance information will be encoded. the resulting image will show in shades of gray. no color bestie, just vibes 🩢

🫢 REMARKS 🫢

the default quality setting of the DjVuLibre version of c44 has been increased. it produces larger files with a better quality. quality can be lowered using the quality selection options! so like, if your file is huge, that's on you, not her 😌


πŸ’€ BUGS πŸ’€

  • the encoder requires more memory than necessary. she's a little extra, it's fine πŸ™ˆ
  • the rechunking capability is currently broken. it's broken, bestie. we said it. 😭

πŸ‘‘ CREDITS πŸ‘‘

this program was written by LΓ©on Bottou <leonb@users.sourceforge.net> and was then improved by Andrei Erofeev <andrew_erofeev@yahoo.com>, Bill Riemers <docbill@sourceforge.net> and many others. legends only, no cap πŸŽ€βœ¨


⭐ SEE ALSO ⭐

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


okay that's the whole thing, you're basically a DjVuPhoto girlie now πŸ’œ and yes, the version on this page is DjVuLibre-3.5, dated 10/11/2001 β€” old money, still iconic πŸ¦‹ slay, go compress something pretty ✨