Digital Photography Articles

Everything you need to know about digital photography. Articles on digital photography workflow, technical articles, JPEG compression, file naming strategies, photo cataloging software (digital asset management), photo software reviews, equipment reviews and archiving the digital photos on CD or DVD.

Learn how to use programs for organizing digital photographs. Also includes a beginners guide to digital photography or those who are making the change from film to digital.

 

Is there an question or article that you would like to see?
If so, please feel free to leave a comment below!

Latest Photography Articles

 

Latest Comments in Photography Sections

2014-08-10JPEG Chroma Subsampling
Excellent article. I have observed that chroma ...
2014-06-15JPEGsnoop - JPEG Decoding Utility
thank for your page,
2014-05-22JPEGsnoop - JPEG Decoding Utility
Hey, I love the program, but just one quick ...
2014-05-21JPEGsnoop - JPEG Decoding Utility
Fantastic program, very impressive functionality! ...
2014-05-21JPEGsnoop - JPEG Decoding Utility
FFMPEG full scale JPEG YUV 422, 444 cannnot be ...
2014-05-14Digital Photography Articles
Greetings - I'm working on embedded lossless ...
2014-05-14Comparison of shutter lag and startup delay
Good listing. Any details available on the Nikon ...
2014-05-02EXIF Orientation and Rotation
I recently published an android application to ...
2014-04-28JPEGsnoop - JPEG Decoding Utility
Hi Calvin I think you have the knowledge and ...
2014-04-28JPEG Minimum Coded Unit (MCU)
Your description about JPEG MCU is highly ...
2014-04-28What is an Optimized JPEG?
Hello! and thanks for your excellent site. I was ...
2014-04-17Digital Photography Articles
Dear Hass, have you meet the camera with ...
2014-04-08JPEGsnoop - Options
Hi, This is superb program and a livesaver for me!...
2014-04-08JPEGsnoop - Options
Unfortunately, -nogui doesn't work as documented. ...
2014-04-08What is an Optimized JPEG?
Reply to "2012-09-12 JC". "I asked why we don't ...
2014-04-06Comparison of shutter lag and startup delay
Hello! Thank you very much for this excellent ...
2014-04-06JPEG compression
I want to write computer programs for converting ...
2014-04-06JPEGsnoop - Options
I tried using your software to figure out why I ...
2014-03-24File naming strategy for digital photos
Hello I have been reading the article and all of ...
2014-03-22Do-it-Yourself Offsite Backup
I am considering the addition of cloud backup to ...
Gallery
Cusco, Peru

 

 

 

Organizing and Naming Photos

How to be organized when you have thousands of photos on your computer. File name schemes that allow a mix of digital photos, scanned photos and non-photos on the same drive.

Read More

 

Technical Articles

For those interested in knowing the details of how digital photos are stored, articles on how JPEG compression works, and other in-depth tutorials:

 

 

Archiving & Storing Photos

Your entire photo collection can vanish in an instant, so a proper methodology in archiving your photos is crucial. Here you will find strategies to help automate the digital photo backup process.

Read More

 

Importing Digital Photos

Software used to transfer your images from memory cards to your hard drive.

Read More

 

Beginner's Guide to Digital Photography

Articles for those who are either new to photography and want to start with digital, or those who are experienced with film and want to upgrade to digital.

 

 

Digital Photography Equipment

Articles on digital cameras and related equipment.

 

 


 


Reader's Comments:

Please leave your comments or suggestions below!
2014-05-14Mark
 Greetings -

I'm working on embedded lossless rotate code, and thought I had all the pieces right, but don't. I'm able to: 1) decode to the DCT blocks properly, 2) encode those blocks again properly, and 3) transpose and reflect the blocks.
When I semi-deocde, then re-encode with no transformations, I get the original image back fine. But, after transposing/reflecting each block in the MCU and spitting out the MCUs in the new order, I get a junk image. Using both jpegtran & the irfanview plugin to rotate, then JPEGSnoop to look at the MCU blocks, there seems to be more going on than a simple rotate. There are two pieces I'm unsure about - do I need to de-quantize & re-quantize? (I am rotating the quant tables) Second, do I need to do the block-to-block DC accumulation in the lossless rotate? Thanks for your help!
 You shouldn't need to dequantize/re-quantize as that could undermine the "lossless" qualification. I haven't looked at this for a long time, but yes, I think you might have to re-do the DC accumulation as the sequencing of the MCUs will now be different. You should see this if you compare the first few blocks in the JPEGsnoop MCU decode view. Do the rest of the MCU matrix look correct otherwise? Good luck!
2014-04-17Zoe W
 Dear Hass,
have you meet the camera with changeable quantization tables, not several fixed ones?
Recently, I test a database taken by Agfa 505x, and I found 55 different pair of quantization tables! I feel confuse about this situation. Is there some unwritten rules?
Thx!
 Hi Zoe! Yes, I have encountered cameras that produce a wide range of quantization tables. Have a look at my article on variable quantization tables.
2014-02-18Peter
 Hello,
my question is about signatures. I analyzed 34 images in EXIF reader, where model of the camera ís shown as Canon Powershot G12. Then I analyzed all these images in JPEGSnoop with result:
*** Searching Compression Signatures ***

Signature: 01F0A31D3842CFD4B7E09178F141E14B
Signature (Rotated): 016A9F39EDF7E9DCAF8BE822C2266077
File Offset: 0 bytes
Chroma subsampling: 2x2
EXIF Make/Model: OK [Canon] [Canon PowerShot G12]
EXIF Makernotes: OK
EXIF Software: NONE

