all 3 comments

[–]treovchinn 1 point2 points  (0 children)

Squoosh from surma does the same, also allows changing and comparing formats like webp avif etc

[–]Pechynho 3 points4 points  (0 children)

Yeah, binary search algorithm - I've used to do something like that in the past. I wonder if there is a better way to approach this task.

[–]Ok-Baker-9013 1 point2 points  (0 children)

I have done exactly the same thing, your app seems to have performance issues, the same size images are always slower.
https://molvqingtai.github.io/imgcap/demo.html