Révision 7f9aab46
Ajouté par Victor Pongnian il y a plus de 11 ans
to_tiles/gen_tiles.sh | ||
---|---|---|
8 | 8 |
max_scale=8 |
9 | 9 |
usage="$0 [-x <x_tile_size>] [-y <y_tile_size>] [-p <prefix_result>] [-t] [-h] [-m <min_zoom>] [-M <max_zoom>] <image_to_convert>\n example: $0 -r test_res" |
10 | 10 |
|
11 |
if ! which tifftopnm pnmscale convert > /dev/null; then
|
|
11 |
if ! which anytopnm pnmscale convert > /dev/null; then
|
|
12 | 12 |
echo "il faut installer les paquets netpbm et imageMagick pour utiliser ce script !" |
13 | 13 |
fi |
14 | 14 |
|
... | ... | |
44 | 44 |
|
45 | 45 |
wfname=$prefix.pnm |
46 | 46 |
if ! $test_mode; then |
47 |
tifftopnm $fname > $wfname
|
|
47 |
anytopnm $fname > $wfname
|
|
48 | 48 |
else |
49 |
echo "tifftopnm $fname > $wfname"
|
|
49 |
echo "anytopnm $fname > $wfname"
|
|
50 | 50 |
fi |
51 | 51 |
|
52 | 52 |
echo "préfixe : "$prefix |
... | ... | |
54 | 54 |
for ((z=$min_scale; z <= $max_scale; z++)) |
55 | 55 |
do |
56 | 56 |
fprefix=${prefix}_00$z |
57 |
printf -v ratio %1.4lf $(echo "1 / (2^$z)" | bc -l) |
|
57 |
LANG=C printf -v ratio %1.4lf $(echo "1 / (2^$z)" | bc -l)
|
|
58 | 58 |
echo génération du ratio $ratio |
59 | 59 |
zwfname=tmp.pnm |
60 | 60 |
|
Formats disponibles : Unified diff
Version réaliée pour la sage de Victor Pongnian