Searching Compression Signatures: (3347 built-in, 0 user(*) )

EXIF.Make / Software EXIF.Model Quality Subsamp Match?
------------------------- ----------------------------------- ---------------- --------------
CAM:[OLYMPUS OPTICAL CO.,LTD ] [C700UZ ] [ ] No
SW :[IJG Library ] [072 ]
... snip ... ASSESSMENT: Class 4 - Uncertain if processed or original


Then I made images by myself in Canon Powershot G12 and after analysis in JPEGSnoop it gave me different siganture with result:
01A84EC0DDFAE937A0336DB825C85028.
ASSESSMENT: Class 3 - Image has high probability of being original.

What could cause the differences between these signatures? If I suppose that controversal images was edited in graphic editor, why there is no signature of this graphic editor in the result of analysis? Is it possible, that images could be edited in graphic editor which has no signature in the database of JPEGSnoop, for example in Ipod?

Thanks for the answer.
Peter.
 Yes, it is very possible that the first images were edited in a program that wasn't included in the sample signature set. Note that "IJG Library" is used by most/many image editors available today.
2013-05-21dave jordan
 can you explain the meaning behind the terms AC coefficent and DC coefficient?

i know what they are, but what do the terms stand for?

i suspect the answer is lost to history, but ...

is there some analogy to electricity, or what?
 That's right. Apparently, the use of DC & AC originated in the use of the DCT for analyzing electrical currents.
2013-04-15dorian
 i really enjoy the software..thanks but i have a question. Is there a way to verify if ' vidoe captured via cellphone, that is save a a .3gp file, has been edited'? If so, can you please point me in the direction to obtain that application? Again Thank you very much
 Hi Dorian -- it is generally much harder to edit a video without having some very obvious visual "inconsistencies" show up. That said, it may be possible to perform some similar compression or noise analysis on the video stream, but I'm not aware of any utilities that do this. Best of luck with the search!
2013-04-10Jim
 Been searching for a while now for something like this. Very great program!
Since you have a clear understanding of the jpg format i was wondering if you would be interested in a project to code in C that would convert a .bmp file to .jpg. Or course we would pay for it. Let me know
 Hi Jim -- I have something even better for you :) The IJG has published source code to their JPEG encoder library. There, you will see source code for the "cjpeg" executable -- it is a pure C implementation that converts a .bmp to a .jpg file. You'll probably want to strip out a lot of the extras, but it should all be there. More importantly, this source code is probably some of the most robust JPEG encoder code you'll find anywhere.
2012-08-10P.BRUYERE
 Hi Calvin,

thanks for your software, I was telling to a friend to use it and we think to exchange the DB of the various APN, but I do not find a way in the actual version.
Is it a way to export/import my DB to my friend ?

thanksi
 Sure... the database file is called "JPEGsnoop_db.dat" and it is located in a directory specified in the Options -> Configuration menu item dialog. You should be able to update the "Directory for User Database" to point to the directory containing your friend's database, and work from there.
2012-07-05Chris
 Hi

I found your webpage by having troubles with JPEG files, that we cannot open after a data recovery procedure. There is only a white field with a red cross. With JPEGsnoop it says "File did not start with JPEG marker. Consider using [Tools->Img Search Fwd] to locate embedded JPEG". After doing this it says "No SOI Marker found". Is there a way to save the lost information in these JPEG files?

Regards

Chris
 Unfortunately, given the steps you have tried, it is unlikely that you can recover these files without detailed recovery analysis, if at all. Normally, the Image Search Forward will at least detect the embedded JPEG thumbnail within the original JPEG file, in cases where only the header was damaged.
2012-05-08dave
 If apps are counting colors in differernt color spaces, that would certainly explain some of it. But how can it explain discrepancies between orig and rot180 in a single app? My understanding is, there need be no color conversion or any f.p. math in a lossless rotation.
2012-05-05dave jordan
 I have noticed anomolous color counts between different apps and between original jpegs and losslessly rotated ones (the dims were multiples of 8). For instance:

orig has X colors per Irfan (uses IJG) and per ImageMagick (also IJG?)

rot180 of orig has Y colors per both apps, delta ~ 100 colors

orig and rot180 of orig both have Z colors per Gimp (colors->info->color cube analysis). this is what you want to see with lossless! But is it true?

rot180 again and both Irfan and I.M. report X again

the orig test file is subsampled 2x1,1x1,1x1. hmm, suspicion...

-dave
 Interesting... without seeing the files, it's pretty hard to say. Nonetheless, I suspect that the likely cause is differences in the way that the programs report "number of colors" and/or some degree of roundoff error in the color conversion process (YCC to RGB). If they reported number of "YCC" colors, then one could eliminate the above as causes of the difference.
2012-05-04Dennis
 I'm also interested in looking at the 1.53 JPEGSnoop beta if I can trouble you for the download link. I've got a Motion JPEG file that seems to be getting "re-interpreted" when displayed via some video playback utilities (or their codecs) so I'm hoping to dump the raw image sequence to compare. :)
 For sure... sent you an email. Hope it helps!
2012-04-08vlad
 Greetings.

I am writing a jpeg decoder, and I can only decode my test image
partially. It seems that before second MCU's chroma there are
some bits in scan stream that I dont know what they are.
First MCU luma and hroma and second luma is decoded whithout error.

