Feature #10022

Pentax K-3 - PEF support

Added by Marcin Gwizdal almost 6 years ago. Updated over 5 years ago.

Start date:
Due date:
% Done:


Estimated time:
Affected Version:
git development version
hardware architecture:


New Pentax K-3 is producing PEF files that are not possible to read under Darktable. DNG files working OK.

If sample photos needed produced by K-3 in PEF format please e-mail me.

IMGP0333.PEF (29 MB) IMGP0333.PEF Chris Oliver, 11/01/2014 02:54 AM


#1 Updated by Pascal de Bruijn almost 6 years ago

  • % Done changed from 0 to 100
  • Priority changed from High to Low
  • Status changed from New to Fixed
  • Tracker changed from Bug to Feature

As far as I'm aware this has been resolved in git master.

Please do test, and feel free to re-open this issue if you find any problems.

#2 Updated by Chris Oliver over 5 years ago

Darktable opens the dng files from my Pentax K3.. but not the pef.. Also when loading the dng Darktable doesnt recognize my 18-135 wr lens.. No big deal can select it from drop down list but I figured it was worth mentioning..

#3 Updated by Pascal de Bruijn over 5 years ago

  • bitness set to 64-bit
  • System set to all
  • Affected Version set to git development version
  • % Done changed from 100 to 50
  • Status changed from Fixed to In Progress

Ok, so now we have a sample, I can see the PEF reader was indeed updated, however the camera definition wasn't added, which I just took care of:

Keep in mind the above should still be considered experimental for the time being.

It seems though we're still having trouble reading the camera white balance values, so that still requires some attention.

Reading the lens name (usually from the vendor proprietary MakerNote), is done by the Exiv2 library, which doesn't seem to be able to read the makernote from the K3 PEFs (or DNGs for that matter), so you should file a bug with the Exiv2 project about that, supplying them with both a PEF and DNG sample.

Also on an unrelated sidenote, if you're in the position that your camera offers the option of shooting camera-native DNGs, I'd highly recommend that. Since the DNG format is more open and self descriptive than any other RAW format.

#4 Updated by Pascal de Bruijn over 5 years ago

And another unrelated sidenote, I just noticed doesn't have either a DNG or PEF sample for the K-3 camera yet, please consider offering them samples as well.

#5 Updated by Chris Oliver over 5 years ago

Downloaded the new cameras.xml and darktable now opens the pef files. Thank you! I do get the white balance warning but aside from that and the lense recognition everything works. On a side note I dont know the if there is a diffrence between the dng format and the pef format except that the dng is open. Is the dng format as "good" as the pef?

#6 Updated by Pascal de Bruijn over 5 years ago


The white balance warning needs some more work, I'll leave this feature request open for the time being.

With lens recognition, please do file a bug (including PEF en DNG samples) with the Exiv2 project, as it's not recognizing the MakerNote.

Now with regard to DNG vs PEF, "good" means something different to everybody. But bluntly put vendor proprietary RAWs have never been a good idea, but historically it was all the choice we had.

Now with a few vendors like Pentax natively supporting DNG in camera, I would highly recommend using that, as proper DNGs have much more metadata than vendor proprietary RAWs. Proper DNGs are in essence self describing, all parameters required to interpret the DNG are embedded into the DNG itself. This is not true for vendor proprietary RAWs like PEFs. Which is why we need to ship all these parameters manually per-camera with Darktable. And at the rate vendors are releasing cameras these days, that's quite a painful nuisance.

That said, I generally don't recommend converting to DNG though, as the conversion process itself is not perfect, and RAW/EXIF_Makernotes are fairly brittle by their mostly undocumented nature, so even though a conversion is lossless in theory, it might very well not be in reality.

#8 Updated by Pedro Côrte-Real over 5 years ago

Latest git master has a fix for the whitebalance issue. Pascal's unstable ppa should have a version with that fix already:

The lens detection is apparently also fixed in the exiv2 trunk and judging by the date is probably also in the exiv2 package in the same ppa.

#9 Updated by Chris Oliver over 5 years ago

  • % Done changed from 50 to 100
  • Status changed from In Progress to Fixed

I tried the latest git last night and everything worked great for me... white balance works as does lens recognituon

Also available in: Atom PDF

Go to top