First project: Image processing app that generates palette of top 10 most frequent colors

Hello,

I finished my first "real" project with Rust. The program takes an image, processes it, and creates a
copy with an appended palette of the 10 most frequent colors found in the original image.

I've some ideas about what features to add but before moving forward I would really appreciate any feedback: What I'm doing wrong, what I'm doing right, to what to pay attention to, how I can improve? anything...

thanks,
Beka

5 Likes

Very slick work! I just cloned the repo and ran it. Worked like a charm.

I just glanced at main.rs and would suggest in

    let place = Placement::Bottom;
    let mut imgcpy = FramedPicture::new(
        img.width(), img.height(), Some(n), place
    );

to not define place as a variable. Minimizing the number of names eases the process of reading the code. Of you're not going to reuse it, just putting the Placement::Bottom in the function makes it easier to read.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.