Return to Digital Photography Articles

JPEGsnoop - JPEG File Decoding Utility

by Calvin Hass © 2010

JPEGsnoop is a free Windows application that examines and decodes the inner details of JPEG and MotionJPEG AVI files. It can also be used to analyze the source of an image to test its authenticity.

JPEGsnoop Program Icon

Overview

Latest Version: 1.5.2


Introduction

Every digital photo contains a wealth of hidden information -- JPEGsnoop was written to expose these details to those who are curious.

Not only can one determine the various settings that were used in the digital camera in taking the photo (EXIF metadata, IPTC), but one can also extract information that indicates the quality and nature of the JPEG image compression used by the camera in saving the file. Each digical cameras specifies a compression quality levels, many of them wildly different, leading to the fact that some cameras produce far better JPEG images than others.

What can I do?

Check out a few of the many possible uses for JPEGsnoop!

One of the latest features in JPEGsnoop is an internal database that compares an image against a large number of compression signatures. JPEGsnoop reports what digital camera or software was likely used to generate the image. This is extremely useful in determining whether or not a photo has been edited / tampered in any way. If the compression signature matches Photoshop, then you can be pretty sure that the photo is no longer an original! This type of analysis is sometimes referred to as Digital Image Ballistics / Forensics.

JPEGsnoop reports a huge amount of information, including: quantization table matrix (chrominance and luminance), chroma subsampling, estimates JPEG Quality setting, JPEG resolution settings, Huffman tables, EXIF metadata, Makernotes, RGB histograms, etc. Most of the JPEG JFIF markers are reported. In addition, you can enable a full huffman VLC decode, which will help those who are learning about JPEG compression and those who are writing a JPEG decoder.

Other potential uses: determine quality setting used in Photoshop Save As or Save for Web settings, increasing your scanner quality, locating recoverable images / videos, decoding AVI files, examining .THM files, JPEG EXIF thumbnails, extract embedded images in Adobe PDF documents, etc.

Trying to Undelete or Unformat your Photos?

If you're interested in trying to recover your deleted / corrupted photos, check out my new page on recovering deleted photos.

File Types Supported

JPEGsnoop will open and attempt to decode any file that contains an embedded JPEG image, such as:

  • .JPG - JPEG Still Photo
  • .THM - Thumbnail for RAW Photo / Movie Files
  • .AVI* - AVI Movies
  • .DNG - Digital Negative RAW Photo
  • .CRW, .CR2, .NEF, .ORF, .PEF - RAW Photo
  • .MOV* - QuickTime Movies, QTVR (Virtual Reality / 360 Panoramic)
  • .PDF - Adobe PDF Documents

* Note that video file formats (such as .AVI and .MOV) are containers, which can include video streams encoded in one of a wide variety of codecs. JPEGsnoop can only interpret this video footage if the codec used is based on Motion JPEG (MJPG).


Download the Latest Version of JPEGsnoop!


Click to Download .ZIP
Version: 1.5.2
Version History

Released: 02/20/2011
Downloads: 217195

JPEGsnoop by Calvin Hass

Help Support JPEGsnoop Development

If you have found JPEGsnoop useful and would like to support its continued development, consider making a small contribution. Donations will help encourage me to add new and interesting features. Found an interesting use for the tool? Let me know!

Source Code: JPEGsnoop is now Open Source!


System Requirements

This application has been designed and tested to run on Windows XP and Windows Vista, but it should also work for Windows 95/98/NT/2000. JPEGsnoop is fully portable, so it does not require any installation!

LINUX users: JPEGsnoop apparently works on LINUX under wine

Mac users: JPEGsnoop works within CrossOver Mac

Terms of Use

JPEGsnoop is free for personal and commerial use. Commercial users are encouraged to leave me a brief message so that I can understand your needs and make future versions more useful.

Installation

No installation required. JPEGsnoop is fully portable. Simply unzip the download and run!

Version History

For information about features added in previous versions of JPEGsnoop, please check out the version history page.

Feature Requests / Bug Reports

Please feel free to add your own feature requests or bug reports by submitting to the links on the JPEGsnoop Source page


Awards and Recognition for JPEGsnoop

  • PC Magazine - Utility Guide 2009 - July 2009
  • Win Magazine - May 2009
  • CHIP.de Magazine - Program of the Month - April 2009
  • Computer Bild Magazine - Issue 10/2009


Main Window
Channel Histograms
MCU Grid & Positioning

Documentation

Please see the options page for information on how to use JPEGsnoop and other interesting uses for the tool

