There has been some discussion lately about PEF files, how the K100 handles ISO >800 and so forth. What follows is an email that I got from Gordon Goodsman on the topic. Immediately below is the link on my website where I stored the program he wrote. There's a zip file, and also the unzipped files from it.
http://www.red4est.com/lrc/rawconverter/ ----- Forwarded message from Gordon Goodsman <gordon_...@hotmail.com> ----- From: Gordon Goodsman <gordon_...@hotmail.com> To: l...@red4est.com Subject: RE: Pentax Raw files Hi Larry, Yes, my name does come up from time to time in the DPReview forums due to some treatices and proofs that I have written. ;) As to your questions, no I've never written a blog about my experiences and observations on raw decoding other than my contributions to the above forums. As to the K200D bit shifting to get an effective ISO 3200, Marc Sabatella may have determined that from some Java software I wrote some time ago that shows the RGB raw histograms. As to just bit clipping "just clipping highlights", if you think about it that way all higher ISO sensitivities can be though of as "just clipping highlights" as you can pretty well always get about the same effect as shooting underexposed at a low ISO with raw and boosting the exposures in post processing. The only exception is when the Analog to Digital Convertor (ADC) contributes a significant percentage of the noise at lower ISO sensitivities where as it generally doesn't at higher sensitivities (the ADC noise stays constant as the amplified higher ISO sensor noise goes up). From a image quality point of view, other than as noted, the image quality is pretty much exactly the same whether higher ISO's are produced using a higher gain on the pre ADC amplifier or by bit shifting due to the minimum noise always being more than the missing banding codes as the gaps between codes are less than the minimum noise and raw conversion will generally tend to fill in these gaps anyway. In fact, all Pentax pre-K10D cameras for ISO's of 800 and up achieve the elevated ISO's by bit shifting, so you are dealing with it now and haven't noticed anything. As to determining that the pre K10D cameras do in fact shift WB slightly for the extreme WB settings, I did this using the above mentioned Java raw RGB histogram generator, which I have here attached as a '.txt' file to get past any attachment filters that will object to the included '.cmd' file. Just rename the downloaded file to '.zip' to extract and use it. It was originally written by a Russian guy named Anton Malyck and I have somewhat modified it to handle all currently known Pentax PEF files (haven't tested it with Km/K2000D files yet though, but I assume that they should work like K200D files). The instructions for use are embedded in the root directory of the extracted file. The raw WB is somewhat changed, especially for tungsten WB, but the difference isn't huge and not something that you have to worry a lot about. What is more important is that you can show why there is more highlight "headroom" for ISO's above 200 for the pre-K10D cameras in that the actual gain is changed so that there is indeed an extra approximately half a stop of highlight "headroom". For the Pentax K100D Super and earlier Pentax cameras (pre-K10D), raw decoding is quite easy because the raw data is not loss-lessly compressed and therefore does not need to be decompressed other that for un-"byte packing" which extracts two 12 bit readings from every three bytes (24 bits packed). Since your background is technical and somewhat related to programming, you can likely find everything you want to know about Pentax image file tags (including raw) using a free program called PhotoMe from Jens Duttke available at www.photome.de. With this, the specification for EXIF, the TIFF6 specification, and a WinHex file hexadecimal editor, all available for free download by doing an Internet search, you are well on the way to being able to write a raw convertor or at least a raw analyzer in the computer language of your choice. I have included the Java source code for the raw histogram generator in the attachment and although this is quite a primitive implementation able to just extract enough tags and the raw data in order to be able to plot the raw histogram, you will see what is involved. I hope this helps. Regards, Gordon Goodsman (AKA GordonBGood)> From: l...@red4est.com> Date: Wed, 7 Jan 2009 00:26:00 -0800> To: gordon_...@hotmail.com> Subject: Pentax Raw files > > Gordon, > > Your name keeps coming up in reference to Pentax raw file formats. It> > > also seems that you've written your own raw file processing software. > > Do you have any sort of documentation posted on the things that you've> > > learned? Since I have a K100Dsuper I'm most interested in info about> it. > > I think it was Marc Sabatella that said something about ISO 3200 doing> a > > shift left on the data over ISO 1600, so it effectively doesn't do> > > anything but clip highlights. > > Someone also said something today about you determining that White> > > Balance readings in the camera affect the raw file on some Pentax> models. > > For what it's worth, my degree is EE, and I've been doing embedded> > > software for about 25 years, so I can follow a fairly technical> discussion. > > Thanks,> larry > > -- > It's not the steps in the dance, it's the dance in the steps.> Larry > > Colen l...@red4est.com http://www.red4est.com/lrc _________________________________________________________________ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/events.aspx ----- End forwarded message ----- -- The fastest way to get your question answered on the net is to post the wrong answer. Larry Colen l...@red4est.com http://www.red4est.com/lrc -- PDML Pentax-Discuss Mail List PDML@pdml.net http://pdml.net/mailman/listinfo/pdml_pdml.net to UNSUBSCRIBE from the PDML, please visit the link directly above and follow the directions.