{"id":264,"date":"2006-10-10T00:14:49","date_gmt":"2006-10-09T15:14:49","guid":{"rendered":"https:\/\/regex.info\/blog\/photo-tech\/nef-compression"},"modified":"2006-10-10T00:35:04","modified_gmt":"2006-10-09T15:35:04","slug":"nef-compression","status":"publish","type":"page","link":"https:\/\/regex.info\/blog\/photo-tech\/nef-compression","title":{"rendered":"A Qualitative Analysis of NEF Compression"},"content":{"rendered":"\n<!--TECH-->\n<div class=\"robots-nocontent\" style=\"border: 2px solid #FF8080;\n            float: right;\n            padding: 0 1em 1em 1em;\n            margin: 10px 0 1em 1em;\n            display: inline;\">\n<p style='white-space: nowrap'><b>My Tech-Related Photography Posts<\/b><\/p>\n<ul style='margin:0; font-size:80%'>\n  <li><a href='\/blog\/lightroom-goodies\/ipad-howto2'>My Lightroom-to-iPad Workflow<\/a><\/li>\n  <li><a href='\/blog\/lightroom-goodies\/'>Lightroom Goodies<\/a> (lots of plugins)<\/li>\n  <li><a href='\/blog\/photo-tech\/color-spaces-page1\/'>Digital Image Color Spaces<\/a><\/li>\n  <li><a href='\/blog\/other-writings\/online-exif-image-data-viewer\/'>Online Exif (Image Data) Viewer<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/focus-chart\/'>Jeffrey's Autofocus Test Chart<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/calendar\/'>Photoshop Calendar-Template-Building Script<\/a><\/li>\n  <li><a href='\/blog\/lightroom-goodies\/ipad-howto'>How to Prepare Photos for an iPad<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/nef-compression\/'>A Qualitative Analysis of NEF Compression<\/a><\/li>\n  <li><a href='\/blog\/2007-08-24\/554'>Tripod Stability Tests<\/a><\/li>\n<\/ul>\n<p style='font-size:85%; margin:10px 0 0 0'><a href=\"\/blog\/photo-tech\/\">more<\/a>...<\/p>\n<\/div>\n<!--\/TECH-->\n\n<p>\n\nNikon's advanced digital cameras can save images in three file formats:\njpeg, straight Raw, or compressed Raw. Whether compressed or not, the <a\nhref='http:\/\/en.wikipedia.org\/wiki\/RAW_image_format'>Raw files<\/a> are\nnamed with the &#8220;.NEF&#8221; (Nikon Electronic File) extension. With the 10.2\nmegapixel <a href='\/blog\/2006-01-10\/130'>D200<\/a>, an\nuncompressed <span class='nef'>NEF<\/span> is about 16 megabytes; the compressed <span class='nef'>NEF<\/span> is about half\nthat size. The reduction in size is appealing, but does it come at a\nreduction in quality?\n\n<\/p>\n<style>\nspan.nef { font-size: 95% }\n<\/style>\n<p>\n\nIn an excellent writeup, Fazel Majid looks at the <a\nhref='http:\/\/www.majid.info\/mylos\/weblog\/2004\/05\/02-1.html'>mathematical\nramifications of <span class='nef'>NEF<\/span> compression<\/a> from a theoretical point of view. The\nsummary is that while compression does not change the dynamic range, it\n&#8220;compresses 12 bits worth of data into 9.4 bits worth of\nresolution,&#8221; and due to the way images are encoded, the lost\nresolution is in the highlights. That's fine in theory, but what does this\nmean for an actual image? Can a <i>human<\/i> ever tell the difference?\n\n<\/p>\n\n<p style='margin-left:10px; border-left: solid 2px #444; padding-left:10px'><b>UPDATE:<\/b> Nikon's newer cameras (D3, D300, D700, ...)\nalso have a compressed mode that is lossless, making three types of NEF files that they can produced\n(uncompressed, lossy compressed, and lossless compressed). This post is <b>not<\/b> about the new lossless NEF,\nwhich should be, well, lossless.<\/p>\n\n<p><b>The Test<\/b><\/p>\n\n<p>\n\nTo see exactly what information is lost during compression, I set up a\nhigh-contrast scene in my living room. I took a single picture, from which\nI had the camera create both a compressed <span class='nef'>NEF<\/span> and\nan uncompressed <span class='nef'>NEF<\/span>. Thus, I had two files whose\nsensor data was pixel-for-pixel identical except for whatever differences\nwere caused by the compression.\n\n<\/p><p>\n\n(To be clear, I did not take snap two similar pictures; both the compressed\n<span class='nef'>NEF<\/span> and uncompressed <span class='nef'>NEF<\/span> files were the result of the same, single shutter\nrelease.)\n\n<\/p><p>\n\nTo illustrate the full range of detail captured in each <span class='nef'>NEF<\/span>, I &#8220;developed&#8221;\nthem three ways, producing three jpegs each:<\/p>\n\n<ul>\n  <li>A &#8220;dark&#8221; version, to bring out highlight detail<\/li>\n  <li>A &#8220;mid&#8221; version, balancing highlights and shadows<\/li>\n  <li>A &#8220;bright&#8221; version, to bring out shadow detail<\/li>\n<\/ul>\n\n<p>These images are shown in the mini application further down on this\npage. Mouseover the &#8220;dark,&#8221; &#8220;mid,&#8221; and\n&#8220;bright&#8221; buttons to see that version, in either the\n&#8220;full&#8221; (no compression) column, or the &#8220;compressed&#8221;\ncolumn.<\/p>\n\n<p>(I should note here that because my livingroom is mostly white, I\nsprinkled a bunch of my three-year-old's toys all around to add some color.\nThe house is not normally this cluttered!)<\/p>\n\n<p>I didn't expect to be able to see any differences at the 8-bit jpeg\nlevel, and indeed there are no visual difference between the pairs: the\ndark version produced from the compressed <span class='nef'>NEF<\/span> looks identical to the dark\nversion produced from the uncompressed <span class='nef'>NEF<\/span>, and the same goes for the mid\nand bright pairs as well.<\/p>\n\n<p>But since there clearly <i>are<\/i> differences (the compression is not\nlossless, so by definition, there must be differences), I moved into the\nrealm of raw sensor data to investigate further...<\/p>\n\n<p><b>Raw Sensor Data<\/b><\/p>\n\n<p>\n\nI compared the two <span class='nef'>NEF<\/span>s in 16-bit mode, producing\na &#8220;mask&#8221; image that's black where the two <span\nclass='nef'>NEF<\/span>s are identical, and green where there are\nsensor-level differences of any magnitude. Mouseover the &#8220;Mask&#8221;\nbutton to see the mask. Switch back and forth between the\n&#8220;Mask&#8221; and one of the &#8220;Mid&#8221; versions and notice\nthat dark areas of the scene have no differences. Fazel's analysis of the\ncompression (that it's lossy in the highlights) is spot on.\n\n<\/p><p>\n\nNote that even though I've shown three versions from each <span\nclass='nef'>NEF<\/span> (dark, mid, and bright), there's only one mask\nimage. Remember that the dark\/mid\/bright versions are <i>derivations<\/i> of\nthe <span class='nef'>NEF<\/span> that I happened to choose to illustrate\nthe various kinds of detail in the image. The mask compares the raw sensor\ndata of each <span class='nef'>NEF<\/span> directly.\n\n<\/p><p>\n\nThe mask image shows <i>where<\/i> there are differences, but not the\n<i>magnitude<\/i> of the differences, which is the real question. So, I then\nproduced a 16-bit &#8220;difference&#8221; image. For each color channel of each pixel,\nI subtracted the data from one <span class='nef'>NEF<\/span> from the other. The result is pure black\nwhere there are no differences (where the compression is lossless), and\nvarious colors of increasing brightness for increasing differences\/loss.\nThis is the &#8220;true difference&#8221; image.\n\n<\/p><p>\n\nYou can mouseover the &#8220;True&#8221; button below to see the\ntrue-difference image, but I'll save you the trouble by telling you that\nit's black: the differences are all so subtle that they become black when\nrepresented in an 8-bit jpeg.\n\n<\/p><p>\n\nBut there <i>are<\/i> differences, and I want to see them, so I created an\nimage with the differences exaggerated. <i>Wildly<\/i> exaggerated.\n<b>Spectacularly<\/b> exaggerated. Not only did I stretch the differences so\nthat they filled the whole 8-bit color space of the jpeg used here, but in\nreducing the size (from the 3,900 &times; 2,616 original), each pixel of\nthe result received the <b>combined<\/b> differences from 36 pixels. This\nmeans that the differences are further enhanced by an extra factor of 36.\n\n<\/p><p>\n\nMouseover the &#8220;Exaggerated&#8221; button so see that version.\n\n<\/p>\n\n<div style='margin-top: 20px; margin-left:auto; margin-right:auto; text-align:left; height:460px; width:660px; position:relative; z-index:1; margin-bottom:0px; padding-bottom:0px; border:3px solid #ABA'>\n\n<div id='pic3_sm_img1' class='pix'><img class='raw' indexhint='noindex'  id='img000' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Under-Exposed exposure: from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic3_sm_img2' class='pix'><img class='raw' indexhint='noindex'  id='img001' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Under-Exposed exposure: from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic3_sm_img3' class='pix'><img class='raw' indexhint='noindex'  id='img002' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: mask showing location of compression-related differences<\/div>\n<div id='pic3_sm_img4' class='pix'><img class='raw' indexhint='noindex'  id='img003' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: compression-related differences wildly exaggerated<\/div>\n<div id='pic3_sm_img5' class='pix'><img class='raw' indexhint='noindex'  id='img004' src='\/i\/cs\/Loading.gif'    width='650' height='436'\/><br\/>Under-Exposed exposure: compression-related differences<\/div>\n<div id='pic3_sm_img6' class='pix'><img class='raw' indexhint='noindex'  id='img005' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Under-Exposed exposure: from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic3_sm_img7' class='pix'><img class='raw' indexhint='noindex'  id='img006' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Under-Exposed exposure: from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic3_sm_img8' class='pix'><img class='raw' indexhint='noindex'  id='img007' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic3_sm_img9' class='pix'><img class='raw' indexhint='noindex'  id='img008' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n \n<div id='pic2_sm_img1' class='pix'><img class='raw'           src='\/i\/raw\/pic2\/full-sm.jpg'        width='650' height='436'\/><br\/>from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic2_sm_img2' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp-sm.jpg'        width='650' height='436'\/><br\/>from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic2_sm_img3' class='pix'><img class='raw'           src='\/i\/raw\/pic2\/diff_mask-sm.gif'   width='650' height='436'\/><br\/>mask showing location of compression-related differences<\/div>\n<div id='pic2_sm_img4' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_wide-sm.jpg'   width='650' height='436'\/><br\/>compression-related differences wildly exaggerated<\/div>\n<div id='pic2_sm_img5' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_raw-sm.jpg'    width='650' height='436'\/><br\/>compression-related differences<\/div>\n<div id='pic2_sm_img6' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full_bright-sm.jpg' width='650' height='436'\/><br\/>from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic2_sm_img7' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp_bright-sm.jpg' width='650' height='436'\/><br\/>from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic2_sm_img8' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full_dark-sm.jpg'   width='650' height='436'\/><br\/>from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic2_sm_img9' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp_dark-sm.jpg'   width='650' height='436'\/><br\/>from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n \n<div id='pic1_sm_img1' class='pix'><img class='raw' indexhint='noindex'  id='img036' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Over-Exposed exposure: from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic1_sm_img2' class='pix'><img class='raw' indexhint='noindex'  id='img037' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Over-Exposed exposure: from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic1_sm_img3' class='pix'><img class='raw' indexhint='noindex'  id='img038' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: mask showing location of compression-related differences<\/div>\n<div id='pic1_sm_img4' class='pix'><img class='raw' indexhint='noindex'  id='img039' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: compression-related differences wildly exaggerated<\/div>\n<div id='pic1_sm_img5' class='pix'><img class='raw' indexhint='noindex'  id='img040' src='\/i\/cs\/Loading.gif'    width='650' height='436'\/><br\/>Over-Exposed exposure: compression-related differences<\/div>\n<div id='pic1_sm_img6' class='pix'><img class='raw' indexhint='noindex'  id='img041' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Over-Exposed exposure: from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic1_sm_img7' class='pix'><img class='raw' indexhint='noindex'  id='img042' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Over-Exposed exposure: from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic1_sm_img8' class='pix'><img class='raw' indexhint='noindex'  id='img043' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic1_sm_img9' class='pix'><img class='raw' indexhint='noindex'  id='img044' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n\n\n<div id='pic3_c1_img1' class='pix'><img class='raw' indexhint='noindex'  id='img009' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic3_c1_img2' class='pix'><img class='raw' indexhint='noindex'  id='img010' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic3_c1_img3' class='pix'><img class='raw' indexhint='noindex'  id='img011' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic3_c1_img4' class='pix'><img class='raw' indexhint='noindex'  id='img012' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic3_c1_img5' class='pix'><img class='raw' indexhint='noindex'  id='img013' src='\/i\/cs\/Loading.gif'    width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop of compression-related differences<\/div>\n<div id='pic3_c1_img6' class='pix'><img class='raw' indexhint='noindex'  id='img014' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic3_c1_img7' class='pix'><img class='raw' indexhint='noindex'  id='img015' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic3_c1_img8' class='pix'><img class='raw' indexhint='noindex'  id='img016' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic3_c1_img9' class='pix'><img class='raw' indexhint='noindex'  id='img017' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n \n<div id='pic2_c1_img1' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full-c1.jpg'        width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic2_c1_img2' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp-c1.jpg'        width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic2_c1_img3' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_mask-c1.gif'   width='650' height='436'\/><br\/>100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic2_c1_img4' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_wide-c1.jpg'   width='650' height='436'\/><br\/>100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic2_c1_img5' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_raw-c1.jpg'    width='650' height='436'\/><br\/>100% crop of compression-related differences<\/div>\n<div id='pic2_c1_img6' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full_bright-c1.jpg' width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic2_c1_img7' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp_bright-c1.jpg' width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic2_c1_img8' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full_dark-c1.jpg'   width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic2_c1_img9' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp_dark-c1.jpg'   width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n \n<div id='pic1_c1_img1' class='pix'><img class='raw' indexhint='noindex'  id='img045' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic1_c1_img2' class='pix'><img class='raw' indexhint='noindex'  id='img046' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic1_c1_img3' class='pix'><img class='raw' indexhint='noindex'  id='img047' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic1_c1_img4' class='pix'><img class='raw' indexhint='noindex'  id='img048' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic1_c1_img5' class='pix'><img class='raw' indexhint='noindex'  id='img049' src='\/i\/cs\/Loading.gif'    width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop of compression-related differences<\/div>\n<div id='pic1_c1_img6' class='pix'><img class='raw' indexhint='noindex'  id='img050' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic1_c1_img7' class='pix'><img class='raw' indexhint='noindex'  id='img051' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic1_c1_img8' class='pix'><img class='raw' indexhint='noindex'  id='img052' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic1_c1_img9' class='pix'><img class='raw' indexhint='noindex'  id='img053' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n\n\n<div id='pic3_c2_img1' class='pix'><img class='raw' indexhint='noindex'  id='img018' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic3_c2_img2' class='pix'><img class='raw' indexhint='noindex'  id='img019' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic3_c2_img3' class='pix'><img class='raw' indexhint='noindex'  id='img020' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic3_c2_img4' class='pix'><img class='raw' indexhint='noindex'  id='img021' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic3_c2_img5' class='pix'><img class='raw' indexhint='noindex'  id='img022' src='\/i\/cs\/Loading.gif'    width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop of compression-related differences<\/div>\n<div id='pic3_c2_img6' class='pix'><img class='raw' indexhint='noindex'  id='img023' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic3_c2_img7' class='pix'><img class='raw' indexhint='noindex'  id='img024' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic3_c2_img8' class='pix'><img class='raw' indexhint='noindex'  id='img025' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic3_c2_img9' class='pix'><img class='raw' indexhint='noindex'  id='img026' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n \n<div id='pic2_c2_img1' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full-c2.jpg'        width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic2_c2_img2' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp-c2.jpg'        width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic2_c2_img3' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_mask-c2.gif'   width='650' height='436'\/><br\/>100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic2_c2_img4' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_wide-c2.jpg'   width='650' height='436'\/><br\/>100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic2_c2_img5' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_raw-c2.jpg'    width='650' height='436'\/><br\/>100% crop of compression-related differences<\/div>\n<div id='pic2_c2_img6' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full_bright-c2.jpg' width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic2_c2_img7' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp_bright-c2.jpg' width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic2_c2_img8' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full_dark-c2.jpg'   width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic2_c2_img9' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp_dark-c2.jpg'   width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n \n<div id='pic1_c2_img1' class='pix'><img class='raw' indexhint='noindex'  id='img054' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic1_c2_img2' class='pix'><img class='raw' indexhint='noindex'  id='img055' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic1_c2_img3' class='pix'><img class='raw' indexhint='noindex'  id='img056' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic1_c2_img4' class='pix'><img class='raw' indexhint='noindex'  id='img057' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic1_c2_img5' class='pix'><img class='raw' indexhint='noindex'  id='img058' src='\/i\/cs\/Loading.gif'    width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop of compression-related differences<\/div>\n<div id='pic1_c2_img6' class='pix'><img class='raw' indexhint='noindex'  id='img059' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic1_c2_img7' class='pix'><img class='raw' indexhint='noindex'  id='img060' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic1_c2_img8' class='pix'><img class='raw' indexhint='noindex'  id='img061' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic1_c2_img9' class='pix'><img class='raw' indexhint='noindex'  id='img062' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n\n\n<div id='pic3_c3_img1' class='pix'><img class='raw' indexhint='noindex'  id='img027' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic3_c3_img2' class='pix'><img class='raw' indexhint='noindex'  id='img028' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic3_c3_img3' class='pix'><img class='raw' indexhint='noindex'  id='img029' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic3_c3_img4' class='pix'><img class='raw' indexhint='noindex'  id='img030' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic3_c3_img5' class='pix'><img class='raw' indexhint='noindex'  id='img031' src='\/i\/cs\/Loading.gif'    width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop of compression-related differences<\/div>\n<div id='pic3_c3_img6' class='pix'><img class='raw' indexhint='noindex'  id='img032' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic3_c3_img7' class='pix'><img class='raw' indexhint='noindex'  id='img033' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic3_c3_img8' class='pix'><img class='raw' indexhint='noindex'  id='img034' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic3_c3_img9' class='pix'><img class='raw' indexhint='noindex'  id='img035' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Under-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n \n<div id='pic2_c3_img1' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full-c3.jpg'        width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic2_c3_img2' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp-c3.jpg'        width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic2_c3_img3' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_mask-c3.gif'   width='650' height='436'\/><br\/>100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic2_c3_img4' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_wide-c3.jpg'   width='650' height='436'\/><br\/>100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic2_c3_img5' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/diff_raw-c3.jpg'    width='650' height='436'\/><br\/>100% crop of compression-related differences<\/div>\n<div id='pic2_c3_img6' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full_bright-c3.jpg' width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic2_c3_img7' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp_bright-c3.jpg' width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic2_c3_img8' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/full_dark-c3.jpg'   width='650' height='436'\/><br\/>100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic2_c3_img9' class='pix'><img class='raw' indexhint='noindex'  src='\/i\/raw\/pic2\/comp_dark-c3.jpg'   width='650' height='436'\/><br\/>100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n \n<div id='pic1_c3_img1' class='pix'><img class='raw' indexhint='noindex'  id='img063' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic1_c3_img2' class='pix'><img class='raw' indexhint='noindex'  id='img064' src='\/i\/cs\/Loading.gif'        width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span><\/div>\n<div id='pic1_c3_img3' class='pix'><img class='raw' indexhint='noindex'  id='img065' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop of mask showing location of compression-related differences<\/div>\n<div id='pic1_c3_img4' class='pix'><img class='raw' indexhint='noindex'  id='img066' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop: compression-related differences wildly exaggerated<\/div>\n<div id='pic1_c3_img5' class='pix'><img class='raw' indexhint='noindex'  id='img067' src='\/i\/cs\/Loading.gif'    width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop of compression-related differences<\/div>\n<div id='pic1_c3_img6' class='pix'><img class='raw' indexhint='noindex'  id='img068' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic1_c3_img7' class='pix'><img class='raw' indexhint='noindex'  id='img069' src='\/i\/cs\/Loading.gif' width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (brighter, to show shadow detail)<\/div>\n<div id='pic1_c3_img8' class='pix'><img class='raw' indexhint='noindex'  id='img070' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from uncompressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n<div id='pic1_c3_img9' class='pix'><img class='raw' indexhint='noindex'  id='img071' src='\/i\/cs\/Loading.gif'   width='650' height='436'\/><br\/>Over-Exposed exposure: 100% crop from compressed <span class='nef'>NEF<\/span> (darker, to show highlight detail)<\/div>\n\n<div style='visibility:hidden' id='shadow' class='shadow'><\/div>\n<div style='visibility:hidden' id='note_full' class='note' onclick='ClearNote()'><div class='outernote'><p>\n\n   <b>These buttons show representative jpeg views from the two <span\n   class='nef'>NEF<\/span>s. The three dark\/mid\/bright buttons on the left\n   are for the uncompressed <span class='nef'>NEF<\/span>, while the three\n   on the right are for the compressed <span class='nef'>NEF<\/span>.<\/b>\n\n   <\/p><p>\n\n   There are three versions for each <span class='nef'>NEF<\/span> to\n   illustrate the detail in different areas of the high-contrast image.\n\n   <\/p><p>\n\n   Differences due to compression should theoretically show up when\n   comparing the pairs (e.g. the right-side Dark with the\n   left-side Dark), but no differences are apparent because the sensor-level differences\n   are too subtle to show up in an 8-bit jpeg.\n\n   <\/p><p><\/p><p><\/p><div class='click_to_close'>(click window to close)<\/div>\n\n<\/div><\/div>\n<div style='visibility:hidden' id='note_mask'  class='note' onclick='ClearNote()'><div class='outernote'><p>\n\n   <b>The &#8220;Difference Mask&#8221; button shows which pixels have <i>any<\/i> sensor-level difference between the compressed and uncompressed raw files.<\/b>\n\n   <\/p><p>\n\n   To be clear, the mask is related the two original raw files &ndash;\n   compressed and uncompressed &ndash; derived from a single\n   shutter-release event. The mask is not directly related to the six\n   dark\/mid\/bright views, which are merely derived from the raw files.\n\n   <\/p><p>\n\n   The mask differences are checked in 16-bit, raw sensor-data mode.\n\n   <\/p><p><\/p><p><\/p><div class='click_to_close'>(click window to close)<\/div>\n<\/div><\/div>\n<div style='visibility:hidden' id='note_true'  class='note' onclick='ClearNote()'><div class='outernote'><p>\n\n   <b>The &#8220;True Differences&#8221; button shows the difference\n      between two raw files &ndash; compressed and uncompressed &ndash;\n      derived from the same shutter release.<\/b> The difference is computed\n      with raw 16-bit sensor data, prior to any gamma or color correction.\n\n     <\/p><p>\n\n      The 16-bit-mode result was then converted to an 8-bit sRGB jpeg.\n      Because the differences are far too minor to show up in an 8-bit\n      color space, the image shown here is black.\n\n     <\/p><p><\/p><p><\/p><div class='click_to_close'>(click window to close)<\/div>\n<\/div><\/div>\n<div style='visibility:hidden' id='note_ex'  class='note' onclick='ClearNote()'><div class='outernote'><p>\n\n   <b>The &#8220;Exaggerated Diff&#8221; button shows the raw 16-bit\n      differences between the two raw files &ndash; compressed and\n      uncompressed &ndash; expanded to fill the entire 8-bit RGB range of\n      an sRGB jpeg.<\/b> This is to vividly illustrate the difference\n      between the two raw files. Any detail that can be seen in this\n      version represents detail lost during <span class='nef'>NEF<\/span>\n      compression.\n\n  <\/p><p>Remember that the true lost detail is <i>exceedingly<\/i> more\n         subtle than shown in this exaggerated version; see the text for details.\n\n   <\/p><p><\/p><p><\/p><div class='click_to_close'>(click window to close)<\/div>\n<\/div><\/div>\n\n<div style='visibility:hidden' id='note_crop'  class='note' onclick='ClearNote()'><div class='outernote'><p>\n   <b>The &#8220;Crop&#8221; buttons select what part of the original photo is viewed with the nine &#8220;View&#8221; buttons on the right.<\/b>\n<\/p><p>\n      The &#8220;Full Scene&#8221; button selects a small-sized version of the original 10.2 megapixel (3,900 &times; 2,616) image.\n      The other buttons select 100% crops of selected areas of interest in the full scene.\n   <\/p><p><\/p><p><\/p><div class='click_to_close'>(click window to close)<\/div>\n<\/div><\/div>\n\n<div style='visibility:hidden' id='note_pic'  class='note' onclick='ClearNote()'><div class='outernote'><p>\n   <b>The three &#8220;Photo&#8221; buttons select which photo all other buttons\/views work with.<\/b>\n\n   <\/p><p>Each photo is a separate shutter-release event. The two\nnon-&#8220;primary&#8221; shots were over\/under exposed by two stops,\nresulting in a lot of highlight\/shadow clipping. <span class='nef'>NEF<\/span> compression is lossy\nin the highlights, so the over-exposed photo shows the most differences.\n\n   <\/p><p><\/p><p><\/p><div class='click_to_close'>(click window to close)<\/div>\n<\/div><\/div>\n<\/div>\n\n<style>\ndiv.pix {\n   position:absolute;\n   left:5; top:5;\n   display:none;\n   font-size: 85%;\n}\n.note {\n  height:320;\n  position:absolute;\n  left:60;\n  top:70;\n  width:540;\n  background-color:#A84;\n  border-top:    solid 3px #CA6;\n  border-right:  solid 3px #CA6;\n  border-bottom: solid 3px #652;\n  border-left:   solid 3px #652;\n}\n.prettybutton {\n  padding: 0px 10px;\n  color: black;\n  margin-right:20px;\n  background-color:#CA7;\n  font-size: 90%;\n  border-top:    solid 3px #CA6;\n  border-right:  solid 3px #CA6;\n  border-bottom: solid 3px #652;\n  border-left:   solid 3px #652;\n}\ndiv.shadow {\n   position:absolute;\n   left:55;\n   top:82;\n   width:540;\n   height:320;\n   background-color:black;\n   opacity:0.65\n}\ndiv.click_to_close {\n   position:absolute;\n   bottom:15px;\n   font-size: 85%;\n   text-align:center;\n   width:540;\n   color:#555\n}\ndiv.outernote {\n  text-align: left;\n  height: 295;\n  margin: 10px;\n  padding: 0 20px;\n\n  border-bottom: solid 3px #CA6;\n  border-left:   solid 3px #CA6;\n  border-top:    solid 3px #652;\n  border-right:  solid 3px #652;\n}\n\n.b     { padding: 1px 5px; border: #FF4040 1px solid; margin: 5px; color: white; background-color: #808080  }\n.xb    { padding: 1px 5px; border: gray    1px solid; margin: 5px; color: black; background-color: white    }\n\n.pb     { padding: 1px 5px; border: #FF4040 1px solid; margin: 5px; color: white; background-color: #808080  }\n.xpb    { padding: 1px 5px; border: gray    1px solid; margin: 5px; color: black; background-color: white    }\n\n.cb     { padding: 1px 5px; border: #FF4040 1px solid; margin: 5px; color: white; background-color: #808080  }\n.xcb    { padding: 1px 5px; border: gray    1px solid; margin: 5px; color: black; background-color: white    }\n.h      { padding-bottom: 5px }\n\n<\/style>\n\n<table border='0' cellpadding='0' cellspacing='0' style='margin: 0 auto'>\n<tr valign='top'>\n<td id='t1' style='visibility:hidden; border-top:0; margin-top:0'>\n   <table cellspacing='5' cellpadding='0' style='margin-right:20px'>\n     <tr><td align='center' class='h'><b>Photo<\/b><br\/><small><i>click<\/i> to select<\/small><\/td><\/tr>\n     <tr><td style='font-size:85%' class='xpb' id='bp_pic3' onclick='OnPic(\"pic3\")'>Under-Exposed<\/td><\/tr>\n <tr><td style='font-size:85%' class='xpb' id='bp_pic2' onclick='OnPic(\"pic2\")'>Primary<\/td><\/tr>\n <tr><td style='font-size:85%' class='xpb' id='bp_pic1' onclick='OnPic(\"pic1\")'>Over-Exposed<\/td><\/tr>\n\n     <tr><td onclick='ToggleNote(\"note_pic\")' align='center' style='font-size:80%' onmouseover='HMOver(this)' onmouseout='HMOut(this)' >(click for help)<\/td><\/tr>\n   <\/table>\n<\/td>\n<td id='t2' style='visibility:hidden; border-top:0; margin-top:0'>\n   <table cellspacing='5' cellpadding='0' style='margin-right:20px'>\n     <tr><td align='center' class='h'><b>Crop<\/b><br\/><small><i>click<\/i>&nbsp;to&nbsp;select<\/small><\/td><\/tr>\n     <tr><td align='center' style='font-size:90%' id='cb_sm' onclick='OnCrop(\"sm\")'>Full&nbsp;Scene<\/td><\/tr>\n     <tr><td align='center' style='font-size:85%' id='cb_c1' onclick='OnCrop(\"c1\")'>100%&nbsp;Crop&nbsp;1<\/td><\/tr>\n     <tr><td align='center' style='font-size:85%' id='cb_c2' onclick='OnCrop(\"c2\")'>100%&nbsp;Crop&nbsp;2<\/td><\/tr>\n     <tr><td align='center' style='font-size:85%' id='cb_c3' onclick='OnCrop(\"c3\")'>100%&nbsp;Crop&nbsp;3<\/td><\/tr>\n     <tr><td align='center' onclick='ToggleNote(\"note_crop\")' style='font-size:80%' onmouseover='HMOver(this)' onmouseout='HMOut(this)'>(click for help)<\/td><\/tr>\n   <\/table>\n<\/td>\n<td align='center'>\n <table cellspacing='5' cellpadding='0'>\n     <tr><td align='center' colspan='5' class='h' style='border-bottom: dotted 1px gray'>\n\n<span id='reset' class='prettybutton' onmouseover='HMOver(this)' onmouseout='HMOut(this)' onclick='Reset()' style='visibility:hidden'>reset<\/span>\n\n\n<b>View<\/b>&nbsp;&nbsp;<small>(<i>mouseover<\/i> to select)<\/small><\/td><\/tr>\n     <tr align='center'>\n         <td rowspan='3'>\n             <table style='padding: 0 5px; background-color:#333'>\n               <tr align='center' style='font-size:90%'><td><b>Full<\/b><\/td><td style='padding: 0 5px'><b>Compressed<\/b><\/td><\/tr>\n               <tr align='center' ><td class='xb' id='but8' full='1' onmouseover='OnButton(8)'>Dark<\/td>\n                   <td class='xb' id='but9' comp='1' onmouseover='OnButton(9)'>Dark<\/td><\/tr>\n\n               <tr align='center' ><td class='xb' id='but1' full='1' onmouseover='OnButton(1)'>Mid<\/td>\n                   <td class='xb' id='but2' comp='1' onmouseover='OnButton(2)'>Mid<\/td><\/tr>\n\n               <tr align='center' ><td class='xb' id='but6' full='1' onmouseover='OnButton(6)'>Bright<\/td>\n                   <td class='xb' id='but7' comp='1' onmouseover='OnButton(7)'>Bright<\/td><\/tr>\n\n               <tr><td colspan='2' onclick='ToggleNote(\"note_full\")' align='center' style='font-size:80%' onmouseover='HMOver(this)' onmouseout='HMOut(this)' >(click for help)<\/td><\/tr>\n\n             <\/table>\n         <\/td>\n         <td colspan='3' align='center' style='border-bottom:solid 1px #C8D8C8'><b>Difference<\/b><\/td><\/tr>\n         <tr>\n           <td><div class='xb' id='but3' onmouseover='OnButton(3)' align='center'>Mask<\/div><\/td>\n           <td><div class='xb' id='but5' onmouseover='OnButton(5)' align='center'>True<\/div><\/td>\n           <td><div class='xb' id='but4' onmouseover='OnButton(4)' align='center'>Exaggerated<\/div><\/td>\n        <\/tr>\n <tr>\n   <td onclick='OnButton(3);ToggleNote(\"note_mask\")' align='center' style='font-size:80%' onmouseover='HMOver(this)' onmouseout='HMOut(this)' >(click for help)<\/td>\n   <td onclick='OnButton(5);ToggleNote(\"note_true\")' align='center' style='font-size:80%' onmouseover='HMOver(this)' onmouseout='HMOut(this)' >(click for help)<\/td>\n   <td onclick='OnButton(4);ToggleNote(\"note_ex\")'   align='center' style='font-size:80%' onmouseover='HMOver(this)' onmouseout='HMOut(this)' >(click for help)<\/td>\n<\/tr>\n\n <\/table>\n<\/td><\/tr>\n<\/table>\n\n<div id='log' style=\"display:none; border:red 5px dotted; font-size: 80%\">LOG:<\/div>\n<script>\nfunction HMOver(obj)\n{\n    obj.style.color= \"red\";\n}\nfunction HMOut(obj)\n{\n    obj.style.color= \"black\";\n}\n\n\nfunction log(msg)\n{\n  var obj = document.getElementById(\"log\");\n  obj.innerHTML += \"<\" + \"br\/\" + \">\" + msg;\n  obj.style.display = \"\";\n}\nfunction Log(msg)\n{\n  var obj = document.getElementById(\"log\");\n  obj.innerHTML = msg;\n  obj.style.display = \"\";\n}\n\nvar other_images_loaded = 0;\n\nfunction ToggleMore()\n{\n   if (!other_images_loaded) {\n       other_images_loaded = 1;\n       Load_pic3(); Load_pic1();;\n   }\n   var obj = document.getElementById(\"t1\");\n   var but = document.getElementById(\"ShowMore\");\n   if (obj.style.visibility == 'hidden')\n   {\n        obj.style.visibility = 'visible';\n        but.innerHTML = 'Other Photos Enabled (Click to Disable)';\n   }\n   else\n   {\n        obj.style.visibility = 'hidden';\n        but.innerHTML = 'Click Here To Enable Other Photos';\n   }\n   HMOut(but);\n}\n\nfunction ShowMore()\n{\n   if (document.getElementById(\"t1\").style.visibility == 'hidden')\n     ToggleMore();\n}\n\nfunction ToggleCrops()\n{\n   var obj = document.getElementById(\"t2\");\n   var but = document.getElementById(\"ShowCrops\");\n   if (obj.style.visibility == 'hidden')\n   {\n        obj.style.visibility = 'visible';\n        but.innerHTML = 'Crop Views Enabled (Click to Disable)';\n   }\n   else\n   {\n        obj.style.visibility = 'hidden';\n        but.innerHTML = 'Click Here To Enable Crop Views';\n   }\n   HMOut(but);\n}\n\nfunction ShowCrops()\n{\n   if (document.getElementById(\"t2\").style.visibility == 'hidden')\n     ToggleCrops();\n}\n\nvar but = new Array();\n\nbut[1] = document.getElementById('but1');\nbut[2] = document.getElementById('but2');\nbut[3] = document.getElementById('but3');\nbut[4] = document.getElementById('but4');\nbut[5] = document.getElementById('but5');\nbut[6] = document.getElementById('but6');\nbut[7] = document.getElementById('but7');\nbut[8] = document.getElementById('but8');\nbut[9] = document.getElementById('but9');\n\nvar pic = \"\";\nvar crop = \"sm\";\nvar num = 2;\nvar id = '';\n\nfunction Update()\n{\n    var newid = pic + \"_\" + crop + \"_img\" + num;\n\n    document.getElementById(newid).style.display = 'block';\n    if (id != '')\n        document.getElementById(id).style.display    = 'none';\n    id = newid;\n\n    document.getElementById('reset').style.visibility = (id == \"pic2_sm_img1\") ? 'hidden' : 'visible';\n\n}\n\nfunction Select(pic, crop, button)\n{\n    if (pic != \"pic2\")\n        ShowMore();\n    if (crop != \"sm\")\n        ShowCrops();\n    OnPic(pic);\n    OnCrop(crop);\n    OnButton(button);\n    ClearNote();\n}\n\nfunction Reset()\n{\n    Select(\"pic2\", \"sm\", 1);\n}\n\nfunction OnPic(name)\n{\n    if (pic != name)\n    {\n       if (pic != '')\n          document.getElementById('bp_' + pic).className = 'xpb';\n       document.getElementById('bp_' + name).className = 'pb';\n       pic = name;\n       Update();\n    }\n}\n\nfunction OnCrop(name)\n{\n     crop = name;\n\n     if (name != 'sm')\n        document.getElementById('cb_sm').className = 'xcb';\n     if (name != 'c1')\n        document.getElementById('cb_c1').className = 'xcb';\n     if (name != 'c2')\n        document.getElementById('cb_c2').className = 'xcb';\n     if (name != 'c3')\n        document.getElementById('cb_c3').className = 'xcb';\n\n     document.getElementById('cb_' + name).className = 'cb';\n     Update();\n}\n\nfunction OnButton(newnum)\n{\n  if (newnum != num)\n  {\n      but[num].style.borderColor     = 'gray';\n      but[num].style.color           = 'black';\n      but[num].style.backgroundColor = '';\n\n      num = newnum;\n      Update();\n\n      but[num].style.borderColor     = '#FF4040';\n      but[num].style.backgroundColor = '#808080';\n      but[num].style.color           = 'white';\n  }\n}\n\nvar note = '';\n\nfunction ClearNote()\n{\n   if (note != '') {\n       document.getElementById('shadow').style.visibility = 'hidden';\n       document.getElementById(note).style.visibility = 'hidden';\n       note = '';\n   }\n}\n\nfunction ShowNote(name)\n{\n   ClearNote();\n   note = name;\n   document.getElementById('shadow').style.visibility = 'visible';\n   document.getElementById(note).style.visibility = 'visible';\n}\n\nfunction ToggleNote(name)\n{\n\n   if (note == name)\n       ClearNote();\n   else\n       ShowNote(name);\n}\n\nfunction Load_pic3() {\ndocument.getElementById('img000').src = '\/i\/raw\/pic3\/full-sm.jpg';\n document.getElementById('img001').src = '\/i\/raw\/pic3\/comp-sm.jpg';\n document.getElementById('img002').src = '\/i\/raw\/pic3\/diff_mask-sm.gif';\n document.getElementById('img003').src = '\/i\/raw\/pic3\/diff_wide-sm.jpg';\n document.getElementById('img004').src = '\/i\/raw\/pic3\/diff_raw-sm.jpg';\n document.getElementById('img005').src = '\/i\/raw\/pic3\/full_bright-sm.jpg';\n document.getElementById('img006').src = '\/i\/raw\/pic3\/comp_bright-sm.jpg';\n document.getElementById('img007').src = '\/i\/raw\/pic3\/full_dark-sm.jpg';\n document.getElementById('img008').src = '\/i\/raw\/pic3\/comp_dark-sm.jpg';\n document.getElementById('img009').src = '\/i\/raw\/pic3\/full-c1.jpg';\n document.getElementById('img010').src = '\/i\/raw\/pic3\/comp-c1.jpg';\n document.getElementById('img011').src = '\/i\/raw\/pic3\/diff_mask-c1.gif';\n document.getElementById('img012').src = '\/i\/raw\/pic3\/diff_wide-c1.jpg';\n document.getElementById('img013').src = '\/i\/raw\/pic3\/diff_raw-c1.jpg';\n document.getElementById('img014').src = '\/i\/raw\/pic3\/full_bright-c1.jpg';\n document.getElementById('img015').src = '\/i\/raw\/pic3\/comp_bright-c1.jpg';\n document.getElementById('img016').src = '\/i\/raw\/pic3\/full_dark-c1.jpg';\n document.getElementById('img017').src = '\/i\/raw\/pic3\/comp_dark-c1.jpg';\n document.getElementById('img018').src = '\/i\/raw\/pic3\/full-c2.jpg';\n document.getElementById('img019').src = '\/i\/raw\/pic3\/comp-c2.jpg';\n document.getElementById('img020').src = '\/i\/raw\/pic3\/diff_mask-c2.gif';\n document.getElementById('img021').src = '\/i\/raw\/pic3\/diff_wide-c2.jpg';\n document.getElementById('img022').src = '\/i\/raw\/pic3\/diff_raw-c2.jpg';\n document.getElementById('img023').src = '\/i\/raw\/pic3\/full_bright-c2.jpg';\n document.getElementById('img024').src = '\/i\/raw\/pic3\/comp_bright-c2.jpg';\n document.getElementById('img025').src = '\/i\/raw\/pic3\/full_dark-c2.jpg';\n document.getElementById('img026').src = '\/i\/raw\/pic3\/comp_dark-c2.jpg';\n document.getElementById('img027').src = '\/i\/raw\/pic3\/full-c3.jpg';\n document.getElementById('img028').src = '\/i\/raw\/pic3\/comp-c3.jpg';\n document.getElementById('img029').src = '\/i\/raw\/pic3\/diff_mask-c3.gif';\n document.getElementById('img030').src = '\/i\/raw\/pic3\/diff_wide-c3.jpg';\n document.getElementById('img031').src = '\/i\/raw\/pic3\/diff_raw-c3.jpg';\n document.getElementById('img032').src = '\/i\/raw\/pic3\/full_bright-c3.jpg';\n document.getElementById('img033').src = '\/i\/raw\/pic3\/comp_bright-c3.jpg';\n document.getElementById('img034').src = '\/i\/raw\/pic3\/full_dark-c3.jpg';\n document.getElementById('img035').src = '\/i\/raw\/pic3\/comp_dark-c3.jpg';\n\n}\n function Load_pic1() {\ndocument.getElementById('img036').src = '\/i\/raw\/pic1\/full-sm.jpg';\n document.getElementById('img037').src = '\/i\/raw\/pic1\/comp-sm.jpg';\n document.getElementById('img038').src = '\/i\/raw\/pic1\/diff_mask-sm.gif';\n document.getElementById('img039').src = '\/i\/raw\/pic1\/diff_wide-sm.jpg';\n document.getElementById('img040').src = '\/i\/raw\/pic1\/diff_raw-sm.jpg';\n document.getElementById('img041').src = '\/i\/raw\/pic1\/full_bright-sm.jpg';\n document.getElementById('img042').src = '\/i\/raw\/pic1\/comp_bright-sm.jpg';\n document.getElementById('img043').src = '\/i\/raw\/pic1\/full_dark-sm.jpg';\n document.getElementById('img044').src = '\/i\/raw\/pic1\/comp_dark-sm.jpg';\n document.getElementById('img045').src = '\/i\/raw\/pic1\/full-c1.jpg';\n document.getElementById('img046').src = '\/i\/raw\/pic1\/comp-c1.jpg';\n document.getElementById('img047').src = '\/i\/raw\/pic1\/diff_mask-c1.gif';\n document.getElementById('img048').src = '\/i\/raw\/pic1\/diff_wide-c1.jpg';\n document.getElementById('img049').src = '\/i\/raw\/pic1\/diff_raw-c1.jpg';\n document.getElementById('img050').src = '\/i\/raw\/pic1\/full_bright-c1.jpg';\n document.getElementById('img051').src = '\/i\/raw\/pic1\/comp_bright-c1.jpg';\n document.getElementById('img052').src = '\/i\/raw\/pic1\/full_dark-c1.jpg';\n document.getElementById('img053').src = '\/i\/raw\/pic1\/comp_dark-c1.jpg';\n document.getElementById('img054').src = '\/i\/raw\/pic1\/full-c2.jpg';\n document.getElementById('img055').src = '\/i\/raw\/pic1\/comp-c2.jpg';\n document.getElementById('img056').src = '\/i\/raw\/pic1\/diff_mask-c2.gif';\n document.getElementById('img057').src = '\/i\/raw\/pic1\/diff_wide-c2.jpg';\n document.getElementById('img058').src = '\/i\/raw\/pic1\/diff_raw-c2.jpg';\n document.getElementById('img059').src = '\/i\/raw\/pic1\/full_bright-c2.jpg';\n document.getElementById('img060').src = '\/i\/raw\/pic1\/comp_bright-c2.jpg';\n document.getElementById('img061').src = '\/i\/raw\/pic1\/full_dark-c2.jpg';\n document.getElementById('img062').src = '\/i\/raw\/pic1\/comp_dark-c2.jpg';\n document.getElementById('img063').src = '\/i\/raw\/pic1\/full-c3.jpg';\n document.getElementById('img064').src = '\/i\/raw\/pic1\/comp-c3.jpg';\n document.getElementById('img065').src = '\/i\/raw\/pic1\/diff_mask-c3.gif';\n document.getElementById('img066').src = '\/i\/raw\/pic1\/diff_wide-c3.jpg';\n document.getElementById('img067').src = '\/i\/raw\/pic1\/diff_raw-c3.jpg';\n document.getElementById('img068').src = '\/i\/raw\/pic1\/full_bright-c3.jpg';\n document.getElementById('img069').src = '\/i\/raw\/pic1\/comp_bright-c3.jpg';\n document.getElementById('img070').src = '\/i\/raw\/pic1\/full_dark-c3.jpg';\n document.getElementById('img071').src = '\/i\/raw\/pic1\/comp_dark-c3.jpg';\n\n}\n\n\nSelect(\"pic2\", \"sm\", 1);\n\n\n\n<\/script>\n<p>\n\nLet me stress again that the &#8220;exaggerated&#8221; version is <i>wildly<\/i>\nexaggerated, both because the differences have been stretched to fill the\nbreadth of the 8-bit color space, and also because the differences are further\nexaggerated (by a factor of 36!) by the way the size reduction was done.\n\n<\/p><p>\n\nIt's instructive to see all these versions, masks, and differences at 100%\nzoom. Click this button to enable several 100% crops in the mini\napplication above:\n\n<\/p>\n\n<center style='margin-top:10px'><span id='ShowCrops' class='prettybutton' onmouseover='HMOver(this)' onmouseout='HMOut(this)' onclick='ToggleCrops()'>Click Here To Enable Crop Views<\/span><\/center>\n\n<p>While the reduced-size &#8220;Exaggerated&#8221; view might seem to show a lot of\ndetail has been lost, looking at the 100% crops shows that the actual\ndifferences are much less, even though the exaggerated view is still wildly\nexaggerated.<\/p>\n\n<p><b>These Tests with Additional Pictures<\/b><\/p>\n\n<p>\n\nPlaying around with the mini application above, you can see many different\nviews of the same picture (9 views for each of the four &#8220;crop&#8221;\nbuttons). All are derived from one shutter-release event.\n\n<\/p><p>\n\nIn looking at these results, it's clear that the detail lost via\ncompression is extremely subtle, but perhaps this is only because my test\nimage doesn't have enough of the highlights that are susceptible to the\ncompression's lossiness. Perhaps I need to test with an exposure that has\nmore photons hitting the sensor?\n\n<\/p><p>\n\nWith that in mind, I took another picture of the same scene, but this time\nI purposefully overexposed it by two stops. To keep a balance to my tests,\nI took one underexposed by two stops, as well.<\/p>\n\n<p>It makes no sense to do pixel-by-pixel comparisons among these three\nshots, as they're indeed different shots and subtle changes in lighting and\ncomposition are likely much larger than any compression-related\ndifferences. Still, each of the new pictures can be looked at,\nindividually, with the same attention to detail as the first. Click on the\nthis button to enable additional photos in the mini application above:<\/p>\n\n<center style='margin-top:10px'><span id='ShowMore' class='prettybutton' onmouseover='HMOver(this)' onmouseout='HMOut(this)' onclick='ToggleMore()'>Click Here To Enable Other Photos<\/span><\/center>\n\n<p>(Clicking on it has your browser download an additional 72 images\n&mdash; 9 views for each of the four crops, per each of the two additional\npictures)<\/p>\n\n<p>As additional confirmation that the loss of detail in <span\nclass='nef'>NEF<\/span> compression is in the highlights, select the\n<b>Mask<\/b> view and cycle among the three photos: the over-exposed photo\nhas changes across the entire scene, while the under-exposed photo has\nchanges only in the brightest areas.\n\n<\/p>\n<p><b>Conclusions<\/b><\/p>\n<p>\n\nConsider the exaggerated view of the over-exposed photo (<span\nonclick='Select(\"pic1\", \"sm\", 4)' onmouseover='HMOver(this)'\nonmouseout='HMOut(this)' style='text-decoration: underline'>click to\nselect<\/span>, then scroll up to view). Looking at this may lead one to\nbelieve that a lot of detail has been lost. Clearly, much more has\nbeen lost in this over-exposed shot than with the others, yet, the\ndifferences still don't make it into any of the developed images, even at\n100% crop. &#8220;More&#8221; is clearly relative.\n\n<\/p><p>\n\nNevertheless, all the detail in the reduced-size exaggerated view is detail\nthat has been removed. Even though such detail may seem insignificant when\nspread out over the entire 10.2 megapixel image, it <b>is<\/b> detail none\nthe less.\n\n<\/p><p>\n\nIn the end, the only reason to use compression in the first place is for\nconvenience (smaller files, faster write times, and more images on a card),\nand that convenience is paid for by irrevocable loss of image detail,\nalbeit a <i>very small amount<\/i> of image detail.\n\n<\/p><p>\n\nIt's up to each photographer to determine whether the lost detail is at all\nrelevant. It is not relevant to me, so I enjoy the convenience of the\nsmaller, compressed files. However, if I were likely to have a lot of\nover-exposed shots from which I absolutely had to extract the most\ninformation possible, I might reconsider. (I'd probably continue to use\ncompression, but I'd have to at least reconsider.)\n\n<\/p>\n<hr\/>\n<p><b>Technical Details<\/b><\/p>\n\n<p>Some notes about how I did the tests...<\/p>\n\n<ul>\n\n<li><p>The original compressed and uncompressed <span\nclass='nef'>NEF<\/span>s were converted to 16-bit &#8220;pseudo PPM&#8221;\nfiles of raw, linear sensor data with no gamma and no whitebalance, using\nDavid Coffin's most excellent <a\nhref='http:\/\/www.cybercom.net\/~dcoffin\/dcraw\/'>dcraw<\/a>.<\/p><\/li>\n\n<li><p>I wrote a program to compare the two PPMs and generate a new 16-bit\nPPM representing only the per-pixel sensor-level differences, either as a\nmask or as a &#8220;true differences&#8221; image.<\/p><\/li>\n\n<li><p>The dark\/mid\/light versions were produced from each <span\nclass='nef'>NEF<\/span> (using dcraw) with different <b>-b<\/b> (brightness)\narguments.<\/p><\/li>\n\n<li><p>The various jpeg versions of these files were created from PPM files\nusing ImageMagick's <a\nhref='http:\/\/www.imagemagick.org\/script\/convert.php'>convert<\/a>\nutility.<\/p><\/li>\n\n<li><p>The exaggerated versions were created using the <b>convert<\/b>\nutility's <b>-normalize<\/b> argument.<\/p><\/li>\n\n<li><p>I spent considerably more time building the javascript application\nfor showing the results than I spent generating the results.<\/p><\/li>\n\n<\/ul>\n\n\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p> Nikon's advanced digital cameras can save images in three file formats: jpeg, straight Raw, or compressed Raw. Whether compressed or not, the Raw files are named with the \".NEF\" (Nikon Electronic File) extension. With the 10.2 megapixel D200, an uncompressed NEF is about 16 megabytes; the compressed NEF is about half that size. The reduction in size is appealing, but does it come at a reduction in quality? <\/p> <p> In an excellent writeup, Fazel Majid looks at the mathematical ramifications of NEF compression from a theoretical point of view. The summary is that while compression does not change [...]","protected":false},"author":1,"featured_media":0,"parent":251,"menu_order":10,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/pages\/264"}],"collection":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/comments?post=264"}],"version-history":[{"count":0,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/pages\/264\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/pages\/251"}],"wp:attachment":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/media?parent=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}