Main Menu

JpgFromRaw Sony ARW

Started by mdt, August 16, 2012, 02:03:10 AM

Previous topic - Next topic

mdt

I'm trying to extract jpeg images from raw images from 2 cameras - a Sony DSLR-A100 (.ARW) and a Pentax K-5 (.PEF).  I can extract jpeg thumbnail or preview from either file type, and full size jpeg from the Pentax files, but not the full size image from the Sony files. In other words,

Works:
exiftool -b -ThumbnailImage IMGPXXXX.PEF
exiftool -b -PreviewImage IMGPXXXX.PEF
exiftool -b -JpgFromRaw IMGPXXXX.PEF
exiftool -b -ThumbnailImage DSC0XXXX.ARW
exiftool -b -PreviewImage DSC0XXXX.ARW

Doesn't work:
exiftool -b -JpgFromRaw DSC0XXXX.ARW

Any advice?

Phil Harvey

ExifTool only extracts information that is available.  Not all RAW images contain a full-sized JpgFromRaw.  It seems the A100 ARW is one of these.

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

mdt

Thanks for the quick reply. I gather, then, that exiftool extracts a full size jpeg that's in the .PEF file separate from the raw image data, rather than creating the jpeg from the raw image data.

Is there a way to create a full size jpeg from the raw image data? I can do it with Lightroom, of couse, but want to also be able to do it in a php script.

Phil Harvey

Yes.  ExifTool does not manipulate image data.

To create a JPEG from a RAW image, look at David Coffin's dcraw.

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

mdt

OK, that's what I suspected.

I tried dcraw, but it's too slow to be useful for what I have in mind. I have a php photo database I've written, and shoot raw+jpeg partly so I can use the jpegs to display thumbnails, previews, and the full size images. With the Pentax K-5 I recently bought, I could dispense with the jpeg file since there's one embedded in the raw file, but no such luck with the Sony files.

Thanks again for your help. The more I play with ExifTool, the more I like it.

Mark

Phil Harvey

Hi Mark,

I own a K-5 myself and always shoot RAW+JPEG because the JPEG quality of the embedded image sucks.  I wish you could configure it.  If you use the in-camera histogram you will notice ugly "combing" artefacts in the histogram when shooting RAW-only with a subject that has large areas of gradually changing colour (like a blue sky).  In the image these show up as ugly bands of colour instead of a nice smooth gradation.  Switch to RAW+JPEG and these artefacts disappear.

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

mdt

On your K-5 do you shoot .PEF or .DNG? What's your rationale? Does the .DNG the camera produces contain all the same data as .PEF?

So far I'm shooting .PEF (+JPEG) but wondering if that's the best thing to do. I did notice that the only raw choice on the new Pentax K-30 is .DNG.

Mark

Phil Harvey

Hi Mark,

I shoot RAW+PEF, but I don't think there is much difference between PEF and DNG for the K-5.  I got accustomed to the PEF for the K10D since the DNG was much larger for that camera, and just kept using PEF for the K-5 even though the file size is no longer an issue.

But I did find one unexpected advantage of shooting PEF:  LightRoom doesn't modify these files.  I shot a few DNG's with the K-5, and found that LightRoom modified them without any warning (to add metadata).  I don't trust the Adobe utilities to write my RAW images since they have demonstrated a lack of concern for preserving proprietary metadata.

As far as I can tell the DNG contains the same information as the PEF.

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

mdt

I agree that I don't like Lightroom messing with my raw files. Thanks again for your help.

Mark