Skip to content

Commit 75a45d7

Browse files
committed
Update run script to use local imagemagick not docker one.
1 parent 38875a3 commit 75a45d7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

run.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ docker run --rm --entrypoint /home/twlandsat/scripts/gdal2tiles.sh -v $OUTPUTDIR
8282

8383
dt=`date '+%Y-%m-%d %H:%M:%S'`
8484
echo -e "\e[34m$dt\e[0m Generate preview"
85-
docker run --rm --entrypoint /home/twlandsat/scripts/imagemagick.sh -v $OUTPUTDIR:/root/landsat jimyhuang/twlandsat $LANDSAT ${LANDSAT}_NDVI.TIF ndvi.png
86-
docker run --rm --entrypoint /home/twlandsat/scripts/imagemagick.sh -v $OUTPUTDIR:/root/landsat jimyhuang/twlandsat $LANDSAT ${LANDSAT}_bands_432.TIF rgb.png
85+
cd $OUTPUTDIR/$LANDSAT && convert ${LANDSAT}_NDVI.TIF -scale 600 -fuzz 5% -transparent black ndvi.png
86+
cd $OUTPUTDIR/$LANDSAT && convert ${LANDSAT}_NDVI.TIF -scale 1920 ndvi.jpg
87+
cd $OUTPUTDIR/$LANDSAT && convert ${LANDSAT}_bands_432.TIF -scale 600 -fuzz 5% -transparent black rgb.png
88+
cd $OUTPUTDIR/$LANDSAT && convert ${LANDSAT}_bands_432.TIF -scale 1920 rgb.png
8789

8890
dt=`date '+%Y-%m-%d %H:%M:%S'`
8991
echo -e "\e[34m$dt\e[0m Final clear"

scripts/imagemagick.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
NAME=$1
77
FROM=$2
88
TO=$3
9+
if [ -n "$4" ]; then
10+
SIZE=$4
11+
else
12+
SIZE=600
13+
fi
914

1015
cd ~/landsat/processed/${NAME}
11-
convert $2 -scale 600 -fuzz 5% -transparent black $3
16+
convert $FROM -scale $SIZE -fuzz 5% -transparent black $TO

0 commit comments

Comments
 (0)