Bash script to display CRS Crop information stored in XMP Meta tags. Uses XMP sidecar file if used on RAW files.
Requires Phil Harvey's exiftool which is installable via Homebrew.
$ show-crop image1 [ images ...]
$ show-crop image-nocrop.tif "image-cropped.tiff" "test-cropped.NEF"
# First image
Warning: No CRS crop data available for 'image-nocrop.tif'.
# Second image image
image-cropped.tiff
HasCrop: True
CropTop: 0.113804
CropLeft: 0.129985
CropBottom: 0.621707
CropRight: 0.868538
CropAngle: 0
CropWidth:
CropHeight:
CropUnits:
# Third image
Warning: Image 'test-cropped.NEF' itself has no CRS crop data, use XMP sidecar instead: test-cropped.xmp
test-cropped.xmp
HasCrop: True
CropTop: 0.02378
CropLeft: 0.075063
CropBottom: 0.87985
CropRight: 0.710592
CropAngle: 0
CropWidth:
CropHeight:
CropUnits:
When used on RAW files, its XMP sidecar file will be evaluated instead. The reason is: Since typical RAW files do not carry crop data in themselves, RAW converters will typically put a XMP sidecar file beneath them to store their editing actions like cropping.
$ git clone https://github.com/tomkyle/show-crop.git