質問

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