Recent Features

  • Batch file processing
  • XMP APP1 & ICC Header display
  • GPS EXIF metadata display
  • Full detailed Huffman VLC decoding output for those interested in writing a decoder or learning JPEG compression
  • Automatic display of YCC DC block values (16-bit)
  • MCU Grid overlay and automatic display of mouse MCU position and file offset in image display window.
  • Test overlay function enhanced to allow quick apply and binary code readout.
  • Image zoom level from 12.5% - 800%.
  • Extract embedded JPEGs -- can be used to extract thumbnails, hidden JPEG files, as well as frames from Motion JPEG AVI files.
  • Compression detection enhanced to detect rotated signatures, comment field.
  • Full AVI file parsing (to identify MotionJPEG)
  • DQT table searches in Executables (for "hackers")
  • Detect edited images or identify original digital camera that took a photo!
  • Integrated database of thousands of compression signatures (image fingerprint) for digital cameras and editing software
  • File overlay test function
  • Multi-channel preview: RGB, YCC, R/G/B, Y/Cb/Cr
  • Pixel position lookup into file offset
  • Examine Motion JPEG .AVI or .MOV (Quicktime) files (MJPG or MJPEG) and play through!
  • Examine any file fragments that may contain a JPEG image
  • YCC to RGB Color correction / clipping statistics reports
  • Command-line execution
  • Huffman variable-length code statistics
  • Expansion of DHT (Huffman Table Expansion into bitstrings)
  • Determine IJG JPEG Quality factor

Background Material

If you want to understand some of the technical details reported by JPEGsnoop, I suggest that you read through my articles on JPEG compression:

Suggestions

As this is a work in progress, I would be very interested in hearing from you, particularly for feature requests, suggestions, comments, bug reports, etc. If you currently use JPEGsnoop and find it useful, let me know!

 


Reader's Comments:

Please leave your comments or suggestions below!
2012-01-17Ron
 Hi,

Jpegsnoop is great for certain applications. I am on the LA Superior Court Panel of Experts. Currently I am involved in the Defense of a man facing 27 years to life. The prosecution used Jpegsnoop to validate authenticity of an image. Do you have any comment on this?

Thanks,
Ron
 Hi Ron -- JPEGsnoop cannot be used (on its own) to prove authenticity of an image. The program output specifically states that an image may only exhibit a "high probability of being original" since it is known that there are conceivable scenarios in which an altered image may still produce a "signature match". I have described a few of the issues surrounding the proof of an image's originality in the page Identifying Edited Photos. Please feel free to contact me for further details.
2012-01-09Shitansh Sinha
 Great software. :)
2011-12-26ronnie
 this program is a big help but i used the forward image search and ran in to a few warning and errors i was wondering if theres anyway to get around any of the errors or warnings in jpeg snoop and if so if you could make a tutorial with some pro tips in them about how to get around them or something like that and thank you for the program its very useful
 Hi Ronnie -- unfortunately, image corruption is such a challenging issue to deal with that there is never a set single way to fix them. Apart from the "Header Replacement" method I mentioned elsewhere, unfortunately there is no easy list of steps or tips to fix an image.
2011-12-06Someone
 Hi Calvin,

I have been thinking that I can translate your version of JPEGsnoop 1.5.2 to Spanish. If you are agree with my idea, please send me your approval and I will start to it.
 Fantastic... that would be great! Please feel free to send me an email so that we can coordinate.
2011-11-25Simon
 Hi,

thanks for your great piece of software, it helped me a lot to understand how JPEG (de)compression works!

Minor comment: In the "Expanded Form of Codes" section you annotate the "00" code as EOB for both DC and AC which confused me at first, because strictly speaking "00" is not an EOB code when decoding a DC coefficient (it means that the DC coefficient is the same as the last one from the same component but does not necessarily imply that the 63 following AC coefficients are all 0).

Kind regards, Simon
 Thanks for pointing this out. I will remove the EOB annotation for the DC component.
2011-10-29Thomas
 Hi,
One thing that would make JPEGsnoop even better: accepting long filenames. Is that possible?
On my system (Windows XP), JPEGSnoop loads filenames with up to 64 characters. I have to rename files with more than 64 characters if I want to load them (GUI) - and rename back afterwards. Strangely enough, on the commandline, the longer filenames are accepted by JPEGSnoop. But with the GUI, the filenames get truncated ("file not found"). Or am I the only one that has this (small) problem?
 Hi Thomas -- sounds like a limitation of the file commands being used in the code. I'll take a look to see if there are alternate options to support long file names. Thanks!
