I have some TIFF files that each contain various sizes of their image
I need to extract those images and save as individual PNG files
I tried using Apple Preview and either I’m doing something wrong, there is a bug, or it simply can’t do it…
No matter which internal image I attempt to export, it always exports the first (largest one)
CGImageSource will enable you to open the image file, you can then loop through, extract the CGImage you want and send it to a CGImageDestination (specifying kUTTpePNG).
I believe if you write a small app that opens the file as a Picture you get a multimage and can iterate over them & export each one in whatever format you want
Here is a small app based on your suggestion… and information I subsequently found in the LR, and NO MBS or declares required
It is not fancy, saves the extracted images to the desktop… feel free to modify as you might see fit.
For cross platform solution, I would recommend to take a look on the TiffPictureMBS class in MBS Plugins.
Also the CGImageSourceMBS (Mac only) and GraphicsMagick classes (cross platform) should do it: GMImageArrayMBS and GM16ImageArrayMBS. Those can give you an array of images for all the representation.
[quote=359449:@Christian Schmitz]For cross platform solution, I would recommend to take a look on the TiffPictureMBS class in MBS Plugins.
Also the CGImageSourceMBS (Mac only) and GraphicsMagick classes (cross platform) should do it: GMImageArrayMBS and GM16ImageArrayMBS. Those can give you an array of images for all the representation.[/quote]
Thank you… this did what I needed to do, and I offer the code only as a courtesy