Currently I am aware of :
1)huffman coded run/size byte
2)size(length) coded coefficient(number)
3)stuff bytes and restart markers

Is there anything else in huffman coded scan stream?

Please help.
Many thanks.
 The only other things that you are likely to find in the scan stream are: 1) Restart markers (look for RSTn in the ITU-T spec) or 2) custom bits from proprietary encoders (some webcams do this).
2012-03-18dj
 Hi Calvin, I love using JPEGsnoop to sort through embedded images, but I have over a million files to sort through after a catastrophic system crash. Could you send me the link the beta of 1.5.3?
 Sure. Private email sent to you.
2012-02-04Ignoreland
 I like the search forward and back functions in JPEGsnoop; it's perfect for extracting screenshots from MJPEG video.

I actually have two questions.
First off, I've been using a combination of Irfaniew and Jpegcrop to losslessly optimize the images on my new laptop. (I've been doing it from the start, so it's not such an overwhelming process.) I've hit a snag though with some CMYK jpegs. Irfanview only optimizes the Huffman tables, it won't convert to progressive coding (unless you re-save the image completely). Jpegcrop will perform a progressive conversion, but it only accepts RGB colorspace jpegs. Here's the JPEGsnoop output for the jpg transform plugin Irfanview uses:
*** Searching Executable for DQT ***
Filename: [Jpg_transform.dll]
Size: [72192]
Searching for DQT Luminance tables:
DQT Ordering: pre-zigzag
Matching [JPEG Standard]
Searching patterns with 1-byte DQT entries
Searching patterns with 2-byte DQT entries
Searching patterns with 2-byte DQT entries, endian byteswap
Searching patterns with 4-byte DQT entries
Searching patterns with 4-byte DQT entries, endian byteswap
DQT Ordering: post-zigzag
Matching [JPEG Standard]
Searching patterns with 1-byte DQT entries
Searching patterns with 2-byte DQT entries
Searching patterns with 2-byte DQT entries, endian byteswap
Searching patterns with 4-byte DQT entries
Searching patterns with 4-byte DQT entries, endian byteswap
Done Search
******
Is there some way to tweak the plugin to apply a progressive conversion as well? Or do you know of a tool that will do such a thing with CMYK images?

My second one is more of a hypothetical, but bear with me.
Conventionally, the only truly "8-bit" jpegs are simply grayscale images where the cBcR data has been discarded. I've been wondering though, whether it would be possible to create 256 color "sepia-tone" jpegs by performing a grayscale conversion and then inserting flat, mono-color cBcR data?
 Interesting problem... For the first item, I'm not aware of a tool that will perform the progressive conversion on CMYK JPEGs. CMYK is often not supported very well by many utilities. As for the second question, yes, I believe one could mimic sepia-tone output by doing grayscale conversion (retaining Y intact, not blending the channels as most photographers prefer) and then adding in the two dummy channels with a DC offset at the first MCU. Note that most tools that output grayscale will leave you with a single component, so you'd have to add back in the CrCb components first and then insert the "EOB" huffman codes for each of the CrCb MCUs, which may be a challenge. Easiest method might be to use a tool that converts RGB -> grayscale, then reconvert it back with grayscale -> RGB. At that point one would have to modify the DC offset for the first MCU for CrCb, but that may require shifting the entire file by several bits, depending on the DC offset you're looking for.
2011-04-11lewis
 Hello cal

jpegsnoop - great tool

One aspect of jpegs i am not entirely sure on is how to define Quantization tables within a jpeg.
For example if i have an image with the following Q Tables:
*** Marker: DQT (xFFDB) ***
  Define a Quantization Table.
  OFFSET: 0x00000C0E
  Table length = 67
  ----
  Precision=8 bits
  Destination ID=0 (Luminance)
    DQT, Row #0:   5   3   3   5   7  12  15  18
    DQT, Row #1:   4   4   4   6   8  17  18  17
    DQT, Row #2:   4   4   5   7  12  17  21  17
    DQT, Row #3:   4   5   7   9  15  26  24  19
    DQT, Row #4:   5   7  11  17  20  33  31  23
    DQT, Row #5:   7  11  17  19  24  31  34  28
    DQT, Row #6:  15  19  23  26  31  36  36  30
    DQT, Row #7:  22  28  29  29  34  30  31  30
    Approx quality factor = 84.93 (scaling=30.13 variance=1.05)
 
*** Marker: DQT (xFFDB) ***
  Define a Quantization Table.
  OFFSET: 0x00000C53
  Table length = 67
  ----
  Precision=8 bits
  Destination ID=1 (Chrominance)
    DQT, Row #0:   5   5   7  14  30  30  30  30
    DQT, Row #1:   5   6   8  20  30  30  30  30
    DQT, Row #2:   7   8  17  30  30  30  30  30
    DQT, Row #3:  14  20  30  30  30  30  30  30
    DQT, Row #4:  30  30  30  30  30  30  30  30
    DQT, Row #5:  30  30  30  30  30  30  30  30
    DQT, Row #6:  30  30  30  30  30  30  30  30
    DQT, Row #7:  30  30  30  30  30  30  30  30
    Approx quality factor = 84.93 (scaling=30.15 variance=0.29)
And the Hex values of the DQT marker at 0xDB is 58, with the next 4 bytes consisting of the hex values 59, 5a, 00 and 00.

How exactly do these hex values breakdown and define the above tables?