2011-10-13Joe
 This is a great toll for recover some family pics erased by accident in my SD card.
I recovered successfully some pics, using the "image search fwd", but the image recovered is 120k. The original image is 2.5Mb. Maybe I missed any option to get a bigger image recovered?
I used the "Full IDCT" Option
Thank you very much.
 What you may have recovered is just an embedded JPEG preview image, not the original. The "full IDCT" option won't affect what you are able to detect and extract. In general, if the image search function isn't able to locate the full-size image, then you would need to use more advanced recovery tools to resurrect the original (fullsize). Unfortunately, in many cases it's impossible to recover the fullsize image after corruption has taken place. However, formatted cards can often be "undeleted" with advanced file recovery software (provided you don't continue to use it).
2011-10-02Tom
 I apologize. I had written this question: "So I have a pdf file that was sent to me, but modified through Photoshop prior to being sent to me. We know longer have the original file. I'm getting the "No SOI marker in forward search" alert. Is there any hope of retrieving the original?"

However, the file I am referring to IS a jpeg file, not a pdf. Any advice? Alternative options?
 Ok. In that case, I understand that you'd like to recover the original layered PSD file from the JPEG file. In that case, unfortunately, it will not be possible.
2011-09-25Chad
 This really is the knowledge I needed. Thanks for writing this publish.
2011-09-22Tom
 So I have a pdf file that was sent to me, but modified through Photoshop prior to being sent to me. We know longer have the original file. I'm getting the "No SOI marker in forward search" alert. Is there any hope of retrieving the original?
 Hi Tom -- If you are getting this message then it is likely that the image contained within the PDF has not been encoded in JPEG format (it must be some other format). Without seeing the file, it is hard to know what might have actually been embedded.
2011-09-18Ram
 Hello Calvin,

I just wanted you to know while using this tool i have encountered an image the tool fails to decode.

It is a Baseline Single Scan JPEG T81 Conformance Image. I have raised the same in the BUG list of Jpeg Snoop at source forge.

Nice tool BTW
-Ram
 Hi Ram -- Thanks for identifying this bug and providing a testcase. I suspect that it is due to the component ordering, but will take a look soon.
2011-09-09Tedateo
 This tool is invaluable.
2011-08-12neil
 I have several jpg files which open with this error in Photoshop -

"this document may be damaged (the file may be truncated or incomplete). Continue?"

but they check ok in JPEGsnoop. Any ideas?
 It is hard to say what may be triggering that Photoshop error without examining the file. You may be in luck by using the Export JPEG command from JPEGsnoop (and set "Force EOI"). Does JPEGsnoop report any errors during its processing?
2011-08-10PA
 Do you have any idea when you will release a new version which allow you to extract all JPEG from a corrupted AVI automatically?

Keep up the great work.
 Hi there -- I plan to look into it this weekend.
[UPDATE 08/23/2011: Feature almost complete, just testing]
2011-08-06Chuck
 Have you ever look at virtualdub. It allows for users to alter videos via filters. The filters are designed by the masses and added to the program via a common plug in. Think you might want to make such a tool for image detection?
2011-08-04Chuck
 In an image, is it possible to show what part of an image is not like the rest?
 Hi Chuck -- JPEGsnoop won't be able to determine that for you. It's not entirely clear what sort of comparison you are looking for, but there are tools out there that can detect duplication of content (and perhaps the reverse).
2011-07-08matthew
 how do i save a picture i found using jpeg snoop
 You can save the picture with "Tools -> Export JPEG...""
2011-05-19william wang
 I finally tried this app..this is amazing! the discussion going on here is very technical intensive, but i enjoy it!

Q: since my picture is straight from a camera not in your DB, does your "tools->add camera to DB" uploads the signature to a server(shared to others immediately/stored for later validation)? or is it only local on my computer?
 Glad it's been useful, William! :) If you use "Tools -> Add camera to DB" it will save it to your own local database. If you have enabled "Submit signature to Online DB when User submit" in the "Tools -> Configuration" dialog box, then it can also send the signature to the impulseadventure server (see the quantization tables article).
2011-05-05Alex
 Thank you for your quick reply. I really appreciate it - you've really hit the nail on the head.

However, the reason I believe the image is still in spec is because it actually has three (3) scans (you will see three 0xFF 0xDA markers in the file) - one for each component. Your tool seems to only read one scan.
I don't know if you have come across this kind of format before, but I do believe that this is still an acceptable format.
If this is indeed in spec, then it would be cool if the tool supported this format.

