We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a094090 commit 4e18d8dCopy full SHA for 4e18d8d
src/decoder/lossless.rs
@@ -3,10 +3,7 @@ use error::{Error, Result};
3
use huffman::HuffmanDecoder;
4
use marker::Marker;
5
use parser::Predictor;
6
-use parser::{
7
- Component, FrameInfo,
8
- ScanInfo,
9
-};
+use parser::{Component, FrameInfo, ScanInfo};
10
use std::io::Read;
11
12
impl<R: Read> Decoder<R> {
@@ -19,7 +16,7 @@ impl<R: Read> Decoder<R> {
19
16
let ncomp = scan.component_indices.len();
20
17
let npixel = frame.image_size.height as usize * frame.image_size.width as usize;
21
18
assert!(ncomp <= MAX_COMPONENTS);
22
- let mut results = vec![vec!(0, npixel); ncomp];
+ let mut results = vec![vec![0u16; npixel]; ncomp];
23
24
let components: Vec<Component> = scan
25
.component_indices
0 commit comments