Linux处理图片,linux下的图片处理

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

#!/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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值