优化超高像素异常图片水印

master
panqihua 3 years ago
parent 47268b7b83
commit 6a9f93d6fd
  1. 4
      pixiv/pixiv.sh

@ -279,11 +279,11 @@ for index in $(seq 1 $length); do
echo "转换响应:$result"
if [[ $(echo $result | jq -r .status) = ok && $(echo $result | jq -r .data.step) = finish ]]; then
compress_size=$(echo $result | jq -r .data.output.size)
echo "${original_file_name}文件体积:${original_file_size}字节,压缩后的字节${compress_size}"
echo "${original_file_name}文件体积:${original_file_size}字节,压缩后:${compress_size}字节"
if [ $compress_size -gt $maxFileSize ]; then
echo "压缩无效,返回异常图片"
FileSize=$(fileSizeStr $compress_size)
url="https://$bucketname.$accelerateHost/$error_file?x-oss-process=image/watermark,text_$(echo "画作pid:$pid" | base64),g_north/watermark,text_$(echo 因为图片文件体积:${FileSize}不合法 | base64 | sed 's/+/-/g; s,/,_,g'),color_FF0000,y_50,g_north/watermark,text_5omA5Lul57yp55Wl5Zu-5peg5rOV5LiK5Lyg5YiwdGVsZWdyYW0=,color_FF0000,y_100,g_north/watermark,text_5bi46KeB5LqO6LaF6ZW_5p2h54q25ryr55S7,y_150,g_north/watermark,text_5rOo5oSP77ya4oCc6aKE6KeI5Y6f5Zu-4oCd44CB4oCc5Yqg6YCf5LiL6L295Y6f5Zu-4oCd,color_008800,y_200,g_north/watermark,text_5Lul5LiK5Yqf6IO954Wn5bi45L2_55So,color_008800,y_250,g_north"
url="https://$bucketname.$accelerateHost/$error_file?x-oss-process=image/watermark,text_$(echo "画作pid:$pid" | base64),g_north/watermark,text_$(echo 因为图片文件体积:${FileSize}不合法 | base64 | sed 's/+/-/g; s,/,_,g'),color_FF0000,y_50,g_north/watermark,text_5omA5Lul57yp55Wl5Zu-5peg5rOV5LiK5Lyg5YiwdGVsZWdyYW0=,color_FF0000,y_100,g_north/watermark,text_5bi46KeB5LqO6LaF6auY5YOP57Sg5Zu-54mH,y_150,g_north/watermark,text_5rOo5oSP77ya4oCc6aKE6KeI5Y6f5Zu-4oCd44CB4oCc5Yqg6YCf5LiL6L295Y6f5Zu-4oCd,color_008800,y_200,g_north/watermark,text_5Lul5LiK5Yqf6IO954Wn5bi45L2_55So,color_008800,y_250,g_north"
echo "文字水印请求url:$url"
curl -v $url -o $webp_file_name
else

Loading…
Cancel
Save