[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
|
||||
# thumbnail only
|
||||
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 ]
|
||||
then
|
||||
eval $optimizeTool "../cache/img/$startPath""$hashUrl""_thumb.png"
|
||||
eval $optimizeTool "../cache/tmp/$hashUrl""_thumb.png"
|
||||
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" ]]
|
||||
then
|
||||
echo 1
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
rm "../cache/tmp/$hashUrl.png"
|
||||
;;
|
||||
# thumbnail + complete
|
||||
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 ]
|
||||
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
|
||||
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" ]]
|
||||
then
|
||||
echo 1
|
||||
|
@ -126,13 +128,14 @@ case $renderType in
|
|||
;;
|
||||
# thumbnail + realsize
|
||||
tr)
|
||||
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 "../cache/img/$startPath""$hashUrl.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 ]
|
||||
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
|
||||
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" ]]
|
||||
then
|
||||
echo 1
|
||||
|
@ -142,19 +145,23 @@ case $renderType in
|
|||
;;
|
||||
# thumbnail + realsize + complete
|
||||
trc)
|
||||
convert "../cache/tmp/$hashUrl.png" -crop 1280x1024+0+0 "../cache/img/$startPath""$hashUrl.png"
|
||||
convert "../cache/img/$startPath""$hashUrl.png" -filter Lanczos -thumbnail "$thumbSize" "../cache/img/$startPath""$hashUrl""_thumb.png"
|
||||
cp "../cache/tmp/$hashUrl.png" "../cache/tmp/$hashUrl""_complete.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 ]
|
||||
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
|
||||
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" ]]
|
||||
then
|
||||
echo 1
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
rm "../cache/tmp/$hashUrl.png"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue