wayshot icon indicating copy to clipboard operation
wayshot copied to clipboard

[feat] set png compression/filter type through arguments

Open EdenQwQ opened this issue 3 years ago • 4 comments

Implemented the ability to set png compression/filter type with -C and -F argument

pub enum CompressionType {
    Default,
    Fast,
    Best,
    Huffman,
    Rle,
}

pub enum FilterType {
    NoFilter,
    Sub,
    Up,
    Avg,
    Paeth,
    Adaptive,
}

EdenQwQ avatar Jul 28 '22 08:07 EdenQwQ

Pr looks great! Is there anyway we can make this generic enough for all the backend formats ?

Shinyzenith avatar Jul 28 '22 09:07 Shinyzenith

Pr looks great! Is there anyway we can make this generic enough for all the backend formats ?

Compression type and filter type are options only available for png format. We can add options for other formats by using a similar smart pointer

EdenQwQ avatar Jul 29 '22 14:07 EdenQwQ

Pr looks great! Is there anyway we can make this generic enough for all the backend formats ?

Compression type and filter type are options only available for png format. We can add options for other formats by using a similar smart pointer

Ok I see, in that case, can we offload the compression to some other crate to do it for us which can support multiple formats?

If that's too big of a task right now, then it's just best to merge this for now :D

Also while we're on the topic, I added man-page generation in build.rs with scdoc, would you mind documenting this flag in the 1 and 7 sections of wayshot?

Shinyzenith avatar Jul 29 '22 15:07 Shinyzenith

This is a really good PR and I wish to get this to production someday. I just need to find a good way to compress all supported formats.

Shinyzenith avatar Oct 29 '23 07:10 Shinyzenith