Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

JPEG compression and quality level

Thread view: 
Karsten Wutzke - 31 May 2005 15:24 GMT
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
Harald - 02 Jun 2005 21:40 GMT
> 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.

Signature

---------------------+---------------------------------------------
Harald Kirsch (@home)|
Java Text Crunching: http://www.ebi.ac.uk/Rebholz-srv/whatizit/software

Lucy - 03 Jun 2005 06:33 GMT
> > 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
[quoted text clipped - 12 lines]
> 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 :


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.