home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Creation de Vignettes (c) Jimmy Productions 1997
-
- ** Crée des vignettes à partir d'une liste d'images
-
- ** Pour GFXcon V1.7 (c) Dirk Farin
-
- */
-
- NL = '0A'X
- SQ = '27'X
- DQ = '22'X
- TRUE = 1
- FALSE = 0
-
- PARSE ARG argu
-
- File_path = WORD(argu,1)
- Sheight = WORD(argu,2)
- FilesList = ""
-
- open('file', 't:htmlcat12.tmp', 'R')
-
- nom = readln('file')
-
- DO WHILE nom ~=""
- FilesList = Fileslist||DQ||nom||DQ||" "
- nom = readln('file')
- END
-
- close('file')
-
- /*
- ** ----------------------------------------------------------
- ** Partie specifique adpro finie debut processus d'indexation
- ** ----------------------------------------------------------
- */
-
- ExtensionList:
-
- pref = "v"
-
- /*
- ** ----------------
- ** boucle multi-idx
- ** ----------------
- */
-
- OneMoreTime:
-
- Bool_Arret = FALSE
- Bool_LastFile = FALSE
- PosCut = 1
-
- DO WHILE Bool_LastFile = FALSE
-
- /* ! chargement ! */
-
- ListCut=POS('" "',FilesList,PosCut)
-
- IF ListCut = 0 THEN DO
- Bool_LastFile = TRUE
- ListCut = LENGTH(FilesList)
- END
-
- Length_FileName = ListCut - PosCut + 1
- File_to_Load = SUBSTR(FilesList,PosCut,Length_FileName)
-
-
- AnteCut = PosCut
- PosCut = ListCut+2
-
- ErrLoad = FALSE
-
- /* On recupere les info de l'image données par GfxCon <img> INFO*/
- /* retour de gfxcon : `input size: width x height ' */
- /* Modifier ici si gfxcon INFO renvoie autre chose */
- /* algo : */
- /* On lit le fichier jusqu'a trouver la chaine `input size:' */
- /* On cherche la position de ' x ' et on sait que la hauteur est derriere ca */
- /* On recupere la hauteur */
-
- ADDRESS COMMAND "gfxcon "|| File_to_Load ||" INFO >t:gfxcon.res"
-
- open('file2', 't:gfxcon.res', 'R')
-
- heigh = readln('file2')
-
- DO WHILE index(heigh,"input size:") = 0 & height ~=""
- heigh = readln('file2')
- END
- close('file2')
- IF index(heigh,"input size:") ~= 0 THEN DO
- h = index(heigh," x ")
- Height = SUBSTR(heigh,h+3)
- END
-
- /* Calcul du ratio pour ` resize f ' option */
-
- ratio = (Sheight/Height)
-
- posit=1
-
- posit = POS(':',File_to_Load,posit)
- nposit= posit
-
- DO WHILE nposit ~= 0
- nposit = POS('/',File_to_Load,posit+1)
- IF nposit ~=0 THEN DO
- posit = nposit
- END
- END
-
- File_pat = SUBSTR(File_to_Load,1,posit)
- File_name = SUBSTR(File_to_Load,posit+1,LENGTH(File_to_Load)-posit-1)
- lc = POS('"',File_name,1)
-
- IF lc ~= 0 THEN DO
- File_name = SUBSTR(File_name,1,lc-1)
- END
-
- ADDRESS COMMAND "gfxcon " || File_to_load || " TO " || File_path||pref||File_name || " RESIZE " || ratio || " FORMAT JPEG QUALITY 10 "
-
- END
-
- Exit
-