Any help would be greatly appreciated as i cannot find any good examples of this after hours of searching.
 Starting with 0xFFDB (DQT marker), you'll find the following:
  • 2B: Section length
  • Table 0:
    • 1B: Destination ID
    • 64B: Quantization Matrix (in zig-zag order)
    • ...
I wonder if it is possible that you may have been decoding a different portion of your file as I would have expected you to see the following (given the tables above):
0xFF DB 00 43 00 05 05 05 07 06 07 0E ...
2011-04-06lewis
 Hi,

Im doing some research on quantization tables, how they change depending on which device takes the image.

Having read a few papers, i stumbled accross this presentation

http://www.dfrws.org/2008/proceedings/p21-kornblum_pres.pdf

On slide 24, it is mentioend that there are 99 known standard Q Tables etc.

Is this true? Was there an initial set of Q Tables created by JPEG but nowadays software generates its own.

If so, is there a list of these tables somewhere?
 It may be a bit misleading to state that there are 99 standard Q tables... Annex K of the ITU-T standard defines a single example set of luminance and chrominance tables that were based on psychovisual thresholding and derived empirically. The IJG quality formula provides an easy means of generating new quantization matrices based on these "example" tables using a single scaling factor (1-100).

But software JPEG encoders, cell phones and digital cameras are and were always free to select their own quantization tables for encoding the JPEG bitstream. Devising one's own quantization table that gives the best tradeoff in optimizing file size versus human perception quality is probably quite a challenge, and is likely the reason that some encoders stuck with the Annex tables in combination with the scaling factor formula (which provides more control over final quality). More recent digicams have attempted to generate / select an appropriate quantization matrix on the basis of image content or file size (see my page on variable quantization). That methodology presents new challenges to signature-based encoder deduction techniques.
2011-03-09amecs
 Hi, I need to discover if a TIFF image was previously saved as JPEG.
I tested a DNG file saved a TIFF, reopened, saved a JPEG quality 11, closed and reopened and saved as TIFF again.
JPEGsnoop report No SOI marker found in fwd search.
Can I do this.
 To detect that a TIFF image was previously saved as JPEG, it may be best to perform an analysis of JPEG blocking compression artifacts (there are some free utilities on the web that can do this). This will look for discontinuities around the block boundaries (usually 8x8 or 16x8 pixels in size). Unless the TIFF file has embedded a JPEG file within it, you probably won't be able to use JPEGsnoop to locate anything within it.
2011-02-25Brent
 I have been trying to learn how to decode the header information in a JPEG by reading the raw hex and have only met with partial success. It seems like from what I have read that it should be possible to find the width and height in pixels of an image.

I stumbled onto your site and you seem to reference this a few times, but I could not find the information. Any help you could provide would be most appreciated.
 If you are trying to locate the image dimensions from within a hex editor, you can try searching for 0xFFC0 and then skip the next three bytes. Following that are two 16-bit values, the first for the height and the second for the width.

For example:
... 1A 1A FF C0 00 11 08 07 98 0A 20 03 ...
In the above, the height is 0x0798 (1944) and width is 0x0A20 (2592).

Have a look at JPEGsnoop as it should help you identify this and other related details.
2011-01-19john
 i'd really like to give snoop a try, but can't figger out how to install it. any instructions for us less-tech savvy operators?
 There's actually no installation required! Simply unzip the download, double-click on the application icon and then select an image to analyze. Or, you can drag a photo on top of the application icon to automatically load it.
2011-01-16Rob
 Hi Calvin,

... I have a technical question for you about JPEG compression, I've looked through the documentation and done a fair bit of Googling but couldn't find the answer.

What I was curious about was the "YCC Clipped" notes in the "Decoding SCAN Data" section - I seem to get these even with images in Photoshop saved at the highest level.

Am I correct in guessing that it is a symptom of the quantisation? Because the un-quantised-table isn't exactly as the quantised table, it's possible that the Inverse-DCT will result in a table which doesn't only contain values between 0-255?

Thanks,
Rob.
 Hi Rob -- The "YCC Clipped" warnings indicate that the cumulative YCC values have exceeded the normal range (eg. +/- 1024) prior to scaling. Normally, the result of the RGB color conversion step can fit within the YCC range. In example images I have created in PS (including full-gamut RGB color wheels), I don't recall seeing YCC clipping. Were these RGB or CMYK? Were they tagged with a profile?

Because JPEG quantization will round to the nearest value (not truncate), large coefficients in the quantization matrix could lead to larger excursions in the YCC range. However, I wouldn't have expected that this would be possible with Photoshop set at the highest level (12, where coefficients are set to 1, from what I recall). The only other causes that come to mind are color space) conversions or corruption in the differential decoding.
2011-01-12Andrea
 Thanks for your time, in the meanwhile I resolved many of my problems. Now I generate huffman tables runtime (before I used huffman tables hardocded) and I think my problem was just the AC's Huffman table. Now I can create my own jpeg files (only grayscale of course). The only "strange" thing that happen to me is that I have to shift all pixel values of 127. Basically my input pixels take values from 0 to 255, but to ensure that the file is decoded correctly I have to shift everything in order to have values from -127 to 127 and I don't understand how it's posbbile ... but it works. Anyway congratulations for the very useful software JPEGsnoop
 Glad you figured it out Andrea!!
