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
owerShotS40JPEG
Firmware version : FirmwareVersion1.10
Image Number : 1030330
Owner name :