JPGs from native Pentax DSLR DNG raw files Problem (on MacOS)

Started by exifacou, April 15, 2020, 12:21:33 PM

Previous topic - Next topic

exifacou

Hi,

I'm using Pentax DSLR cameras. These cameras support two different native raw formats out of camera: PEF and DNG.

Within a thread discussion on pentaxforums.com we came to the point where a member said he is able to extract all three kinds of jpg files from raw - ThumbnailImage, JpgFromRaw (full size) and PreviewImage - using Exiftool. I said this doesn't work with my raw files. I can only extract preview images.

In further clarification we discovered that he used the PEF raw format and I used DNG. So I tested it shooting PEF with three different Pentax DSLRs. From these PEF raw files I could extract all three kinds of JPG files!

Using the Pentax Digital Camera Utility (PDCU, Pentax Raw Converter) I'm also able to extract the full sized JPG files from DNG files.

So I'd conclude that there might be a bug in Exiftool concerning Pentax DNG raw files concerning extraction of JPG files using the following options:

-ThumbnailImage
-JpgFromRaw

Only the option -PreviewImage works for my Pentax DNG raw files.

Tested on MacOS 10.14.6, exiftool 11.86 & 11.93
$ exiftool -b -JpgFromRaw -w fullsize/%d%f_.jpg ./anImage.DNG
    0 output files created
Please let me know if you need a Pentax DNG image. I'll "dropbox" one for your email address.

Thanks in advance for having a look at it!

Phil Harvey

I don't know what model you have, but here is a list of all embedded images in PEF and DNG files for various Pentax models:

