"file.length" is not accuracy


var savefile = new file(et_outpath.text + "/" + (m + 1) + "_" + (n + 1) + houzui);                 {                 qlty = qlty-5;                 savefile=new file(exportweb (savefile,qlty,format,png8))                 savefile.remove();                 exportweb (savefile, qlty, format,png8);                      if (qlty<=0){                           alert("无法压缩至指定文件大小");                              app.activedocument.close(saveoptions.donotsavechanges);                             ac_doc.selection.deselect();                             w.enabled = true;                             bt_cut.text = "开始";                             return;                         }                 } while (savefile.length > parseint(et_imgkb.text)*1024)          app.activedocument.close(saveoptions.donotsavechanges); 

 

qq截图20161112172153.png

you enter full script

and more problem.



More discussions in Photoshop Scripting


adobe

Comments

Popular posts from this blog

Extracting portions of an image

shape alpha vs layer alpha in cc library

Photoshop CC 2017 - Ruler Tool - Error 8007...