#!/bin/sh # Photo-Sphere Metadaten: # https://developers.google.com/streetview/spherical-metadata # # Beschraenkungen: # Max. 41 Megapixel: 9000 x 4500 clear for file in "$@"; do # Zunaechst ist der Himmel gerechnet, spaeter kann man nicht mehr in den Himmel scrollen typeset -i WIDTH360=`exiftool "$file" | grep -i "Exif Image Width" | awk '{print $5}'` typeset -i HEIGHT360=$WIDTH360/2 typeset -i HEIGHTCURRENT=`exiftool "$file" | grep -i "Exif Image Height" | awk '{print $5}'` typeset -i CROPPEDAREATOP=$HEIGHT360-$HEIGHTCURRENT typeset -i CROPPEDAREAHEIGHT=$HEIGHT360-$CROPPEDAREATOP echo "Hoehe 360 Grad: $WIDTH360" echo "Breite 360 Grad: $HEIGHT360" if [[ $((HEIGHTCURRENT % 2)) -eq 0 ]]; then echo "Hoehe tatsaechlich: $HEIGHTCURRENT"; else echo "Hoehe tatsaechlich: $HEIGHTCURRENT ACHTUNG UNGERADE!!!!"; fi echo "Cropped Area Top: $CROPPEDAREATOP" echo "Cropped Area Height: $CROPPEDAREAHEIGHT" exiftool -ProjectionType="equirectangular" \ -UsePanoramaViewer="TRUE" \ -"FullPanoWidthPixels=$WIDTH360" \ -"FullPanoHeightPixels=$HEIGHT360" \ -"CroppedAreaTopPixels=$CROPPEDAREATOP" \ -CroppedAreaLeftPixels=0 \ -"CroppedAreaImageWidthPixels=$WIDTH360" \ -"CroppedAreaImageHeightPixels=$CROPPEDAREAHEIGHT" \ -Overwrite_Original \ "$file" exiftool "$file" | grep -i "Cropped Area" exiftool "$file" | grep -i "Full Pano" exiftool "$file" | grep -i "Projection" exiftool "$file" | grep -i "Use Panorama" done