2010-12-27Andrea
 I'm a student and I'm writing my own software to encode images from a little camera. I have only grayscale images and I need a personalized software to encode my images. I found JPEGsnoop very useful to test my software output. I think now my software writes correct jpeg files but I can't open them with softwares like gimp or others and JPEGsnoop extract corrects Huffman tables but gives me an error @ 0x00000184.2 but my file has only 386 (=0x182) bytes so the byte #184 dows not exist. Could I send you my file to have a suggestion on what's wrong with it?
Thanks in advance
 Hi Andrea -- sure... if you post another private msg with your email, I'll see what I can do once I get a bit of spare time.
2010-12-03Melinda
 I had a picture CD made on vacation in New Zealand. When I put the CD in my laptop at home some of the picture files do not show, I just get an error message saying "Can not read from the source file or disk." My guess is that these pictures I can't see now, are ones that I previously downloaded off of the camera (onto a computer on vacation) just to look at some, before I made CDs for all the pics. Could they have deleted from the memory card (by looking at them/saving them to a computer) OR did they get corrupted? I'm trying to decided if there is a tool to fix whatever is the problem and recover them.
 Hi Melinda. Sorry to hear that your images no longer open from the picture CD. I'm not totally clear from your question about what must have happened, but it sounds like the images may have been fine before writing them to the CD. Compact discs can become damaged and give you these sort of errors. There are also some cases where a bad filename has triggered this error. For the first case, I recommend searching the internet for CD recovery utility, as sometimes they are able to re-read the file in alternate ways that may let you recover the file.
2010-10-15KARTIK PODUGU
 i would like to read any good technical article about JPEG-XR, just like JPEG.
 
2010-10-01T.W.P.
 Calvin,

I am interested in having JPEGsnoop included in the operating procedures for a standards setting organization. Can you please reply with contact information so we can talk.
 Private message sent.
2010-09-19Peter
 Hi Calvin,

I have been doing my final year project on JPEG decoder working for a Multi-processors running on a FPGA. I am now desparately running out of time. I am trying to replace my Loeffler IDCT with a Chen-Wang IDCT. I found such an algorithm already written and so I tried incorporating that with my own code. However the image looks very sketchy and the colour is very off. This code is written for the MPEG decoder.

My question is simple: is the idct used in mpeg cross-compatible with that used for jpeg decoding?

Thank you so much for your time,
Peter.
 Although I have not spent any real time looking at MPEG coding, I had assumed that the DCT (at least for I-frames) would be the same as for JPEG, but I don't know for sure. Presumably you are handling the chroma subsampling correctly?
2010-08-29homecoming dresses
 I wanted to thank you for this great read!! I definitely enjoyed every little bit of it. I have you bookmarked your site to check out the new stuff you post.
2010-08-09Matt
 I just wanted to comment on how great and informative I have found this site to be. I stumbled upon your JPEG rotation article through a Google search, and then noticed how many other useful articles you have on managing digital photographs. When I saw that you have sections on bodybuilding and RC helicopters, I was shocked because these are also hobbies of mine. I am going to have to spend some time reading the rest of your articles. Really an amazing site, thanks.
2010-08-02John
 Hello Calvin!

I was wondering - if different types of cameras leave their own quantization tables, is it possible that different cameras of the same model might leave their own unique signature?

In other words, does every camera have a unique signature?

All the best!
~ John
 No... every camera (of the same model and settings) does not have its own independent "signature", at least with respect to the JPEG compression quantization tables.
2010-04-16Charan Shetty
 Do you have any program or any links for detecting tampered image based on quantization table. Kindly reply please.
 JPEGsnoop is able to perform some basic detection in this manner.
2010-04-01Jay
 Thanks Cal. I knew you had the answer I needed.

While I have you "on the phone," so to speak, my friend and I were doing some Photochops on a photo he took of his new car to virtually "pimp it out."

He was running CS3 on an OS2 Mac. while I was running CS2 on a Vista PC.

The only ground rules was to produce an image with the same dimensions, print resolution, and Save as 08 quality.

We ran both of them through JPEGSnoop - just in case - and the only difference I found was that his JPG had an APP0 marker and mine did not.

Is that due to any difference in CS2 vs. CS3 or is it an issue with Photoshop on the Mac vs. Photoshop on the PC ?

Thanks!
2010-03-13william wallace
 Hi Sir,

First, thanks for creating such an informative website as well as your amazing JpegSnoop!

Next, my question. I guess this is more in the area of Digital Image Analysis, but I thought I'd ask it here...is it possible to determine the quality of a jpeg image (low quality and blurry versus high quality and detailed) by examining the jpeg file itself (instead of viewing the image)?

The reason I ask is that I have a folder of approx. 10,000 jpeg files and I'd like to sort them from highest quality to lowest quality, but I'd like a way to sort them automatically without having to view each individual picture and adding metadata to each file (which would be quite time consuming). Thanks for any info!

-Bill
 Thanks! Interesting question. I am sure that there are specialized tools out there that can assess the degree of "bluriness" for a given photo, but I'm not aware of any. Without being too fancy, it may be possible to determine the number of MCUs that have have an increased proportion of high-frequency image components (suggesting that the image has areas with more detail). This type of analysis is not foolproof, but could help differentiate images that are mostly blurred versus those that contain a lot of detail. However, this would not catch issues where the focus was wrong (ie. autofocus locked on the background instead of your subject). JPEGsnoop does count the frequency of huffman entries, but it would need to be presented in a different manner for it to be useful as described above. So, in short, no the current tool won't directly help you with this search :)
2010-03-05fc
 Calvin,

I have been playing recently with python to make a similar tool to work under linux, however I have a small query about Quantization tables, we seem to be getting slightly different results and I was wondering if you could take a look and see what might be wrong.

