extract thumbnail from RAF file?

Started by dpawson, July 09, 2020, 06:22:29 AM

Previous topic - Next topic

dpawson

From another question Phil suggests

>exiftool -b -jpgfromraw JDP01214.RAF >tn.jpg

Tried eog tn.jpg and  it reports Error interpreting image file(Not a JPEG file; starts with 0x43 0x6f)
  Is this a Fuji issue please?


Phil Harvey

Can you send me the RAF image so I can take a look?  (philharvey66 at gmail.com)

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

dpawson


Phil Harvey

Here are the embedded previews you have available:

> exiftool JDP01214.RAF -preview:all -s
PreviewImage                   : (Binary data 914562 bytes, use -b option to extract)
ThumbnailImage                 : (Binary data 8360 bytes, use -b option to extract)


So I can't see why your tn.jpg would start with 0x43 0x6f -- it should be empty because JpgFromRaw doesn't exist.

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

dpawson

#4
Seems it is not the viewer I'm using (eog).
Using
>convert -scale 800x600 JDP01214.RAF  tn.jpg
eog shows the image no problem.

>  exiftool JDP01214.RAF -previewimage  -b >tn.jpg
Has the same issue, as does -bigimage












Phil Harvey

Quote from: dpawson on July 10, 2020, 04:10:00 AM
>  exiftool JDP01214.RAF -previewimage  -b >tn.jpg
Has the same issue

This command produces a perfectly good JPEG image.

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

dpawson

Tried with the Gimp, same 'error' reported.
With what are you viewing the jpg please Phil?

StarGeek

Are you on Windows?  If so, are you using PowerShell?

If so, switch to CMD.  PowerShell is known to corrupt binary data that is piped or shell redirected.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

dpawson

#8
OS is Linux Fedora 32, 64 bit.
exiftool 12.01
----------
Nominal differences
>  exiftool JDP01214.RAF  -preview:all -s
Config file LOADED!
PreviewImage                    : (Binary data 914562 bytes, use -b option to extract)
ThumbnailImage                  : (Binary data 8360 bytes, use -b option to extract)
BigImage                        : (Binary data 914562 bytes, use -b option to extract)
/data/files/photos/exiftest 10:28 >  exiftool JDP01214.RAF  -thumbnailimage -b >tn.jpg
/data/files/photos/exiftest 10:28 >  ls -al tn.jpg
-rw-r--r-- 1 dpawson dpawson 8380 Jul 11 10:28 tn.jpg

note tn.jpg is 20 bytes larger than 'predicted' by exiftool?

Phil Harvey

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

dpawson

Oh dear, finger trouble again.
  Sorry to waste bandwidth Phil

Thanks for the help.

StarGeek

Heh, that explains it.  From the Gimp error I looked up the Character values of the Hex it displayed and it was Co, which confused the heck outta me.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).