File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use std::{io, iter::Peekable};
22
33use crate :: { ascii_art:: BorderDrawing , ASCII } ;
44
5+ /// A decoded bi-level image
56pub struct FaxImage {
67 pub ( crate ) width : usize ,
78 pub ( crate ) complete : Vec < bool > ,
@@ -16,6 +17,7 @@ impl FaxImage {
1617 println ! ( "{}" , b. right) ;
1718 }
1819
20+ /// Print the image to the console / stdout
1921 pub fn print ( & self , invert : bool ) {
2022 let b = ASCII ;
2123 self . print_border ( & b. top ) ;
@@ -30,7 +32,8 @@ impl FaxImage {
3032 self . print_border ( & b. bottom ) ;
3133 }
3234
33- ///
35+ /// Write a PBM file from the decoded image
36+ ///
3437 /// ## Parameters
3538 ///
3639 /// - `dbl` - write every line twice, because "Standard" fax is 200 dpi horizontal and 100 dpi vertical
Original file line number Diff line number Diff line change 11//! CCITT Group 4 2D-encoding
22
3- use crate :: {
4- bits:: { BitIter , FillOrder } ,
5- g42d:: decode_iter:: FaxImage ,
6- } ;
3+ use crate :: bits:: { BitIter , FillOrder } ;
74
85mod decode;
96mod decode_iter;
107mod encode;
118
129pub use decode:: Decoder ;
1310use decode_iter:: FaxDecode ;
11+ pub use decode_iter:: FaxImage ;
1412pub use encode:: Encoder ;
1513
1614/// Options for fax decoding
You can’t perform that action at this time.
0 commit comments