Contact me for more info if your interested.
2010-03-04Jay
 Hey Cal:

I wanted to follow up on my question last year about detecting layers in a flattened image (Yes, I know that is part of the process in saving a PSD to a JPG. Photoshop has that warning every time you go to the SAVE screen).

I have tried using error level analysis to find the answer, but from my understanding of it, there has to be at least one resave of a JPG along with a physical change to the original image, for it to spot anything.

Here is the scenario:

I received a letter of recommendation, an email with attachment, from a chap I wish to hire. He claims that he had it scanned for him.

It looks like it was created in MS Word, using Arial, and then printed off on white stationary with a black and white business logo at the top and an address line along the bottom after the closing.

The letter was not signed (somewhat of a red flag).

The text part of the letter looked darker than the logo -- which may mean that the logo was in color or greyscale -- but I could not find anything unusual - like repeating patterns, different blocking, ringing artifacts, etc. - that would lead me to conclude the text was added to an existing JPG.

After I "Snooped" it, it identified the software as CS2 from the Exif data, but the compression signatures came out as something else, like IrFanView.

Given the Photoshop IRB that JPEGSnoop found with a matching pair of signatures that are not from PS, I take this ro mean that the scan may have been made within Photoshop, saved as a JPG (let's say "Save at 60"), and then dragged through IrFanView for a resave.

Do you think that the resave was to hide any evidence of layers?

I also tried using pixel equalization to spot any unnaturally light or dark pixels, as well as Edge Detection.

I am thinking that this dude scanned a sheet of blank letterhead (creating one layer) and then created a text layer to merge with the first when saving it as a flattened JPG.

But, how do I prove that?

Thanks for your help.

------

One thing that may not be apparent is that when you save an image with Photoshop, all layers are usually "flattened" in generating the single JPEG image. This single image uses only one set of quantization tables. In fact, if you resave an image with various tools, it is generally only the last tool that will define the quantization tables used to encode the final JPEG image.

So, to answer your question: while JPEGsnoop can often identify that an image was generated by Photoshop, it cannot infer further details about the layers that were used to generate the image (at least on the basis of the quantization tables). Therefore, cropping will make no difference to the quantization tables used (in fact it may change them, depending on the tool that you are using for the cropping).

The best way to accomplish what you are after is to use a tool that supports one of the many imaging algorithms that can decompose the error level analysis and other characteristics that point to the fact that an image was created from a composite.
 I can't help you with the "proof", as that image analysis can best be answered by others. However, to answer your question regarding the mismatch of quantization tables (signature) from the Photoshop IRB metadata: it is quite possible that Photoshop was indeed used previously and then the file was again resaved using another graphics editor (ie. other than Photoshop). The Photoshop signatures are reasonably unique.
2009-10-01Ivey
 I have a DVD and i am trying to see if it has been altered the person in the DVD said that some one changed the DVD but i can not see any sign of it being altered by eye. Can anyone tell me if this program can tell me this information. Or is there anyway to tell. Thankyou!!
2009-08-02Newtodigital
 Your site is a great resource for someone like myself who is transitioning from film to digital. The articles about naming files and folders and cataloging sw are particularly helpful. They get me to think before clicking (and losing) thousands of shots.

Further down the road, I will be interested in web galleries, either custom or pre-fabed, and POD photobooks. There are plenty of these around, but comprehensive comparative reviews like the articles mentioned above are hard to come by. If they are already at your site, what are the links? If not, perhaps you can provide some. TIA.
 Thanks! I have recently began experimenting with photobook services, and may be able to provide some input on these at a later date (especially if I find a decent competing service to try -- right now I've been using blurb). I do have a number of web design-related articles I've considered writing, and may consider expanding coverage in that area soon. Thanks for the great suggestions!
2009-02-23Jay
 Here's a task for which I'm interested in using JPEGsnoop, and i'd like your advice on how to use it.

I have an image that was saved in Photoshop that I suspect was created from two layers, and I think I know which parts of the image belonged to each layer.

Id there a way to compare two separate parts of an image to see if they originated from separate layers?

For example, the 2nd image/layer looks like it came from an image with a lower quality setting (higher compression ratio) than the first. If I cropped off parts of each image from the merged product of the two, would they produce different tbles in JPEGsnoop?
 Hi there Jay --

One thing that may not be apparent is that when you save an image with Photoshop, all layers are usually "flattened" in generating the single JPEG image. This single image uses only one set of quantization tables. In fact, if you resave an image with various tools, it is generally only the last tool that will define the quantization tables used to encode the final JPEG image.

So, to answer your question: while JPEGsnoop can often identify that an image was generated by Photoshop, it cannot infer further details about the layers that were used to generate the image (at least on the basis of the quantization tables). Therefore, cropping will make no difference to the quantization tables used (in fact it may change them, depending on the tool that you are using for the cropping).

The best way to accomplish what you are after is to use a tool that supports one of the many imaging algorithms that can decompose the error level analysis and other characteristics that point to the fact that an image was created from a composite.

I have current plans to incorporate some basic imaging algorithms into upcoming versions of JPEGsnoop, which may address some of what you're looking for. Until then, a search for error level analysis tool may reveal some alternatives.
2009-02-16Jay
 You've created a great program that can capture most signs of editing. Where it can be fooled is by in-camera editing features that modify an original image but do not change the camera's signature.

In other words, you are correct by your guarded use of the terms, "high-probability of being original" and "you cannot prove conclusively that a photo is an original," which I take to mean that it is easier to identify an altered photo.

BTW, in terms of a percentage range, what exactly do you mean by "high probability?"

Thanks, and keep up the good work
 Thanks! You're right in that JPEGsnoop could possibly mark an image as being original even though in-camera editing facilities may have been used. There is no way that these edits can be detected with any certainty, and this wasn't the intention of the image assessment algorithm. Since in-camera editing is (and will likely remain) extremely limited in capability, this doesn't present much of an issue for those aiming to detect more hidden edits.

Yes, it is far easier to "prove" that an image has been edited than that it hasn't. One of the main reasons why I do indeed refrain from indicating that an image is guaranteed to be original is that I know for a fact that it is possible to fake out such analysis.

As a proof of concept, I have succeeded in doing this myself. However, the chance that someone has gone through this challenging process is quite remote. I have never seen any examples of this "in the wild", so I would peg the probability or originality extremely high. Of course, if you are dealing with a situation where someone wanted to cover their tracks at all costs, anything is possible.
2009-01-19Ben
 I like the look of the JPEG fixing information. Have you attempted to do the same with RAW files?

I have a set of Canon Raw .CR2 files that became corrupted whilst travelling. The embedded previews come up fine, but then when it goes to process the larger preview it comes up with the corruption. I suspect it would something along the lines you were saying with JPEGs and interuuption of the bitstream.

I suspect the corruption occured when transferring images either from CF card to storage drive, or from the storage drive to laptop.

Regards,
 Hi there Ben -- I have not had a look at recovery of Canon RAW files, as I believe they have been encoded in JPEG Lossless mode, which I have yet to review. I'll add it to my list of features to take a look into. You are correct in that the integrity of the embedded preview is virtually unrelated to the integrity of the primary RAW image.
2008-09-08susie
 I am looking for a camera that would take professional size pictures I can sell but I need them to be large enough. I wanted to know what size megapixel camera would take a 12MB size picture?
2008-01-09Lensmeister
 I hope someone can help. What I really need is advice on how to/or what to use as a database/catalogue for my photos. I have over 10,000 digitial images and over 800 rolls of 35 mm film that I am scanning. What I need is something that I can have a thumbnail of the images, all the exif, and other data I store (the 35 mm I want to make items similar to EXIF).

I am totally lost ... can someone help please ?
Thanks :)
2007-11-24Thomas Kaiser
 JPEG Guru needed for improving Linux webcam driver :-)

