Newbie here.
I want to execute an EXIFTool command from a C# Winforms program to extract the thumbnails from a folder as JPG images and write them to a file with the same name plus a suffix, such as thumb, in a different folder. I used Brain2CPU.ExifTool to extract EXIF data but couldn't see a way to get thumbnails in that library. So, I wondered if I could use ExifTool directly. I should be able to execute a command line command from my code.
The command could be something like this:
exiftool -thumbnailimage -b -w OTHER_FOLDER/%f_thumb.jpg DIR
- Phil
Thanks. That works and it is very fast. If I also wanted JPG images to be extracted, how would I do that? Also, can I specify the RAW extension in the command?
-thumbnailimage works, but -jpgfromraw doesn't produce any files. Is it possible to convert RAW files to JPG copies?
C:\Temp\Temp>exiftool -jpgfromraw -b -w C:\Temp\Temp\Temp/"%f_jpg.jpg" I:\RawPictures\Aircraft\AirShow15\Raw
1 directories scanned
107 image files read
0 output files created
C:\Temp\Temp>exiftool -thumbnailimage -b -w C:\Temp\Temp\Temp/"%f_jpg.jpg" I:\RawPictures\Aircraft\AirShow15\Raw
1 directories scanned
107 image files read
107 output files created
You can extract all preview images like this:
exiftool -preview:all -a -b -W OTHER_FOLDER/%f_%t%-c.%s DIR
(this is the 9th example here (https://exiftool.org/exiftool_pod.html#READING-EXAMPLES))
ExifTool only extracts previews that exist. I doesn't do conversions.
- Phil
Quote from: PatD on March 20, 2024, 09:40:04 PMIs it possible to convert RAW files to JPG copies?
You can use programs like Irfanview (https://www.irfanview.com/) (Windows) or XNView (https://www.xnview.com/en/) (multi-platform) to create JPEGs from RAW files. Both have batch processing, IIRC.
On the command line, you would want to use ImageMagick (https://imagemagick.org/) (multi-platform).
Thanks.
It turns out that the preview images from Sony RAW files met my needs for something larger than a thumbnail but not the full image size. At 1616x1080, the preview images look good on a monitor. ExitTool's -preview:PreviewImage does what I wanted. I'll have to check Canon, Nikon etc. to see what their preview images are like,
I'm using ImageMagic from C# to get JPGs from Sony RAW files. It takes a few seconds per image so I only use it at the point where a user wants to see much more detail.