JPEG compression and quality level

K

Karsten Wutzke

Hello all!

Is there a way or some (free) 3rd party algorithm to determine the JPEG
compression level? We need to make sure that some JPEGs have a certain
quality. Images under a some threshold value shall be rejected form
being upploaded.

E.g. our JPEG quality scale would be from 0-100%, then all images below
70% can't be submitted. (100% is the lowest compression possible, large
file)

Is there such an algorithm?

Karsten
 
H

Harald

Karsten Wutzke said:
Is there a way or some (free) 3rd party algorithm to determine the
JPEG compression level? We need to make sure that some JPEGs have a
certain quality. Images under a some threshold value shall be rejected
form being upploaded.

If the compression program does not list it in a header entry, I doubt
this is possible without some really sophisticated image analysis. The
ratio

image size*number of pixels/size in bytes

may be a very rough indication if you are expecting photos of known
content. For a general image --- in particular artificially prepared
images from some graphics program --- whatever you see after
decompression may be exactly what was intended. In the end its all
just pixels.

Harald.
 
L

Lucy

Harald said:
If the compression program does not list it in a header entry, I doubt
this is possible without some really sophisticated image analysis. The
ratio

image size*number of pixels/size in bytes

may be a very rough indication if you are expecting photos of known
content. For a general image --- in particular artificially prepared
images from some graphics program --- whatever you see after
decompression may be exactly what was intended. In the end its all
just pixels.

Sometimes there is info about it in the jpg file if the camera put it there.
Here is the info that I extracted from a jpg file using ExifReader.
Here the compression seems to be 2 to 1 in some sense.


Filename : 103-0330_IMG.JPG
JFIF_APP1 : Exif
Main Information
Make : Canon
Model : Canon PowerShot S40
DateTime : 2005:03:22 19:30:56
Sub Information
ExposureTime : 1/1000Sec
FNumber : F6.3
ExifVersion : 0220
DateTimeOriginal : 2005:03:22 19:30:56
DateTimeDigitized : 2005:03:22 19:30:56
CompressedBitsPerPixel : 2/1 (bit/pixel)
ShutterSpeedValue : 1/1002Sec
ApertureValue : F6.3
ExposureBiasValue : EV0.0
MaxApertureValue : F2.8
MeteringMode : Division
Flash : Not fired(Compulsory)
FocalLength : 8.63(mm)
UserComment :
ExifImageWidth : 2272
ExifImageHeight : 1704
ExposureMode : Auto
WhiteBalance : Auto
DigitalZoomRatio : 2272/2272
SceneCaptureType : Landscape
Vendor Original Information
MacroMode : Off
Self-timer : Off
Quality : Normal
FlashMode : Off
Drive Mode : Single-frame
Focus Mode : Single
ImageSize : Large
Easy shooting mode : Landscape
Digital Zoom : Off
Contrast : Normal
Saturation : Normal
Sharpness : Normal
CCD Sensitivity : AUTO
MeteringMode : Evaluative
FocusType : Auto
AF point selected : auto-selected
ExposureProgram : Easy shooting
Focal length of lens : 7.09375-21.3125(mm)
Flash Activity : Off
Long Shutter Mode : Off
Photo Effect : Neutral
White Balance : Auto
Sequence number(Continuous mode) : 0
Focused AF Area(AiAF) : Left Center Right
Flash bias : 0 EV
Image type : IMG:powerShotS40JPEG
Firmware version : FirmwareVersion1.10
Image Number : 1030330
Owner name :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top