I developed the Linux driver for the Pixart PAC7311 webcam chip and have a problem with picture quality. Pixart claims to use "standard" JPEG but they do not. They included special markers after (or before) each MCU which I must remove to decode the picture.
You can find some information here http://www.kaiser-linux.li/index.php?title=PAC7311

If you are intrested helping me I can give you more detailed information. Just drop me a mail :-)

Thomas
 Hi Thomas -- I'm always interested in challenges. Send me some example frame captures from the device and I'll see what I can figure out. Inserting markers after every MCU seems excessive, so I'm curious as to why this is being done.
2007-10-01Ken
 Hi Calvin,

Thanks for updated JPEGsnoop software. It seems like a handy tool when you need to "go deep" into a file.

While I am still researching software for my workflow, my journey has led me to again reconsider shooting RAW. Unfortunately, I have read far too many articles both for and against it for my own good. What are your feelings towards RAW? You always seem to be talking about JPEG files, but I was not clear if you shoot RAW or JPEG. And, if you do shoot RAW, what are your thoughts on RAW converters? I would be very curious to hear your thoughts and opinions.

Thanks,

--Ken
 Great question -- Yes, I have certainly focused a lot of my technical interest on JPEG, as it is more prevalent and often misunderstood in internet forums. Since it is a reasonably "open" standard, unlike the proprietary RAW formats, it's actually possible to understand how it works :)

I do shoot RAW, but I generally limit it to times when I a) intend to deliver the shots to others (e.g. a modeling shoot / sporting event), b) place significant importance on the images or c) find myself in difficult lighting conditions. The rest of the time I often choose to shoot JPEG. While the RAW images from my camera (Canon 40d) are certainly nicer and provide far more processing latitude than the JPEGs, one can't forget to factor in the additional processing time that the RAW format usually entails, along with the increase in storage requirements (especially when you keep both RAW and the converted JPEGs). Some people have managed to dial in a RAW processing workflow (importing, converting, XMP tagging, buddy-file synchronization, etc.) that is reasonably efficient, but I am not convinced that my current toolset is what I will ultimately end up using.

When I travel for extended periods of time (e.g. 1 month+) in remote regions, I am also more apt to shoot JPEG because it is more important for me to have enough redundant portable storage to keep copies of the images safe -- file space is already a difficult issue on the road.

As for RAW converters, I have not yet completed a fair evaluation of the different products on the market (Photoshop ACR, Lightroom, Bibble, Phase One, etc.). When I do, I may be in a better position to share my opinions and refine my own RAW workflow.
2007-09-26 
 Great site. Any chance you could add an RSS or ATOM feed?
 Good idea... It has been suggested to me in the past, and since I wrote my own CMS system it's going to take a little bit of work. I think that I would prefer to use that instead of the notification system that I have built in the meantime. Thanks!