Maybe I am wrong, however and this is not an accepted format - unfortunately I cannot change the way this particular hardware encoder works.

In any case, thanks again for the help. I've learned something new!

Alex.
 Hi Alex -- you're right... I did not see the additional Scans later on in the file. To be honest, I don't recall running into this arrangement before (separate scans per component). Although it's probably quite uncommon, it may indeed still be within spec. The current JPEGsnoop decoder algorithm does not handle this scenario, so I have now added it as bug tracker #3298074 in the SourceForge repository. Thanks for identifying this case, it's really appreciated! -Cal.
2011-05-05Alex
 Hi Calvin,

First off, thank you for this great tool!

I'm using your tool to analyze a jpeg generated by a standard hardware encoder. The JPEG file opens properly in Irfanview and other applications. However, your tool reports many errors such as the one below:

    Lum (Tbl #0), MCU=[23,0]
*** ERROR: Can't find huffman bitstring @ 0x000005A6.4, table 0,
      value [0xff5a9d80]
*** ERROR: Bad huffman code @ 0x000005A6.3
      [0x000005A6.3]: ZRL=[ 0] Val=[    0] Coef=[00= DC]
      Data=[0x 7F F5 A9 D8 = 0b
      (---1---- -------- -------- --------)] ERROR
*** ERROR: Bad scan data in MCU(23,0): Lum DC CSS(0,1) @
      Offset 0x000005A6.4
           MCU located at pixel=(368,8)

Also, the tool cannot display the image properly.

I have a hard time believing that the image is actually corrupt, as all other applications open it without any errors. Could it be that your application does not account for the particular output of this hardware encoder?

I'm trying to understand what is so peculiar about those JPEG files generated by my hardware encoder.

Here's the image the tool is having trouble with:
http://img39.imageshack.us/i/img0559l.jpg/

Thanks in advance!
Alex.
 Hi Alex --

The issue appears to be that your JPEG file has defined 3 image components in the SOF (Start of Frame) but only 1 image component in the SOS (Start of Scan). This causes the decoder to interpret your image as grayscale (and eventually use the wrong tables) when in fact you have a YCbCr image.

Hope that helps!
2011-05-02Brad
 Hello,

I recently lost a hard drive that had some pictures on it that were not backed up. I managed to recover them from the SD card with a program, but the problem is there are a few that were damaged, some that dont even show an image, some that show the thumbnail but not the full size of it. I searched the net thick and thin and this was the only page that seemed to have any in site on repairing corrupt jpegs. If anyone out there can help me or explain how to repair them in jpegsnoop i will be forever grateful.
2011-05-01kay
 Hello,

I have convert a video(avi format) to JPEG format (layer by layer) .
Then i try to scan using JPEGsnoop. The result is

"ASSESSMENT: Class 1 - Image is processed/edited"

Is my way right?
 In JPEGsnoop, you can ignore the image assessment line and just select "Export JPEG" to save out each frame. While it is possible to use JPEGsnoop to convert the AVI into individual JPEG frames, there are far more efficient tools out there to do this. I believe VirtualDub is your best free option.
2011-04-15RAPrice
 I recently got nailed in a Getty Images sting. I normally avoid infringement issues at all costs, but an unmarked low quality jpeg I used turned out to be one of Getty's. Looks like this program could help me ID jpegs I may have used but shouldn't have in prior works--but I need to know how to I.D. Getty encoding.
Thanks.
2011-04-06John T. Haller
 Hi Calvin. I was wondering if we could bundle JPEG Snoop for portable use and post it either here or at PortableApps.com. We don't have a utility like this available and I think it'd be a benefit to a lot of people. I know it's GPLed, but as you have an additional EULA shown on install, I wanted to be sure it was ok with you first. We're happy to host it or do the packaging and have you host it. We'd just add a simple launcher file to move the settings to/from the local PC (preserving any existing ones, of course). It'd all be open source built with all open source tools, too. Thanks!
 Hello John -- that sounds like a great idea and you have my permission to bundle it. I don't mind hosting the packaged version here. Let me know if there is any way that I can help. -Cal.
 
2011-04-05Ram
 Dear Calvin,
First off, Thank you for providing a very informative tutorial.

I have 2 questions.
In chroma sub sampling cases (say 422), in single scan sequential interleaved encoding, in 1 MCU, planes are ordered as YYCbCr. During decoding, I noticed each Y uses the same Cb and Cr.

1 . But is it not more appropriate to replicate Cb and Cr columns to generate an array of size [Y:Y] and reconstruct the image?
2 . Is it mandatory to encode all the time Y, Cb and then Cr. I did not find anything in the specification which talks about plane order. So is it allowed to encode the planes in Cb, Y and then Cr series?
 Hi Ram --
While the JPEG standard does not define the channel usage directly, the JFIF standard (which is what most people refer to when describing "JPEG" images) dictates the YCbCr color space (per CCIR 601) and hence the channel order. As for the chrominance channel replication, I'm not sure I follow your question -- perhaps you can clarify it for me? thx.
2011-03-29Jeff
 Im trying to determine if a picture sent to my phone and transfered to my pc via email is edited or not, snoop says it was. How do I determine if it was edited or just changed via email program transfer.
Thanks
 If your email program resized the image (very common) then it is unlikely that you would be able to determine whether it was edited prior to resizing.
2011-03-21Simon
 How do I edit/correct the Huffman tables? This seems to be what was corrupted
 The best way is to copy over a JPEG header from another file from the same camera and orientation. Have a look at the response I provided on 2008-04-18 in my fixing corrupt JPEGs page for some steps in doing this.
2011-03-16LaurentX
 Thousands of jpg files on my disk has bee modified by an unkown application, making them to grow about 5KB each.

When using your great tool, I can detect 2 changes in the jpg files and the second one seems to come from Adobe. Do you know something about such an issue, particulary from Photoshop or Bridge that I sometime use ?

Thank you in advance.
LaurentX
Here are the 2 detected modifications with my comment between ():
*** Marker: APP1 (xFFE1) ***
  OFFSET: 0x00000014
  length          = 11520 (originaly = 7588)
  Identifier      = [Exif]
  Identifier TIFF = 0x[4D4D002A 00000008]
  Endian          = Motorola (big)
  TAG Mark x002A  = 0x002A

*** Marker: APP1 (xFFE1) *** (did not exist in the original file)
  OFFSET: 0x00002D16
  length          = 2503
  Identifier      = [http://ns.adobe.com/xap/1.0/]
    XMP =
          |< ?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
          |< x:xmpmeta xmlns:x="adobe:ns:meta/">
< rdf:RDF xmlns:rdf="http://www.w3.org/...
 Yes... this was likely done by Adobe Bridge or Photoshop. These application support the writeback of XMP metadata into the image file themselves (if possible) or alternately as an XMP sidecar file. It's worth having a quick look at Adobe's help page on XMP. Generally, this is a harmless modification. That said, I generally prefer to avoid XMP writeback (as I depend on a standalone image catalog tool) and don't want to unnecessarily impact my image backup strategy (as "tagging" would cause these images to show as modified). There have also been some digicams in the past that did not encode their EXIF offsets properly, meaning that attempts to writeback metadata could be complicated.
2011-03-16raven
 I'm trying to implement a JPEG encoder using c++ and I'm using JPEG snoop to help me debug my program. When I open my output JPEG file with JPEG snoop, it does not give any error but the only line that is colored dark red(probably warning?!) is this one:

Altering odd sampling factor for Monochrome.

but I cant open my JPEG file with other applications such as microsoft paint so there's probably something wrong with my program. I'm wondering if anyone can help me with this problem.
 What this means is that you probably have generated a monochrome image with both horizontal and vertical sampling factors equal, but not equal to 1. Without a color component, you probably don't want to specify a non-one sampling factor if you are seeking compatibility with general JPEG decoders. In other words, it is likely that your sampling factor defined in the SOF marker is 0x22 instead of 0x11. Good luck with your encoder!
2011-03-15Lon
 So I tried to process the photo using JPEGsnoop you provided in your response to me dated 3/4/2011. I could not find the GPS information which I'm sure is there. I must not be using one of the features or options correctly. Can you provide a basic run through of how to get GPS data? Thanks for your patience with me.

Lon
 Hi Lon -- there are no additional options to set in JPEGsnoop. If the GPS data is stored in the standard EXIF GPS IFD, then JPEGsnoop will report it similar to what is shown below. However, if the camera has encoded this information in another way, then it may not be presented in a "human-readable" format or easily identifiable. On some cameras that support GPS, it is possible to have this mode turned off, so you may want to check that first.
2011-03-05Anoop
 HI,

I was working on streaming MJPEG video elementary stream over RTP.
The rules for the this are governed by an RFC - RFC 2435. For packetising the MJPEG video to be compatible with the standard, most of the common JPEG headers are removed from the frame and headers specific to those defined by the RFC are added.

I have found the combined usage of JPEG Snoop and Hex editor have been very effective in helping me implement this feature.

I wanted to know if it is possible to insert some user defined data in the bitstream, data which i would not want the decoder to decode. Such type of data are commonly called USER DATA(in case of ES standards for codecs like H264 and MPEG2).
 Hello Anoop -- If you are trying to insert user data into the scan data bitstream, I'm not aware of a way to do this without affecting the image content itself (eg. LSB replacement in image steganography techniques) since there are no "in-band" markers besides the Restart Markers. If you want to insert data per MJPEG frame (ie. per standalone image), then there are quite a few ways to do this. The most common way is to use the unused APPlication JFIF markers. Good luck!
2011-03-04Lon
 Where do I find the GPS information? I have processed a few pics using Snoop and haven't seen it. What does it look like and is it easily converted to physical locations?
thanks
 Here is an example of what the GPS Geotagging information looks like in a JPEG image using JPEGsnoop:
  EXIF IFD0 @ Absolute 0x00000026
    Dir Length = 0x000D
    [ImageDescription                    ] = "SONY DSC                     "
    [Make                                ] = "SONY           "
    [Model                               ] = "DSLR-A100"
--- (trim) ---
    [ExifOffset                          ] = @ 0x018E
    [GPSOffset                           ] = @ 0x0434
    Offset to Next IFD = 0x000004C6

  EXIF GPSIFD @ Absolute 0x00000452
    Dir Length = 0x0007
    [GPSVersionID                        ] = 0.0.2.2
    [GPSLatitudeRef                      ] = "S"
    [GPSLatitude                         ] = 33 deg 56' 0.000"
    [GPSLongitudeRef                     ] = "E"
    [GPSLongitude                        ] = 19 deg 9' 0.000"
    [GPSAltitudeRef                      ] = Above Sea Level
    [GPSTimeStamp                        ] = 0/1

The above was decoded from a sample image available on Wikipedia. You'll see that the location is reported as latitude, longitude and even altitude, which makes it easy to locate!
2011-02-23JP
 Is there a way to clear the " recent files" list?

thank you
 There isn't an actual feature to clear the recent list, but a simple workaround would be to load up 4 dummy files in a row, which will effectively clear any other items out of the recent list.
2011-02-23spudly
 Can there be another embedded image OTHER THAN the EXIF thumbnail? I ask because in some cases I can see an obviously unedited image in the Open File panel (or Windows Explorer) yet any mechanism I use to examine or extract the EXIF thumbnail claims that there isn't one present? The unedited image I can see must be in there somewhere!
 Some digicams support additional oversized thumbnails (in which case there would be a second embedded thumbnail). But if JPEGsnoop doesn't locate any additional thumbnails (when you use Image Search Forward), then it suggests that what you are probably seeing is the cached thumbnail in the Windows folder (see Thumbs.db). You could try deleting the Thumbs.db file in your image folder (may need to "Show Hidden File Types" under the View menu in Windows), which will cause it to be regenerated from the main image files again.
2011-02-18MMB
 Hi there,
I would like to ask if there is an explanation why when we use the tool: Image Search Fwd, it correct the corrupted images, but the result images are in the thumbnail sizes, not full size?

Many thanks in advance.
 What you have extracted is the embedded thumbnail. Note that in many times corrupted images (the main image) often leave the thumbnail intact.
2011-02-17Morgan
 It looks like clipping is not being reported in "RGB clipping in DC". An example with values that get clipped to 255 but don't show up in the count, from an 8x8 4:4:4 image created by the Independent JPEG Group encoder built by macports:

RGB histogram in DC (before clip):
    R  component histo: [min=    0 max=  184 avg=  117.9]
    G  component histo: [min=    0 max=  255 avg=  180.3]
    B  component histo: [min=    0 max=  279 avg=  176.3]

  RGB clipping in DC:
    R  component: [<0=    0] [>255=    0]
    G  component: [<0=    0] [>255=    0]
    B  component: [<0=    0] [>255=    0]

  RGB histogram in DC (after clip):
    R  component histo: [min=    0 max=  184 avg=  117.9]
    G  component histo: [min=    0 max=  255 avg=  180.3]
    B  component histo: [min=    0 max=  255 avg=  175.4]
{oh, and JPEG Snoop is awesome! It's a great complement to Pennebaker & Mitchell's book}

Also check out this image this image which has horrible YCC DC overflow errors, reported at http://stackoverflow.com/questions/3937885/cross-browser-incompatibilities-in-decoding-jpeg-files/5035591#5035591

I've noticed a LOT of images have minor clipping in RGB and a good number (including thirteen13.jpg) have luma clipping. I intend to add some prints to the iDCT code to see how the math actually works out to make that happen, but it's quite surprising. Images from the IJG encoder don't seem to overflow in the Y'CbCr space, but bright Pixelmator images do.

Thanks for your work on JPEGSnoop and your writing at impulseadventure. I never would have understood how the Huffman tables work without your writeup. Also, thanks for open sourcing JPEGSnoop. I plan to port it for Mac OS X, first as a command-line tool with gnu make (not an Xcode project) so it can build for Unix too.

I might make a generic UI interface for file picking and option selection in and histogram and display out. What do you think?

Regards, Morgan
 Thanks Morgan, you're right... A previous update had accidentally disabled the clipping stats. This has been fixed in release 1.5.2. Please let me know if you encounter any further issues.

Porting JPEGsnoop to LINUX and/or Mac would be fantastic as there are a large number of people who have been asking for it. Let me know if you (or anyone else interested in helping with a port) need any pointers.
Thanks!
2011-02-12Joshua
 Hello Calvin,

For the last year or so, myself and several of my staff have been using your tool to identify screenshots from a video game to effectively catch and incriminate hackers. We were fortunate enough to have a game that outputted its screenshots into a folder in which the user can retrieve, upload and send to us with ease. The game engine creates a unique signature allowing us to tell what is and what is not a genuine image being sent into us. We pride ourselves with our accuracy of reports and your tool allows us to keep the edited images out.

We would love to take this to the next step but I would really like to talk to you in a more private atmosphere. I have included my email in this comment, if you would be so kind to respond back via email it would be greatly appreciated.

Thank you for your time and your fantastic tool!

Josh
 Glad to hear it has been useful! Private message sent.
2011-01-16Alexander
 Grateful for the excellent program!

When printing "DCT Matrix =[...], DC coefficient of each matrix is shown as (Diff), and should both (Diff + DC) preceding matrix.

Thanks again!
 Thanks Alexander! Yes, the DCT Matrix printing shows the original DC coefficient (delta) after correcting for the quantization scaling but before taking into account the previous DC coefficient. I felt that this may be more useful than showing the accumulated DC sum, but I could change this.
2010-12-27Taylor
 Hi Calvin,

Firstly, great job with JPEGsnoop, it was able to access a lot of information in some pictures that I wasn't able to before. It is really a nifty program, and even was able to correctly name my camera, although it didn't fully recognize it.

However, I do have one issue. I have several hundred pictures that I am combing through, as it seems the end half of a memory card has been saving bad pictures. I was wondering if there was some way to mass-batch these pictures into automatically loading, scanning forward for the JPEG marker, and then exporting them as a new, corrected JPEG file, either with JPEGsnoop or another program? I'm trying to save the time of going through each one, but so far I haven't found a program that can do it all at once. Any help would be appreciated!
2010-12-17Don
 Hi Calvin,

I encountered a problem trying to open a jpg file that was in a directory that had a European font.

I went to the Microsoft web page to download Windows 7 themes, which include jpg files:
http://windows.microsoft.com/en-GB/windows/downloads/personalize/themes

I download the theme "Czech Spring", and installed it.

The jpg files were copied to a directory on my PC: C:UsersMyUserNameAppDataLocalMicrosoftWindowsThemesCeské jarDesktopBackground
Note: "Ceské jar" has a "u-shaped" punctuation over the "C".

JPEGsnoop couldn't open the file, and instead displayed an error message:
"C:UsersMyUserNameAppDataLocalMicrosoftWindowsThemesCeské jarDesktopBackgroundcz-olwp22.jpg contains an invalid path."

Photoshop CS5 can open the file.

When I moved the file to another directory, JPEGsnoop could open it.
Also when I changed the directory name by deleting the strange "C", JPEGsnoop was able to open the file.

I'm not sure if this is a bug in JPEGsnoop, but it does present a minor difficulty for users.
 Hi Don -- It is quite possible that JPEGsnoop does not handle foreign characters (unicode) properly in file pathnames. I have not looked into unicode support directly, but have now added it to the bug report database. Thanks!
2010-11-27Jaxe
 Is it possible to include the "Image search forward" command in the batch process?

I have some corrupted images and I've found I can manually recover many of them by using this command. However it would take quite a while to manually go through all of them. In fact sometimes there are multiple images (or parts of images) in one file. It would be really useful if the batch process could search the entire file for all possible images to extract.

Thanks for the great app.
 Sounds like a good idea. I have added it to the Feature Request page.
2010-11-27Matz
 Hi Calvin,
I tried to open a jpg-file and got this error:
"not enough Marker MCU Map memory for current image size"
The image is 7516x5476px. It was scanned by some agency and i need to extract the compression level - which will be gone when resizing it with e.g. IrfanView.
What should I do?
Best,
Matz
 Hi Matz -- yes, JPEGsnoop currently does not support 40+ megapixel files, but I don't think it would be too hard to fix. Please file a bug report. In the meantime, you could probably locate a "lossless crop" utility online, cut the dimensions down by a quarter and then reload in JPEGsnoop. Thanks!
2010-11-26Julian
 Fantastic program!! It just managed to recover a few jpgs amongst a large bunch that for whatever reason got corrupted (unreadable) in Win7. Thanks a million!!
2010-11-21CTW
 Great program!

I have a question. Apologies if this is the wrong place to ask.

Is it possible to know the size of the jpeg file from the headers itself (without using the file system metadata)?

Thanks
 Thanks! The short answer is no. Although most JFIF headers include a length field, the Scan Segment (SOS 0xFFDA) does not. Since this segment generally comprises over 99% of the file's overall size and the effective compression ratio is dependent upon the image content, it is not possible to calculate the length from the headers alone.
2010-11-14Rez
 Glad to see JPS going opensource, with the older more open lic. too. One of my small fears is that when a good and unique program is abandoned (as often happens for many different reasons), the source is lost for all time, and recreations never quite hit the mark. However, I couldn't find the source package link (I'm not a coder but I usually archive source for stuff that I use). ???
 Thanks Rez!!

Hopefully I have solved the problem of source code being lost for good :)

