views:

88

answers:

1

Is there any method to know the compress rate of a jpeg image? When I am using photoshop, I can set the compress rate when saving a jpeg image, When I am opening a jpeg image, can I read the compress rate of it? I am using freeimage, c++, however I do not find the API.

Many thanks!

+1  A: 

What you mean when you say "compress rate" are the quality factor settings. Those are not stored inside the JPG file. If you're lucky, the file was compressed using standard IJG tables and you can determine which quality factor was used (but don't ask me how that works exactly), but this won't work for user defined or special IJG tables. See this C# KB article from Microsoft.

schnaader