Raw image format (Pentax)

.pef · Images

PEF, Pentax Electronic File, is the raw photo format of Pentax digital SLRs. It has been used since the *ist D of 2003 and is still written by current models such as the K-3 Mark III and K-1 Mark II, as well as the 645D and 645Z medium-format cameras. What makes Pentax unusual is that its DSLRs let you choose between PEF and the open DNG format directly in the camera menu.

A short history of Pentax and its raw format

The camera maker started as Asahi Optical Co. in Japan and only took the name of its famous camera line, Pentax, in 2002. Traces of the old name survive in the format: the maker notes inside a PEF begin with the marker AOC, for Asahi Optical Co. In 2008 Pentax merged with Hoya, and in 2011 Ricoh bought the camera business, which today operates as Ricoh Imaging. With the K10D in 2006 Pentax became one of the first major brands to offer Adobe's DNG as an in-camera alternative. Ricoh's own GR compacts record DNG only, so not every raw file from Ricoh Imaging is a PEF. The UK National Archives lists PEF as deprecated, but that is not accurate: Pentax DSLRs still offer it alongside DNG.

Technically: big-endian TIFF with Pentax specifics

  • Container: TIFF in Motorola byte order (big-endian, MM), unlike the Intel order most other raw formats use.
  • Compression: lossless. The first *ist D wrote uncompressed data, later bodies compress with a Huffman code. On older bodies a PEF was clearly smaller than an in-camera DNG; since the K-7 Pentax compresses DNG as well.
  • Bit depth: 12 bits on older bodies, 14 bits from the K-5 (2010) on.
  • Pixel Shift Resolution (K-3 II from 2015, then K-1, KP, K-70, K-3 Mark III): the camera moves the sensor by one pixel between four exposures and stores all four in a single PEF or DNG. Every pixel gets full colour information, and the file is roughly four times larger.
  • Metadata: EXIF plus Pentax maker notes with lens, custom image settings, shake reduction and more. An embedded JPEG preview is included.

PEF or DNG: which should I choose in the camera?

In terms of image quality there is no difference, both contain the same sensor data. PEF files tend to be a little smaller. DNG is an open, documented format that more programs read out of the box, which helps on older software and in archives. PEF can be converted to DNG later with the free Adobe DNG Converter, never the other way round.

How to open PEF files

  • Pentax Digital Camera Utility 5 (Windows, macOS), free for Pentax owners and based on the SILKYPIX raw engine. It is the reference for Pentax custom images and for developing Pixel Shift files.
  • Windows 10 and 11: the Raw Image Extension from the Microsoft Store for Photos and File Explorer thumbnails.
  • macOS and iOS: Preview and Photos for supported models.
  • Linux: darktable and RawTherapee. RawTherapee includes a dedicated Pixel Shift demosaicing method with motion correction.
  • Lightroom and Photoshop via Camera Raw.

Common PEF problems

PEF won't open or shows a generic icon

The software or the Windows extension is older than the camera. Update it, convert the files to DNG with Adobe DNG Converter, or set the camera to DNG for future shots.

Pixel Shift photo shows coloured grid or ghosting

Anything that moved between the four exposures, such as leaves, water or people, produces a typical checkerboard or colour fringing. Use the motion correction in the camera or in Digital Camera Utility or RawTherapee, or develop only one of the four frames.

Converting PEF

For sharing and printing, PEF is converted to JPG, for editing in programs without raw support to TIFF. Our converter decodes PEF using camera white balance, standard demosaicing, sRGB and 8 bits per channel. Custom images, lens corrections and noise reduction are not applied, and full EXIF is not copied. From a Pixel Shift file we develop only the first of the four frames, so you get a normal-resolution image, not the merged one. Pixel Shift files from the K-1 can also exceed our 100 MB upload limit. The process and its limits are the same as for Canon files on CR2 to JPG. Related formats: CR2, NEF, TIFF.

Quick facts

DeveloperPentax (Asahi Optical), today Ricoh Imaging
First used2003 (Pentax *ist D)
Current statusStill in use in Pentax DSLRs, DNG offered as an alternative
TypeCamera raw image, TIFF-based (big-endian), proprietary
CompressionLossless (Huffman); uncompressed on the *ist D
Bit depth12 or 14 bits per pixel
Typical useRaw photos from Pentax K-series and 645 cameras

Further reading: Camera raw formats at the Library of Congress, PEF in the PRONOM registry of The National Archives.

We can convert PEF into

Documents

PDF TXTPDF/A

Images

JPG PNGWEBP GIF TIFFHEICAVIFJXLPSDICOAAIAPNGARTAVS BMP CINCURDCMDCXDDSDPXFF FITSFL32 HDRHRZJP2JBIGJNGJPCMNGMTVOTBPALMPAM PBMPCD PCXPFMPGMPGXPHMPICTPPMPSBPTIFQOIRASRGFSGISIXELSUN TGAVICARVIFFVIPS WBMPXBMXPMXWD

Vector images

SVG EPSEMF PSFXGHPGLPOVSIFSVGZWMFXAML

eBooks

EPUB MOBI AZW3 FB2CBZHTMLZ LIT LRF OEB PDB TCRTXTZCB7CBTDJVU