> exiftool Pentax* Ricoh* -ext dng -ext pef -preview:all -a -G4 -s
======== Pentax istDs.pef
[]              JpgFromRaw                      : (Binary data 1508755 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 39604 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 6680 bytes, use -b option to extract)
======== Pentax645.dng
[]              PreviewImage                    : (Binary data 4667159 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== Pentax645Z.dng
[Copy1]         PreviewImage                    : (Binary data 6220671 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 57958 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-01.dng
[Copy1]         PreviewImage                    : (Binary data 1342598 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 39528 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-3.dng
[Copy1]         PreviewImage                    : (Binary data 3019836 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 56383 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-3.pef
[]              JpgFromRaw                      : (Binary data 2773950 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 52198 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7002 bytes, use -b option to extract)
======== PentaxK-30.dng
[Copy1]         PreviewImage                    : (Binary data 1328174 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 31178 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-5.dng
[Copy1]         PreviewImage                    : (Binary data 1219080 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 34938 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-5.pef
[]              JpgFromRaw                      : (Binary data 1180544 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 36179 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7710 bytes, use -b option to extract)
======== PentaxK-50.dng
[Copy1]         PreviewImage                    : (Binary data 1395810 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 40657 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-500.dng
[Copy1]         PreviewImage                    : (Binary data 1350248 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 37802 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-5II.dng
[Copy1]         PreviewImage                    : (Binary data 1286043 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 39646 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-5IIs.dng
[Copy1]         PreviewImage                    : (Binary data 1347460 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 39766 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-7.dng
[Copy1]         PreviewImage                    : (Binary data 1427794 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 23614 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-7.pef
[]              JpgFromRaw                      : (Binary data 1139425 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 25652 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7755 bytes, use -b option to extract)
======== PentaxK-m.pef
[]              JpgFromRaw                      : (Binary data 1128827 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 30549 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7956 bytes, use -b option to extract)
======== PentaxK-r.dng
[Copy1]         PreviewImage                    : (Binary data 1256374 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 23097 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-r.pef
[]              JpgFromRaw                      : (Binary data 1262661 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 25964 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7000 bytes, use -b option to extract)
======== PentaxK-x.dng
[Copy1]         PreviewImage                    : (Binary data 1437269 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 19121 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK-x.pef
[]              JpgFromRaw                      : (Binary data 1319001 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 28808 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7915 bytes, use -b option to extract)
======== PentaxK100D.pef
[]              JpgFromRaw                      : (Binary data 1147003 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 40276 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 5983 bytes, use -b option to extract)
======== PentaxK10D-partial.dng
[Copy1]         PreviewImage                    : (Binary data 1212217 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 29209 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK10D.dng
[Copy1]         PreviewImage                    : (Binary data 1413285 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 26143 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK10D.pef
[]              JpgFromRaw                      : (Binary data 1301527 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 27491 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 6497 bytes, use -b option to extract)
======== PentaxK2000.dng
[Copy1]         PreviewImage                    : (Binary data 1338880 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 23679 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK200D.dng
[Copy1]         PreviewImage                    : (Binary data 1476563 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 24257 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK200D.pef
[]              JpgFromRaw                      : (Binary data 1372406 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 26373 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7692 bytes, use -b option to extract)
======== PentaxK20D.dng
[Copy1]         PreviewImage                    : (Binary data 1427116 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 26896 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxK20D.pef
[]              JpgFromRaw                      : (Binary data 1111301 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 29972 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7939 bytes, use -b option to extract)
======== PentaxMX-1.dng
[Copy1]         PreviewImage                    : (Binary data 4877510 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 40681 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxQ-S1.dng
[Copy1]         PreviewImage                    : (Binary data 3089405 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 23982 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxQ.dng
[Copy1]         PreviewImage                    : (Binary data 2733478 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 24889 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxQ10.dng
[Copy1]         PreviewImage                    : (Binary data 3522662 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 30400 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== PentaxQ7.dng
[Copy1]         PreviewImage                    : (Binary data 3319032 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 30544 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohGR.dng
[]              PreviewImage                    : (Binary data 72599 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohGR_DIGITAL3.dng
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohGR_DIGITAL3_adobe_dng_converter.dng
[]              PreviewImage                    : (Binary data 86185 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 131544 bytes, use -b option to extract)
======== RicohGR_DIGITAL4.dng
[]              PreviewImage                    : (Binary data 115200 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohGR_II.dng
[]              JpgFromRaw                      : (Binary data 3238898 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 71732 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohGR_III.dng
[Copy1]         PreviewImage                    : (Binary data 2922558 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 54830 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohGXR_A12.dng
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohPENTAX_K-1.dng
[Copy1]         PreviewImage                    : (Binary data 4180544 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 55740 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohPENTAX_K-1MarkII.dng
[Copy1]         PreviewImage                    : (Binary data 4129423 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 54758 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohPENTAX_K-3II.dng
[Copy1]         PreviewImage                    : (Binary data 2838561 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 58249 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohPENTAX_K-3II_pixel_shift.dng
[Copy1]         PreviewImage                    : (Binary data 2802163 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 61396 bytes, use -b option to extract)
[Copy1]         PreviewTIFF                     : (Binary data 57816 bytes, use -b option to extract)
[Copy2]         PreviewTIFF                     : (Binary data 57816 bytes, use -b option to extract)
[]              PreviewTIFF                     : (Binary data 57816 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohPENTAX_K-70.pef
[]              JpgFromRaw                      : (Binary data 2929659 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 56462 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7233 bytes, use -b option to extract)
======== RicohPENTAX_K-S1.dng
[Copy1]         PreviewImage                    : (Binary data 2335396 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 56259 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
======== RicohPENTAX_KP.dng
[Copy1]         PreviewImage                    : (Binary data 2913785 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 56156 bytes, use -b option to extract)
[Copy1]         PreviewTIFF                     : (Binary data 57816 bytes, use -b option to extract)
[Copy2]         PreviewTIFF                     : (Binary data 57816 bytes, use -b option to extract)
[]              PreviewTIFF                     : (Binary data 57816 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)
   48 image files read


- Phil

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

exifacou

Thank you very much, Phil! - Your command line command

> exiftool Pentax* Ricoh* -ext dng -ext pef -preview:all -a -G4 -s

opened my eyes!

I got these results ...

======== ./IMGP6562.DNG
[Copy1]         PreviewImage                    : (Binary data 2818959 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 54100 bytes, use -b option to extract)
[]              ThumbnailTIFF                   : (Binary data 57816 bytes, use -b option to extract)

======== ./20190422_09-37-30_KP_SC3654.PEF
[]              JpgFromRaw                      : (Binary data 2829512 bytes, use -b option to extract)
[]              PreviewImage                    : (Binary data 55587 bytes, use -b option to extract)
[]              ThumbnailImage                  : (Binary data 7115 bytes, use -b option to extract)

Until now I thought that the command should be the same for PEF and DNG. But your command showed significant differences.

For Pentax DNG I have to modify my commands concerning full-size and thumbnail image extraction! - So no Bug in Exiftool but a user fault! (sorry)

Extract a full-size JPG:

PEF > exiftool -b -JpgFromRaw -w fullsizepreview/%d%f_.jpg ./anImage.DNG
DNG > exiftool -b -Copy1:PreviewImage -w fullsizepreview/%d%f_.jpg ./anImage.DNG

Exracts a thumbnail JPG:

PEF > exiftool -b -ThumbnailImage -w %d%f_thumbnail.jpg anImage.PEF
DNG > exiftool -b -ThumbnailTIFF -w %d%f_fullsize.jpg anImage.DNG

For preview-size works for PEF and DNG the same.

PEF > exiftool -b -PreviewImage -w %d%f_previewsize.jpg anImage.PEF
DNG > exiftool -b -PreviewImage -w %d%f_previewsize.jpg anImage.DNG