[fix] erreur on generation when refresh rendering
This commit is contained in:
parent
2f1c5277e0
commit
e1b0c60b65
1 changed files with 20 additions and 13 deletions
|
@ -96,27 +96,29 @@ fi
|
||||||
case $renderType in
|
case $renderType in
|
||||||
# thumbnail only
|
# thumbnail only
|
||||||
t)
|
t)
|
||||||
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 -filter Lanczos -thumbnail "$thumbSize" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 -filter Lanczos -thumbnail "$thumbSize" "../cache/tmp/$hashUrl""_thumb.png"
|
||||||
if [ $optimizeTool ]
|
if [ $optimizeTool ]
|
||||||
then
|
then
|
||||||
eval $optimizeTool "../cache/img/$startPath""$hashUrl""_thumb.png"
|
eval $optimizeTool "../cache/tmp/$hashUrl""_thumb.png"
|
||||||
fi
|
fi
|
||||||
rm "../cache/tmp/$hashUrl.png"
|
mv "../cache/tmp/$hashUrl""_thumb.png" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
||||||
if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" ]]
|
if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" ]]
|
||||||
then
|
then
|
||||||
echo 1
|
echo 1
|
||||||
else
|
else
|
||||||
echo 0
|
echo 0
|
||||||
fi
|
fi
|
||||||
|
rm "../cache/tmp/$hashUrl.png"
|
||||||
;;
|
;;
|
||||||
# thumbnail + complete
|
# thumbnail + complete
|
||||||
tc)
|
tc)
|
||||||
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 -filter Lanczos -thumbnail "$thumbSize" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 -filter Lanczos -thumbnail "$thumbSize" "../cache/tmp/$hashUrl""_thumb.png"
|
||||||
if [ $optimizeTool ]
|
if [ $optimizeTool ]
|
||||||
then
|
then
|
||||||
eval $optimizeTool "../cache/img/$startPath""$hashUrl""_thumb.png" "../cache/tmp/$hashUrl.png"
|
eval $optimizeTool "../cache/tmp/$hashUrl""_thumb.png" "../cache/tmp/$hashUrl.png"
|
||||||
fi
|
fi
|
||||||
mv "../cache/tmp/$hashUrl.png" "../cache/img/$startPath""$hashUrl""_complete.png"
|
mv "../cache/tmp/$hashUrl.png" "../cache/img/$startPath""$hashUrl""_complete.png"
|
||||||
|
mv "../cache/tmp/$hashUrl""_thumb.png" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
||||||
if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" && -f "../cache/img/$startPath""$hashUrl""_complete.png" ]]
|
if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" && -f "../cache/img/$startPath""$hashUrl""_complete.png" ]]
|
||||||
then
|
then
|
||||||
echo 1
|
echo 1
|
||||||
|
@ -126,13 +128,14 @@ case $renderType in
|
||||||
;;
|
;;
|
||||||
# thumbnail + realsize
|
# thumbnail + realsize
|
||||||
tr)
|
tr)
|
||||||
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 "../cache/img/$startPath""$hashUrl.png"
|
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 "../cache/tmp/$hashUrl.png"
|
||||||
convert "../cache/img/$startPath""$hashUrl.png" -filter Lanczos -thumbnail "$thumbSize" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
convert "../cache/tmp/$hashUrl.png" -filter Lanczos -thumbnail "$thumbSize" "../cache/tmp/$hashUrl""_thumb.png"
|
||||||
if [ $optimizeTool ]
|
if [ $optimizeTool ]
|
||||||
then
|
then
|
||||||
eval $optimizeTool "../cache/img/$startPath""$hashUrl""_thumb.png" "../cache/img/$startPath""$hashUrl.png"
|
eval $optimizeTool "../cache/tmp/$hashUrl""_thumb.png" "../cache/tmp/$hashUrl.png"
|
||||||
fi
|
fi
|
||||||
rm "../cache/tmp/$hashUrl.png"
|
mv "../cache/tmp/$hashUrl.png" "../cache/img/$startPath""$hashUrl.png"
|
||||||
|
mv "../cache/tmp/$hashUrl""_thumb.png" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
||||||
if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" && -f "../cache/img/$startPath""$hashUrl.png" ]]
|
if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" && -f "../cache/img/$startPath""$hashUrl.png" ]]
|
||||||
then
|
then
|
||||||
echo 1
|
echo 1
|
||||||
|
@ -142,19 +145,23 @@ case $renderType in
|
||||||
;;
|
;;
|
||||||
# thumbnail + realsize + complete
|
# thumbnail + realsize + complete
|
||||||
trc)
|
trc)
|
||||||
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 "../cache/img/$startPath""$hashUrl.png"
|
cp "../cache/tmp/$hashUrl.png" "../cache/tmp/$hashUrl""_complete.png"
|
||||||
convert "../cache/img/$startPath""$hashUrl.png" -filter Lanczos -thumbnail "$thumbSize" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 "../cache/tmp/$hashUrl.png"
|
||||||
|
convert "../cache/tmp/$hashUrl.png" -filter Lanczos -thumbnail "$thumbSize" "../cache/tmp/$hashUrl""_thumb.png"
|
||||||
if [ $optimizeTool ]
|
if [ $optimizeTool ]
|
||||||
then
|
then
|
||||||
eval $optimizeTool "../cache/img/$startPath""$hashUrl""_thumb.png" "../cache/img/$startPath""$hashUrl.png" "../cache/tmp/$hashUrl.png"
|
eval $optimizeTool "../cache/tmp/$hashUrl""_thumb.png" "../cache/tmp/$hashUrl.png" "../cache/tmp/$hashUrl""_complete.png"
|
||||||
fi
|
fi
|
||||||
mv "../cache/tmp/$hashUrl.png" "../cache/img/$startPath""$hashUrl""_complete.png"
|
mv "../cache/tmp/$hashUrl.png" "../cache/img/$startPath""$hashUrl.png"
|
||||||
|
mv "../cache/tmp/$hashUrl""_thumb.png" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
||||||
|
mv "../cache/tmp/$hashUrl""_complete.png" "../cache/img/$startPath""$hashUrl""_complete.png"
|
||||||
if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" && -f "../cache/img/$startPath""$hashUrl.png" && -f "../cache/img/$startPath""$hashUrl""_complete.png" ]]
|
if [[ -f "../cache/img/$startPath""$hashUrl""_thumb.png" && -f "../cache/img/$startPath""$hashUrl.png" && -f "../cache/img/$startPath""$hashUrl""_complete.png" ]]
|
||||||
then
|
then
|
||||||
echo 1
|
echo 1
|
||||||
else
|
else
|
||||||
echo 0
|
echo 0
|
||||||
fi
|
fi
|
||||||
|
rm "../cache/tmp/$hashUrl.png"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue