Skip to content

feat: add avif encoding support; update dependencies; ... (WIP)#1

Open
Gunzinger wants to merge 77 commits intotduyng:mainfrom
Gunzinger:main
Open

feat: add avif encoding support; update dependencies; ... (WIP)#1
Gunzinger wants to merge 77 commits intotduyng:mainfrom
Gunzinger:main

Conversation

@Gunzinger
Copy link

Hi Duy, thank you for the nice project :)

I played around with it a bit and add avif export support, though be aware that ravif encoding is really slow.
I also added some options to control the webp encoding process.

For the next few tasks I and am planing on adding an encoding path which utilizes the lossless webp encoding from image-rs, and some statistics about the encoding process as I have a larger batch of conversions to do for which I am adapting your program.

There will be some more changes coming, so this should be considered WIP.

feat:

  • add avif encoding support (through ravif, only 8bit RGB without alpha at the moment)
  • add lossless encoding option and quality option for webp, quality and speed for avif;

chore:

  • update dependencies and rust edition
  • add more compile flags for release profile

…ile flags in Cargo.toml; add lossless encoding option and quality option for webp, quality and speed for avif;
…etting to control behavior regarding overwriting existing outputs; sort paths before encoding; add statistics for remove_files call
… print this as encoder data; modify boolean flag definitions; add input and output size statistics, print compression ratio and statistics
src/lib.rs Outdated

```bash
git clone https://github.com/tduyng/imgc-rs.git
git clone https://github.com/Gunzinger/imgc-rs.git
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs undoing before merge 😄

@Gunzinger
Copy link
Author

I added some statistics and a progress bar.
Also a Dockerfile which can create a really neat small container (~20MB for the whole alpine based container) which only contains the resulting executable.
I also included a debian version of the Dockerfile, it builds much quicker (2-4x, 30s vs 100-120s), but then the resulting container is much larger (~120MB with bookworm-slim):
grafik

Build and usage:
grafik

@tduyng
Copy link
Owner

tduyng commented Jun 24, 2025

Thank you so much, @Gunzinger, for taking an interest in my project and for this PR with improvements and new features! I haven’t had a chance to test it yet, but it looks really cool.

To be honest, I originally created this project for personal use, and I haven’t worked on it in quite a while. If you’re truly motivated to continue developing it, I’d suggest focusing on your fork as the primary version. If you’re aiming for public use, publishing it to crates.io could be a great next step. Though keep in mind that most of the future work would then be on your side.

Thanks again!

Gunzinger and others added 30 commits July 12, 2025 01:54
chore(deps): bump indicatif from 0.17.12 to 0.18.0
chore(deps): bump clap from 4.5.40 to 4.5.41
…0.21.0

chore(deps): bump cargo_metadata from 0.20.0 to 0.21.0
chore(deps): bump rgb from 0.8.50 to 0.8.51
…nd performance; improve build flags for dependencies; add jpeg and png filename aliases; update all dependencies and documentation
…rations (x86-64-v3, x86-64v3, x86-64-v4, znver3, znver5)
…ions/checkout (v4->v5) and peter-evans/dockerhub-description (v4->v5); prettify release name again
…oder dependency to fallback-retry jpeg formats, which adds support for p(rogressive)jpeg
… is_supported check-calls); adjust output_path derivation and pattern_base handling to work with relative paths starting with ./
…m to rgb(a) before (path is unimplemented in used lib)
…(support for imposter images with wrong extensions)
…more robust by wrapping them in a catch_unwind for zune jpeg panic catching; show converted/error/skipped; try to enable rust cache for CI job
…ed up by Swatinem/rust-cache@v2 without chance for error
…eporting errors, set final state when finishing the calculation; rewrite encoding statistics integration at the end of the program
…coding process; update github action workflow (used images)
… memory barrier); add --discard-input-alpha-channel parameter; update clap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants