ExifTool Forum

ExifTool => Newbies => Topic started by: dpawson on July 09, 2020, 06:22:29 AM

Title: extract thumbnail from RAF file?
Post by: dpawson on July 09, 2020, 06:22:29 AM
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?

Title: Re: extract thumbnail from RAF file?
Post by: Phil Harvey on July 09, 2020, 08:19:23 AM
Can you send me the RAF image so I can take a look?  (philharvey66 at gmail.com)

- Phil
Title: Re: extract thumbnail from RAF file?
Post by: dpawson on July 09, 2020, 09:13:46 AM
Sent, via google link due size.
Title: Re: extract thumbnail from RAF file?
Post by: Phil Harvey on July 09, 2020, 11:22:53 AM
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
Title: Re: extract thumbnail from RAF file?
Post by: dpawson on July 10, 2020, 04:10:00 AM
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











Title: Re: extract thumbnail from RAF file?
Post by: Phil Harvey on July 10, 2020, 05:21:34 AM
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
Title: Re: extract thumbnail from RAF file?
Post by: dpawson on July 10, 2020, 01:48:49 PM
Tried with the Gimp, same 'error' reported.
With what are you viewing the jpg please Phil?
Title: Re: extract thumbnail from RAF file?
Post by: StarGeek on July 10, 2020, 02:50:58 PM
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.
Title: Re: extract thumbnail from RAF file?
Post by: dpawson on July 11, 2020, 03:12:49 AM
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?
Title: Re: extract thumbnail from RAF file?
Post by: Phil Harvey on July 11, 2020, 06:58:22 AM
Quote from: dpawson on July 11, 2020, 03:12:49 AM
Config file LOADED!

There is your 20 bytes.

- Phil
Title: Re: extract thumbnail from RAF file?
Post by: dpawson on July 11, 2020, 07:10:33 AM
Oh dear, finger trouble again.
  Sorry to waste bandwidth Phil

Thanks for the help.
Title: Re: extract thumbnail from RAF file?
Post by: StarGeek on July 11, 2020, 10:55:59 AM
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.