2007-08-20Kal
 I'm trying to decide between a DSLR (pentax K100D) with say 50-200 or 70-300 Tamron or Sigma lens and Sony H7 or similar strong Optical Zoom. I'll be visiting Kruger Nnational Park later and wuld like to be able to take some wildlife Zoom photos as we are to remain in the car while in the park. You gave us a formula to convert things lens specs to zoom in X units. So..is the 300 in 28-300 better than the 300 70-300 for my purpose? What about comparing a 50-200 versus 70-300. I guess my question is whether it is the ratio that is important or the larger number in the lens i.e. 300 (versus 200).

Also to get the same zoom as say a 70-300 on the DSLR what zoom should I look for in a Point and shoot (recognize of course the quality will be lower in P&S)?
 For wildlife, you're going to want a decent long telephoto lens. While in Etosha and Moremi (in southern Africa), I shot from the vehicle with my 100-400/L and tended to stay in the 250-350 range (this is on a DSLR with a 1.6x multiplier, which is common). You might find that 200mm is a little short, and that the 300 provides you with more opportunities. When comparing lenses, unless there is a significant difference in optical quality, you should start by making sure that you get the range that you need (i.e. is 200 enough, or do you need 300mm?) In your case, I would probably opt for the longer zoom (70-300).

Ignoring the maximum focal length for a moment, it's important to keep in mind that it is much harder to produce a zoom lens with high image quality across a large range versus one that only covers a narrower range. In other words, the 28-300 lens has a 10.7x (300/28 = 10.7), while the 70-300 lens has a 4.3x. For a similar price point, it is a pretty safe assumption that the 70-300 will provide better image quality across the range than the 28-300 superzoom. Nowadays, the superzooms are becoming better, but I would tend to stay away from them unless I was truly requiring an all-in-one for convenience.

As an aside, if you are taking photos from the vehicle, consider buying a bean bag that you can place over the window sill, as you won't be able to use a tripod.

To get an equivalent of 70-300 (on a DSLR) in a point & shoot camera, one would look for an "35mm equivalent focal length" of 110-480, which is very unlikely (this assumes that your DSLR has a focal length multiplier of 1.6x). Note that the rating will say "equivalent" as the sensor size is much smaller in a point & shoot camera, making the real focal length comparison not as simple.
2007-07-17Darren
 Hi again. It would be great if you could expand the photo section to include articles about digital video too. You mention that you also take video footage and this is an area I'm just getting into, but haven't much of an idea about the best way to do things.

Thanks!
 Thanks for the suggestion! I will definitely give it some thought -- While I have recently decided to start writing a series of technical web design articles, digital video is certainly another area of interest too. I'll put it on the list!
2007-05-20JL
 Hi,
Can you tell me if there is any program that can scan my imported pictures to get the accurate date? We just had our computer cleaned up and when I put them back on the computer a ton of them (which had been taken a long time ago with a different, cheaper digital camera) got imported incorrectly. I'm currently trying a trial version of adobe 5.0.Thanks so much :)
 In what way did you find that the photos were imported incorrectly? I assume that you are seeing that the File Created Date is recent, when you expected it to be the date that the shot was taken. If so, when you right-click on one of these photos and then click on the Summary tab then the Advanced button, do you see the correct date listed in one of the properties (e.g. Date Picture Taken)?

If you see the correct date here, then you're in luck. That means that the image's EXIF information still retained the original photo date. There are many utilities that will use the EXIF date information to update the other file timestamps as well. The most popular utilities to do this are: Exifer, jhead, and AttributeMagic. I'll add this to the list of articles to write, as this is a very common need for digital photographers. For example, you might have forgotten to set the date on your digital camera (or travelled to a different time zone), and later need to update all your photos.
2007-05-07S
 Noticed your post on dpreview forum. If you're still interested in example files then send me a mail. I can provide any number of Sony H7 files, including Gregrag McBeth color chart and ISO res chart.

Also, thanks for an interesting site. Hadn't seen it before, but you've done a great job providing a lot of useful info. Downloaded JPEGsnoop and checked several H7-files. I was wondering how they managed to compress all the files so small and with so little variation in file size and it seems like you've got the explanation. Found a lot of variation in the "Approx quality factor" from around 97% to 87% on the files I checked.
 Thanks! Email sent.
2007-01-26Rachel
 First of all, fantastic site! Should me mandatory for anyone using digital photography. I've learned so much.

Have you looked into any of the online photo storage/sharing sites? I'm interested in using one for an additional back up of my collection and would like to be able to easily share with friends and family. There are so many, it's hard to know which one to choose. With your expertise, I wondered what you thought?
 Thanks Rachel! I have used pbase in the past (smugmug was another close alternative) and found it to be a great source for getting critical input on photos from other photographers. That said, the interface is not totally intuitive, so I wouldn't recommend it for those who are looking for something very easy to use.

As I made the transition to host my own photo galleries, I never invested much time in comparing all of the various photo sharing sites out there, but I would suggest that you have a look at the following two review pages:
You mentioned an interest in using these photo sharing sites as a backup for your photo collection. Generally, I don't think they do a particularly good job at that because of the fact that they often store much-reduced versions of your photos, not the originals. Some do keep fullsize originals, but you will have to be very mindful of your file storage limit restrictions.

A much better plan would be for you to create a backup of your photo collection yourself (on hard drives, DVD-R, remote backup, etc.) instead of relying on a photo sharing site to achieve this goal.
2006-12-30Justin
 Are there any software applications that allow you to sync the categories etc with 2 computers?

 


Leave a comment or suggestion for this page:

(Never Shown - Optional)