Extracting preview Image from PEF RAW file

Started by Beholder3, January 15, 2012, 04:57:39 PM

Previous topic - Next topic

Beholder3

Hi,

I do not understand which command in exiftool direct I should use to extract the jpg preview image from a PEF (Pentax RAW format) file.
DNG works from the menu, but as I dont even understand the correct command line option for PEF I lack the knowledge to get it working in exiftool direct, where it woudl be nice to do this on all files selected int he GUI.

I tried "-b -JpgFromRaw" but that did nothing.

BogdanH

#1
Hi,
After selecting desired PEF file(s) in GUI, you should use:
-b -previewImage -w %f.jpg
or
-b -JpgFromRaw -w %f.jpg
which will create jpg files.

Bogdan

Phil Harvey

I would suggest using %d%f.jpg so the output jpg goes into the same directory as the raw file.

- 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 ($).

Beholder3

Thanks! I used "-b -BigImage -w %d%f.jpg" now, based on your recommendations here and in the other thread and that works nicely.




Beholder3

I use the most recent versions of GUI 4.26 and exiftool 8.75 but I seem to have one general issue with PEF files:

The GUI application freezes for pretty much exactly 30 seconds on choosing a single PEF-file in the center pane in standard view.
It doesn't happen with JPGs or DNGs. After that while I can continue normally. No error messages. GUI doesnt show any preview picture in the lower left corner.
During the freeze CPU load goes massively up on a core i7 (not flat).

Ideas?


BogdanH

#5
Hi,

I only have Pentax K-5 PEF file here right now and there's absolutely no delay when selecting this file. GUI will only show preview images of "known" image files. That is, only those of which Win Explorer can display thumbnails; for other (mostly raw) files, appropriate imaging codec must be installed -btw. I use FastPistureViewer codec.
What happens, if you turn "Details" button off (for showing thumbnails)? On smaller amount of PEF files, thumbnails should appear quite fast -if that's not the case, then you should check into this direction...

If you use some other (non K-5) PEF file.. is it possible you upload that file somewhere, so I could take a look? Otherwise, I could make an "tweaked" GUI, where you could disable showing preview in GUI -just to findout, if that's the reason.

Btw. use of -%d%f.jpg is actually not necessary in GUI, because GUI works on "current directory" principle: opened folder is always current/working folder. However, because ExifTool direct option is quite flexible, there might be cases where such option is desired.

Added:
Just got an example of 10D PEF file and I have no problem when selecting it inside GUI -as mentioned, I assume it's an "codec" issue.

Bogdan

Beholder3

#6
I'll do some more testing later. I used a K-5 so that should be no difference.

As I just found it, I can share this:
http://www.rawsamples.ch/
You can find many different RAW file types there for testing.
The site is old, but the files are still ok.

PH Edit: Fixed broken link

BogdanH

Hi,
Yes, "rawsamples.ch" -that's where I have got some of older raw files  :)
But as I have mentioned, here, GUI responds on selecting PEF (and other) files almost instantly -as if they were normal JPG files.
Did you try with some other raw files, i.e Canon CR2, Nikon NEF, etc.? That is, I still assume, that delay is caused by displaying PEF previews. And from GUI's prespective, there's no difference what file you select: if Windows can deliver preview, then GUI will show it. If Windows (codec, that is) is slow on this, then there's a delay.
You didn't say what (codec) software are you using for displaying thumbnails of PEF files in Windows Explorer?... I allready mentioned FastPictureView codec (~15$). I don't know if Pentax provides something for this purpose -if not, then you should try (free) ArcSoft thumbnail viewer:
http://www.arcsoft.com/estore/software_title.asp?ProductCode=RTV
-it's a bit older, so it might not support some newer raw files, but it works otherwise (for 32bit windows only!).

Bogdan

Beholder3

Hi,

I think I have the FastPicturevIewer 1.66 (the last free one) installed. And in addition to that the Pentax RAW Codec.
In Windows Explorer thumbnails for both JPEG, DNG, CR2 and PEF are generated quickly as usual. No problems there.

In exiftoolGUI there is also no issue with DNG or CR2. But still there is that freeze (mouse cursor is still moving though and other apllications run fine during the wait) in exiftoolGUI when I select a PEF file. This happens also when using the K200 PEF from the discussed website.

It seems when selecting the PEF the exif data is displayed quickly most of the time. Only after this something gets stuck and the preview is not shown. But I must repeat that windows explorer has no issues with the preview.

In sysinternals process explorer I can see that the CPU load is generated in the process dllhost under svchost and after a while the process werfault starts (which means there is an error somewhere) and ends. After werfault ends GUI works again.
dllhost the strings "error opening file" and "error opening process".

BogdanH

Hi,
As mentioned, for showing preview, GUI doesn't care what kind of image is needed to be displayed. Even further: GUI actually doesn't check what kind of image that is. The only exception is jpg: if checked in GUI preferences, then GUI rotates image accordingly (because Windows doesn't use Orientation tag value). So, to put it simple, GUI sends the command to windows: "here's a file name, I need a image of Width x Height size" -and GUI will display whatever comes from Windows.
I am explaining this, just to emphasize, that GUI has no influence on speed (or quality) of displayed preview.

Now, why do you have two (FastPicture & Pentax) codec installed? This isn't the best practice, IMO... FastPictureView codec is actually not a "real" codec: by default, it only displays preview image which reside inside raw (and it does that very fast). On the other hand, original codecs usually deliver real (processed) raw image, which isn't that fast... and while previews comming from FastPicture codec are cached by Windows (to gain speed in next request), I have no idea how Pentax codec handles that.
A hint: I could use original (free) Canon codec for my photos... but I don't.

Bogdan

Beholder3

Hi,

I pushed the "Details" Button now to only show thumbnails. There the normal windows thumbnail shows up as in explorer with no problem. Only when I select it, GUI gets stuck.
The "display problem" I seem to perceive is not the thumbnails, but the "bigger" "preview" in the lower left corner. Thats not quickly displayed.
I'll fiddle around with installing and uninstalling the codecss now...

Beholder3

Did remove Pentax Raw codec. Now it works.  :o As you said.  ;) Man, what a sillyness. I assumed manufacturers should know it best. Wrong.
Anyhow - problem solved.

BogdanH

Hi,
I'm glad to hear you solved this.

Bogdan

Antanico


Hello Experts of EXIF,
As I am working with PEF files too and I cannot manage with the preview could you confirm that I need to remove the Pentax RAW codec?
Am I able to see the K5 activation shots then? (The numbers of picture that the camera took).
Kindet regards,
Ant

Phil Harvey

Hi Ant,

ExifTool does extract ShutterCount for the K-5.  You should be able to see this if you fix your PEF problems.

- 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 ($).