该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
#!/bin/bash
echo 将全景展开图 pano.tif 变换为立方体6面切片
echo 按任意键继续
read -n 1
echo
echo -----------------------------------------------------
echo -n "输入立方体的棱长:"
read edge
echo -n "输入pano.tif的高度:"
read height
width=`expr $height * 2`
echo -----------------------------------------------------
echo Generating Face_0 FRONT
echo p f0 w$edge h$edge v90 >script.txt
echo m g1 i2 f0 m0>>script.txt
echo o w$width h$height f4 p0 r0 v360 y0 u10 m0 n"pano.tif">>script.txt
nona -o pano_f.tif script.txt
echo
echo -----------------------------------------------------
echo Generating Face_1 RIGHT
echo p f0 w$edge h$edge v90 >script.txt
echo m g1 i2 f0 m0>>script.txt
echo o w$width h$height f4 p0 r0 v360 y270 u10 m0 n"pano.tif">>script.txt
nona -o pano_r.tif script.txt
echo
echo -----------------------------------------------------
echo Generating Face_2 BACK
echo p f0 w$edge h$edge v90 >script.txt
echo m g1 i2 f0 m0>>script.txt
echo o w$width h$height f4 p0 r0 v360 y180 u10 m0 n"pano.tif">>script.txt
nona -o pano_b.tif script.txt
echo
echo -----------------------------------------------------
echo Generating Face_3 LEFT
echo p f0 w$edge h$edge v90 >script.txt
echo m g1 i2 f0 m0>>script.txt
echo o w$width h$height f4 p0 r0 v360 y90 u10 m0 n"pano.tif">>script.txt
nona -o pano_l.tif script.txt
echo
echo -----------------------------------------------------
echo Generating Face_4 UP
echo p f0 w$edge h$edge v90 >script.txt
echo m g1 i2 f0 m0>>script.txt
echo o w$width h$height f4 p270 r0 v360 y0 u10 m0 n"pano.tif">>script.txt
nona -o pano_u.tif script.txt
echo
echo -----------------------------------------------------
echo Generating Face_5 DOWN
echo p f0 w$edge h$edge v90 >script.txt
echo m g1 i2 f0 m0>>script.txt
echo o w$width h$height f4 p90 r0 v360 y0 u10 m0 n"pano.tif">>script.txt
nona -o pano_d.tif script.txt
echo
#del script.txt
#for i in *.CR2; do newname=${i%CR2}jpg; dcraw -c -w $i | convert ppm:- $newname; exiftool -overwrite_original -tagsFromFile $i $newname; done
#for i in *.jpg; do convert -resize 1024x1024 $i $i; done
for i in pano_*.tif;do newname=${i%tif0000.tif}jpg; convert $i $newname; done