Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] set png compression/filter type through arguments #27

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

EdenQwQ
Copy link
Member

@EdenQwQ EdenQwQ commented Jul 28, 2022

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 EdenQwQ requested a review from Shinyzenith July 28, 2022 08:21
@EdenQwQ EdenQwQ added the enhancement New feature or request label Jul 28, 2022
@Shinyzenith
Copy link
Member

Shinyzenith commented Jul 28, 2022

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

@EdenQwQ
Copy link
Member Author

EdenQwQ commented Jul 29, 2022

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

@Shinyzenith
Copy link
Member

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 Shinyzenith deleted the png_quality branch December 22, 2022 19:55
@Shinyzenith Shinyzenith restored the png_quality branch December 22, 2022 19:59
@Shinyzenith Shinyzenith reopened this Dec 22, 2022
@Shinyzenith Shinyzenith force-pushed the main branch 2 times, most recently from ab72115 to a0c8e39 Compare May 7, 2023 14:23
@Shinyzenith Shinyzenith force-pushed the main branch 4 times, most recently from 4b1fc91 to 43fae61 Compare July 3, 2023 07:19
@Shinyzenith
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants