/* Image Gallery Magic (iGM) by PVII Copyright 2006,2007 Project Seven Development. All rights reserved. --------------------------------------------------------------- www.projectseven.com --------------------------------------------------------------- PVII Image Gallery Magic Fireworks Optimization and Export Directives JSF Revision: C --------------------------------------------------------------- */ var thePath,theFPath,theTPath,theDoc,i=0,mS='',runIt=true,tPrompt=false; var theSourceImage,theFullImage,theThumbImage; var theDestPath=String.fromCharCode(102,105,108,101,58,47,47,47,77,97,99,105,110,116,111,115,104,32,72,68,47,85,115,101,114,115,47,104,121,112,101,114,115,99,97,108,101,47,68,111,99,117,109,101,110,116,115,47,119,101,98,115,47,109,105,115,115,105,110,103,95,108,121,110,120,47,114,101,118,105,101,119,115,47,103,101,114,109,97,110,47,112,55,104,103,95,105,109,103,95,51,57); var theSourceFolder=String.fromCharCode(102,105,108,101,58,47,47,47,77,97,99,105,110,116,111,115,104,32,72,68,47,85,115,101,114,115,47,104,121,112,101,114,115,99,97,108,101,47,68,111,99,117,109,101,110,116,115,47,116,101,109,112,104,121,112,101,114,102,105,108,101,115,47,109,105,115,115,105,110,103,45,108,121,110,120,47,114,101,118,105,101,119,115,47,98,114,101,116,116); var fullOpt=({colorMode:"24 bit", exportFormat:"JPEG", jpegQuality:80, jpegSmoothness:0, jpegSubsampling:0, name:"JPEG - Better Quality", numEntriesRequested:256, }); var thumbOpt=({applyScale:true, colorMode:"24 bit", exportFormat:"JPEG", jpegQuality:60, jpegSmoothness:2, jpegSubsampling:1, name:"JPEG - Smaller File", numEntriesRequested:0, percentScale:100, useScale:false, xSize:-100, ySize:-100}); fw.progressCountTotal=10; fw.progressCountCurrent=0; fw.dismissBatchDialogWhenDone=true; function checkContinueProcess(im){ runIt=fw.yesNoDialog('FW could not open image source file:\n'+im+'\n\nDo you wish to continue processing the remaining images?'); } function checkFileWrite(tP,tY){ var retVal=true; if(tPrompt){ if(Files.exists(tP)){ if(!fw.yesNoDialog('The '+tY+' image file:\n\n'+tP+'\n\nalready exists. Do you wish to replace the file?')){ retVal=false; } } } return retVal; } function P7_processImage(){ fw.batchStatusString=theSourceImage; thePath=theSourceFolder+'/'+theSourceImage; theDoc=fw.openDocument(thePath); if(theDoc&&runIt){ if(theFullImage!='none'){ theFPath=theDestPath+'/fullsize/'+theFullImage; if(checkFileWrite(theFPath,'Full Size')){ fw.exportDocumentAs(theDoc,theFPath,fullOpt); } } theTPath=theDestPath+'/thumbs/'+theThumbImage; if(checkFileWrite(theTPath,'Thumnail')){ fw.exportDocumentAs(theDoc,theTPath,thumbOpt); } fw.closeDocument(theDoc,false); }else{ checkContinueProcess(thePath); } } fw.progressCountCurrent=1; theSourceImage=String.fromCharCode(49,48,32,80,104,111,116,111,32,101,116,99,104,32,49,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(49,48,95,80,104,111,116,111,95,101,116,99,104,95,49,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=2; theSourceImage=String.fromCharCode(49,49,32,80,104,111,116,111,32,101,116,99,104,32,50,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(49,49,95,80,104,111,116,111,95,101,116,99,104,95,50,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=3; theSourceImage=String.fromCharCode(50,32,70,105,103,104,116,105,110,103,32,99,111,109,112,97,114,116,109,101,110,116,32,114,111,111,102,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(50,95,70,105,103,104,116,105,110,103,95,99,111,109,112,97,114,116,109,101,110,116,95,114,111,111,102,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=4; theSourceImage=String.fromCharCode(51,32,70,114,111,110,116,32,117,112,112,101,114,32,104,117,108,108,32,112,108,97,116,101,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(51,95,70,114,111,110,116,95,117,112,112,101,114,95,104,117,108,108,95,112,108,97,116,101,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=5; theSourceImage=String.fromCharCode(52,32,83,105,100,101,32,112,108,97,116,101,32,119,105,116,104,32,119,101,108,100,32,98,101,97,100,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(52,95,83,105,100,101,95,112,108,97,116,101,95,119,105,116,104,95,119,101,108,100,95,98,101,97,100,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=6; theSourceImage=String.fromCharCode(53,32,83,117,115,112,101,110,115,105,111,110,32,109,111,117,110,116,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(53,95,83,117,115,112,101,110,115,105,111,110,95,109,111,117,110,116,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=7; theSourceImage=String.fromCharCode(54,32,71,117,110,32,109,117,122,122,108,101,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(54,95,71,117,110,95,109,117,122,122,108,101,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=8; theSourceImage=String.fromCharCode(55,32,84,121,114,101,115,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(55,95,84,121,114,101,115,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=9; theSourceImage=String.fromCharCode(56,32,84,114,97,99,107,32,108,105,110,107,115,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(56,95,84,114,97,99,107,95,108,105,110,107,115,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=10; theSourceImage=String.fromCharCode(57,32,73,99,101,32,115,112,114,97,103,115,46,106,112,103); theFullImage='none'; theThumbImage=String.fromCharCode(57,95,73,99,101,95,115,112,114,97,103,115,95,116,109,98,46,106,112,103); P7_processImage();