문제

We are JPEG-compressing a large quantity of images on the fly.

This is a server-side process to interactively prepare images to be sent to the clients' browsers.

Using progressive compression would improve the user experience.

I know that this compression requires more computation for decompression, but that's not an issue.

I'd like to know if progressive compression is more costly too and how much (without running my own serie of tests and benchmarks).

도움이 되었습니까?

해결책 2

After running benchmarks I noticed that generating a JPEG requires an amount of cpu time that is roughly proportional to the number of progressive scans

What I stated in my question...

Using progressive compression would improve the user experience

is actually false since most browsers show the image only when completely loaded by the client.

다른 팁

If you're compressing on the fly, then baseline will allow you to stream compressed data to the client even before you finish downloading and converting rest of the image. This will let you reduce latency. OTOH to compress progressive JPEG you need to download entire source image first.

For small images like thumbnails or avatars it won't matter either way.

For large images… it depends on compressor, number of progressive scans, and image sizes. Cost could be negligible compared to optimized baseline, or could be doubled compared to one-pass streaming encoder.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top