.\"------------------------------------------------------------ .\" Id - set Rv,revision, and Dt, Date using rcs-Id tag. .de Id .ds Rv \\$3 .ds Dt \\$4 .. .Id $Id: mgbilevel.1 16583 2008-07-29 10:20:36Z davidb $ .\"------------------------------------------------------------ .TH mgbilevel 1 \*(Dt CITRI .SH NAME mgbilevel \- compresses a bilevel image using a specified template .SH SYNOPSIS .B mgbilevel .B \-e [ .B \-t .I \*(lqstring\*(rq ] .I infile [ .I \>compressed-outfile ] .nf or .fi .B mgbilevel .B \-d .I compressed-infile [ .I \>outfile ] .SH DESCRIPTION .B mgbilevel performs (up to) a two-stage template-based compression. The user can specify the template to be used in the compression process. The default template size is a two-stage template 22/10. The compressed file contains the template type in the stream. The output files are written to .IR stdout . .SH OPTIONS Options may appear in any order. .TP "\w'\fB\-t\fP \fI\*(lqstring\*(rq\fP'u+2n" .B \-h This displays a usage line on .IR stderr . .TP .B \-e Compresses .I infile using a template specified, and writes to .IR compressed-outfile . .TP .B \-d Decompresses .I compressed-infile using the template contained in the compressed file. Writes to .IR outfile . .TP \fB\-t \fP\fI\*(lqstring\*(rq\fP This option specifies which template combination is to be used in the compression. Five different characters can occur in the string: `.' for a pixel not included in the template, `p' for a pixel included in the 1st level template, `2' for a pixel included in the 2nd level template (a subset of the 1st level), `*' denoting the position of the .I current pixel, and a `;' denoting the end of each template line. The default template is a two-level 22/10 template: .IP .RS .nf \&.ppppp.; pp222pp; p22222p; p22*.\|.\|.; .fi .RE .IP This would be specified on the command line as: .nf \&\fB\-T\fP ".ppppp.;pp222pp;p22222p;p22*.\|.\|.;" .fi .TP .I infile This is the input .I .pbm file to be compressed. .TP .I outfile This is the decompressed .I .pbm file. .SH "SEE ALSO" .na .BR mg (1), .BR mg_compression_dict (1), .BR mg_fast_comp_dict (1), .BR mg_get (1), .BR mg_invf_dict (1), .BR mg_invf_dump (1), .BR mg_invf_rebuild (1), .BR mg_passes (1), .BR mg_perf_hash_build (1), .BR mg_text_estimate (1), .BR mg_weights_build (1), .BR mgbuild (1), .BR mgdictlist (1), .BR mgfelics (1), .BR mgquery (1), .BR mgstat (1), .BR mgtic (1), .BR mgticbuild (1), .BR mgticdump (1), .BR mgticprune (1), .BR mgticstat (1).