alex.m.brown
alex.m.brown

Reputation: 303

JPEG estimating file size

I'm writing an application that needs to compress and scale an image before sending it as an mms which has a maximum file size of 600kb. I'm looking for an algorithm that will help estimate the maximum surface area of a jpeg with a file size < 600kb that accounts for a reduction in quality by some percent between. Thanks.

Upvotes: 1

Views: 885

Answers (1)

BitBank
BitBank

Reputation: 8725

The compression ratio gotten for a specific quality level is pretty consistent. For example, you may find that at a quality level of 80 with color subsampling, you get 14:1 compression. You can do some tests with your JPEG encoder at various quality levels to see the compression ratio achieved and then work backwards to find the largest image size you can compress for a given quality level.

Upvotes: 0

Related Questions