34 lines
2.0 KiB
Plaintext
34 lines
2.0 KiB
Plaintext
; LDV script sample
|
|
; Demonstrates how to optimize images using optimg.ldv
|
|
; This scripts loops over a folder and recursively start optimg.ldv
|
|
; On each image found to analyze it and find a better output format
|
|
; Based on its colors characteristics (e.g. a monochrome image saved
|
|
; As True Color will end up with a monochrome file, LZW compressed)
|
|
|
|
; Inside the loop:
|
|
; current file is accessible via $LFCurrentFile global variable
|
|
; start folder (parameter#1 of Loop_Folder) is accessible via $LFStartFolder global variable
|
|
; Global function LFAdjustDest(<start_folder,file,dest_folder>) allows to build destination file
|
|
; In such a way that it respects original folder hierachy, e.g.:
|
|
; Assuming LFStartFolder=H:\IMAGES
|
|
; And $LFCurrentFile=H:\IMAGES\BYPLANES\32\TC32.JPG
|
|
; Then LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\OPTIMAL) will be H:\OPTIMAL\BYPLANES\32
|
|
|
|
; Call optimg.ldv as follows:
|
|
; ldv_do -f:<file> optimg.ldv <destination folder or file> <Profile>
|
|
; <file>: filename of the file (full path recommended)
|
|
; <destination folder or file>: if folder, LDV will build filename based on original file name extension decided by profile
|
|
; if file, only extension will be changed
|
|
;Loop_Folder H:\PURE_C\PROJECTS\VISION\IMGTEST recurse
|
|
Loop_Folder H:\tmp\axa\05 recurse
|
|
;ldv_do -f:$LFCurrentFile optimg.ldv LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\PURE_C\PROJECTS\VISION\TEMP\Aranym) DualToneLikely
|
|
ldv_do -f:$LFCurrentFile optimg.ldv LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\tmp\axa\opt\05) DualToneLikely
|
|
Endloop_Folder
|
|
|
|
|
|
; Other examples:
|
|
;ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\Falcon Falcon
|
|
;ldv_do -f:H:\tmp\z\39\aquila-002.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\aquila-002.tif DualToneLikely
|
|
;ldv_do -f:H:\tmp\z\39\aquila-003.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\aquila-003.tif DualToneLikely
|
|
; --> Will generate H:\PURE_C\PROJECTS\VISION\TEMP\ST\MARBLES.JPG (assuming MARBLES.TIF is a TC24 image)
|