You should be able to locate the SVN Source Code repository at the link given on JPEGsnoop source, but I have now also added a link there to the web-based source browser which avoids the need to set up an SVN client.
2010-11-09Tony
 I like your site since it is different than the rest, more technical, more serious.

I want to download jpegsnoop but I'm having trouble, when I click on "Click to download zip". After a long delay it just opens up a page of character codes.

I've had someone else at a different location/pc and they get the same result.

Thank you.
 OOps... I had a temporary error in my webpage. Fixed it now. Thanks for letting me know!
2010-11-08TW
 Nice software.

I have a question:

is there a way to figure out the file size of the jpeg image from the metadata, without relying on file system information from the OS?

Thanks.
 There is no easy way of extracting the file size from the metadata alone. Even with the extracted image dimensions, you cannot predict the effective compression ratio.
2010-11-05TT
 Excellent program! Not 'Portable', though.

Creates directory...
C:Documents and SettingsOwnerApplication DataJPEGsnoop

Creates several registry entries under...
HKEY_CURRENT_USERSoftwareImpulseAdventure

Is there a way that setting could be stored in an INI file in the app directory??

Thanks.
 Good point! In that case, it would seem like a reasonable idea to offer the option of *.INI-based configuration and a separate database file. I'm not quite sure how I would be able to make it an option to preserve the current configuration method as an alternative (eg. how to handle first-run issue). Perhaps the best is to simply only support INI + database file in app directory. I have added this to the project Feature Requests page. Thanks for pointing this out!
2010-11-05Paul
 Hi
Allow me to describe what brought me to look at this product, maybe someone suggest what I should do next.

I have a webcam that takes a picture every hour 365 days a year, I want to string them together into a mini film.
Unfortunately the variety in light levels makes for an unpleasant epileptic experience.
I though I would look for program that would help me sort the photos according to luminescence/contrast to help me select a sequence.
I am currently surmising that if I could output some key facts about the histogram for each jpg to a file then I could sort out the rest in Excel or something.
Given a luminescence estimate for each file I could easily update one of the xtended property fields such as title which means I could sort the thumbnails in Windows Explorer.
Does the batch mode of this program get be close to doing this?
What do you think?
 I suppose it would be possible to have the "Histogram" mode simply report out an average DC component value across the image. Please add this as a feature request to: JPEGsnoop feature requests.
2010-11-03Dean
 will you perhaps develop a version that will extract jp2 (JPEG2000) images from pdf? I have ebooks in pdf with j2 compression that are too compressed and would like to re-format them. thanks again.

 


Leave a comment or suggestion for this page:

(Never Shown - Optional)
 

NOTE: Image repair requests are not accepted. Thanks for your understanding.