MINIDJVU(1)
MINIDJVU π β¨
okay bestie, gather round, because we're talking about minidjvu β she's the encode/decode girlie for black-and-white DjVu pages, she's part of the minidjvu-0.8 era, and honestly? she eats. π
β¨ NAME β¨
minidjvu β encode/decode black-and-white DjVu pages π¦
β¨ SYNOPSIS β¨
so here's the whole vibe, single page:
minidjvu [options] input_file output_file
and the multipage compression has basically the same energy:
minidjvu [options] input_files output_file
if you wanna know the deets on that second one, scroll down to MULTIPAGE ENCODING, i got you. π
β¨ DESCRIPTION β¨
minidjvu encodes and decodes single-page black-and-white DjVu files. no cap. π€π€
she's derived from DjVuLibre, which is, like, the primary support library for DjVu β the og, the blueprint, the blueprint bestie.
and listen, she's not just a bitonal DjVu girl. besides bitonal DjVu, minidjvu also understands:
- Windows BMP
- PBM
- TIFF (through
libtiff)
both inputfile and outputfile can be BMP, PBM, TIFF or DjVu. how does she know which one you mean? the file type is determined by extension, periodt. and yes, input and output may coincide β she can handle that. π«Ά
when you give her a DjVu-to-DjVu job, minidjvu decodes, then re-encodes the image. heads up though: DjVu layers other than bitonal picture are lost. gone. evaporated. π
you can specify a bitmap-to-bitmap job, but it's relatively useful only with the --smooth option. like, it works, but it's giving... niche.
one more thing that's lowkey iconic: all options preceded by two hyphens can be used with one hyphen. why? to make the minidjvu interface more familiar for DjVuLibre users. thoughtful queen behavior. π
β¨ MULTIPAGE ENCODING β¨
to activate the multipage mode, either:
- specify more than just one input file on your command line, or
- pass
minidjvua single multipage tiff document
by default (aka if --indirect is not specified), the compressed pages get stored into a single bundled document under the name you provided in the command line. cute, compact, one file. π
there are several options referring to the multipage encoding process, namely:
--pages-per-dict--indirect--report
β¨ OPTIONS β¨
okay this is the big one, stay with me bestie, we're going through ALL of them π
-A,--Averagingβ Compute "average" representatives for shapes matching a pattern. β¨-a n,--aggression nβ Sets aggression for pattern matching. the more the aggression, the less the file size, but the more likely substitution errors will occur. the default is100. usually you can raise it to about110more or less safely. probably even200will work fine, but don't rely on that. π
Consistent aggression levels between versions is not guaranteed. the default, however, will always be 100. that part's locked in.
This option turns on --match automatically. no extra work for you, slay.
-c,--cleanβ Remove small black marks that are probably noise. but bestie, be careful: this algorithm can really devastate halftone patterns, so use with caution. β οΈ
This option is turned on by --lossy.
-d n,--dpi nβ Specify the resolution of an image, measured in dots per inch. the resolution affects some algorithms and it's recorded in DjVu and BMP files (TIFF should join someday π).-e,--erosionβ Sacrifice image quality to gain about 5-10% in file size. one erosion is almost invisible, but 10 erosions in a row spoil an image badly (and they won't give you 50-100% of file size, alas π). erosion bonus stacks with pattern matching.
Erosion makes no sense when the output is not DjVu.
This option is turned on by --lossy.
-i,--indirectβ Specifying this option in multipage mode causesminidjvuto generate an indirect multipage document, consisting of:- a single index file
- several single-page DjVu files (one per each image passed to the encoder)
- several shared dictionary files
note that the index file is created under the name specified for the output file in the command line, while for each page the original input file name is preserved, with the extension being changed to ".djvu". π
This mode is useful for placing a large document to a Web server, or if you are going to postprocess the generated files (e. g. by adding a color background π). in the latter case you may then want to convert your indirect document to DjVu bundled, using the djvmcvt utility, supplied with DjVuLibre.
-l,--lossyβ Turn on all lossy options. is equivalent to--clean --erosion --match --smooth. one flag, four vibes. π-m,--matchβ Run pattern matching. this is the main method of shrinking the file size, but it can also bring trouble with substitution errors. use the--aggressionoption to maintain balance between file size and error probability. βοΈ
This option is turned on by --lossy or --aggression.
-n,--no-prototypesβ Disable prototype searching. this makes lossless compression faster, but produced files become much bigger. trade-offs, bestie.-p,--pages-per-dictβ Specify how many pages to compress in one pass. the default is10. if-p 0is specified,minidjvuwill attempt to process all pages at once, but be aware that this can take a lot of memory, especially on large books. π³-r,--reportβ Print verbose messages about what's done on which page. works only with multipage encoding. useful only to survive boredom while compressing a book. π honestly, relatable.-s,--smoothβ Flip some pixels that appear to be noise. the gain in file size is about5%. visually the image is slightly improved, but it's hardly noticeable. β¨
Current filter is dumb and only removes black pixels with at least 3 white neighbors (of 4). you probably won't notice the effects. π
This option is turned on by --lossy.
-v,--verboseβ Print messages about various stages of the process. it's not very useful, but interesting to examine. like reading someone's diary but it's just compression logs. π-X,--Xtensionβ Specifies an extension for shared dictionary files (without a leading period). the default is"iff". π-w,--warningsβ Do not disable libtiff warnings. by default, TIFF warnings are suppressed. under Windows the default TIFF warning handler creates a message box. this is unacceptable in a batch processing script, for instance. so theminidjvudefault behavior is a workaround for libtiff default behavior. π
β¨ BUGS β¨
Multipage encoder does not work properly if pages have different resolution. π that's it, that's the bug, go forth and be warned.
and that's the whole page, bestie!! π this was the minidjvu manual, brought to you by the minidjvu-0.8 girlies, dated July 2009 β yes she's an elder but she's still iconic, and you're gonna encode some black-and-white DjVu pages with her and it's gonna be slay. bye bestie, love you, read your man pages!! π«Άβ¨π
π¦ where this page comes from
- debian bookworm: minidjvu 0.8.svn.2010.05.06+dfsg-6+b2
- debian trixie: minidjvu 0.8.svn.2010.05.06+dfsg-7+b1
- ubuntu jammy: minidjvu 0.8.svn.2010.05.06+dfsg-6build1
- ubuntu noble: minidjvu 0.8.svn.2010.05.06+dfsg-7build1
- ubuntu questing: minidjvu 0.8.svn.2010.05.06+dfsg-7build1
- ubuntu resolute: minidjvu 0.8.svn.2010.05.06+dfsg-7build2
- ubuntu stonking: minidjvu 0.8.svn.2010.05.06+dfsg-7build2
- Copyright (c) 2005 Ilya Mezhirov
- Copyright (c) 2009 Alexey Kryukov
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms