only save when debugging
This commit is contained in:
@@ -40,7 +40,6 @@ impl DCT {
|
||||
|
||||
fn dct(&self, img: image::DynamicImage) -> [f64; 64] {
|
||||
let mut dct_values: [f64; 64] = [0.0; 64];
|
||||
img.save("resize.png").expect("Error saving file");
|
||||
for u in 0..8 {
|
||||
for v in 0..8 {
|
||||
let k = (v*8)+u;
|
||||
@@ -115,6 +114,7 @@ impl Descriptor for DCT {
|
||||
debug!("DCT-coefficients, quantized:\n {}", print_matrix(dct_values));
|
||||
|
||||
if log_enabled!(Level::Debug) {
|
||||
img.save("resize.png").expect("Error saving file");
|
||||
// De-quantization:
|
||||
for i in 0..64 {
|
||||
dct_values[i] = dct_values[i] * self.quantization_matrix[i] as f64;
|
||||
|
||||
Reference in New Issue
Block a user