Using Batch Processor settings as variables in Batch Processor metadata

Started by monochrome, May 07, 2018, 07:38:37 PM

Previous topic - Next topic

monochrome

When exporting a 360 image for Facebook, I need to do two things:

* Shrink it
* Add metadata

Shrinking it is easy - just input the new size. But Facebook requires me to add the output image size in the metadata. So, for example, if I produce a 4096x2048 output image (irrespective of the input image size), I need to add the metadata:


-ProjectionType=equirectangular
-FullPanoWidthPixels=4096
-FullPanoHeightPixels=2048
-CroppedAreaLeftPixels=0
-CroppedAreaTopPixels=0
-CroppedAreaImageWidthPixels=4096
-CroppedAreaImageHeightPixels=2048


Is there a way to substitute the literal values here with variables?

Mario

If you set these tags via the "Custom Metadata" option in the Batch Processor you can use IMatch variables.
But there are no variables which return the output dimensions of the image. I'm not sure that the resulting image dimensions are even available when the metadata is parsed.
The output image (unless suppressed) will have standard EXIF image data, which includes the width and height.

Have you tried using {File.Width} and {File.Height} ? Which dimensions are then written to the output file?

I'm not sure which demands (...) Facebook makes for allowing you to upload images.
But if you output the images to a folder indexed by IMatch you can run a Metadata Template afterwards which copies the image dimensions to whatever tag Facebook demands.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I have found a simple solution (using ExifTool Magic):

If you use a Custom Metadata Expression like:

-title < $ImageWidth x $ImageHeight

ExifTool will set the title tag in the output file with the width x height (as text) of the output file.
You can use that to set whatever metadata tag you need to set in the output file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook