Extract Larger Thumbnails/Previews (~512px)?

Started by Chris S, December 21, 2023, 01:29:22 PM

Previous topic - Next topic

Chris S

Is it possible to quickly extract an image thumbnail/preview from an image (PSB, PSD, TIF) on MacOS that's at least 512px?

BACKGROUND:
I need to quickly get an image preview (~512px) along with its metadata for analysis upon import to FileMaker.

The original images could be 8-bit to 32-bit, RGB or CMYK, layered or flattened, with or without Alpha/Spot Changes, with or without background transparency, saved as either TIFs, PSDs or PSBs from Photoshop, and can be as large as 10GB+.

I have no problems getting the metadata I need, except for image previews/thumbnails in the 512px range.

If I run the ExifTool Code below and it only outputs Photoshop Thumbnails, is that all I have to work with for the image thumbnails/previews with ExifTool?
exiftool -a -b -W %d%f_%t%-c.%s -preview:all DIR
Photoshop Thumbnails generated by the code below are 160px, so am assuming that's all I get from these?
exiftool -b -PhotoshopThumbnail in_path > out_path
QuickLook has some success getting 512px images:
qlmanage -t source_path -s 512 -o out_path
However, QuickLook has problems with larger PSBs (starts having challenges at 2.12GB, and >4.3GB+ will fail). It also doesn't always play well with TIFFs (particularly CMYK with Alpha and/or Spot Channels), or if they are over 2GB. Same is true of SIPS, which is even more finicky about first converting to RGB color space, etc.

ImageMagick is too slow when working with multi-GIG PSBs.

Any other suggestions how I might be able to achieve this?

StarGeek

Exiftool can only extract preview images that are actually in the file.  It cannot do anything with the actual image data.

If you have a file that you know has a bigger preview image that isn't extracted with your first command, you could post it here to see if support for it could be added.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Chris S

I wouldn't know how or where to look if it did have a larger preview in the file. Is there some code to find out if it does that you could recommend, other than the first code I have listed above?

Phil Harvey

Your first command will extract every stand-alone preview that ExifTool can find.

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

StarGeek

Quote from: Chris S on December 21, 2023, 02:44:56 PMI wouldn't know how or where to look if it did have a larger preview in the file.

I sounded to me that you knew there was a bigger thumb in the file.  As said, the first command will extract all the preview images in the file.  If you need something bigger, you will have to use image processing programs such as ImageMagick.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Chris S

OK. Thank you. QuickLook was able to generate 512px images for smaller files, but not the larger ones. I thought perhaps it was generating them from stored metadata thumbnails, but perhaps it is generating them from the image itself based on your feedback. Thank you for clarifying...