docstrings

This commit is contained in:
2024-05-12 15:46:31 +02:00
parent 899ecbbee4
commit 2bc050bb44
4 changed files with 13 additions and 1 deletions
+3 -1
View File
@@ -20,7 +20,8 @@ impl DCT {
DCT { quantization_matrix }
}
// Builds DCT with given quality value
/// Builds DCT with given quality value
/// quality
pub fn with_quality(mut self, quality: u8) -> Self {
let mut quantization_matrix: [u8; 64] = [0; 64];
let scalar: f32 = match quality {
@@ -38,6 +39,7 @@ impl DCT {
self
}
///
fn dct(&self, img: &image::DynamicImage) -> [f64; 64] {
let mut dct_values: [f64; 64] = [0.0; 64];
for u in 0..8 {
+3
View File
@@ -1,3 +1,6 @@
//! Descriptors that can be used to describe an image.
//! If two images are (almost) the same, their descriptions will be the same.
pub trait Descriptor {
fn info(&self) -> String {
"Descriptor".to_string()