View Single Post
Old 22nd November 2020, 17:36   #8  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Combination of previous posts suggestions.

First My Demo creating whotsit,
Code:
# PIC folder MUST exist in current directory
W=64
H=64
S=64
T=$808080
DIGITS=6
TYPE="JPG"
###
A=BlankClip(Length=1,Width=W,Height=H*3,Color=$FF0000)
B=A.BlankClip(Color=$00FF00)
C=A.BlankClip(Color=$0000FF)
A=A.Subtitle("1",y=0*H,Text_Color=T,Size=S).Subtitle("2",y=1*H,Text_Color=T,Size=S).Subtitle("3",y=2*H,Text_Color=T,Size=S)
B=B.Subtitle("1",y=0*H,Text_Color=T,Size=S).Subtitle("2",y=1*H,Text_Color=T,Size=S).Subtitle("3",y=2*H,Text_Color=T,Size=S)
C=C.Subtitle("1",y=0*H,Text_Color=T,Size=S).Subtitle("2",y=1*H,Text_Color=T,Size=S).Subtitle("3",y=2*H,Text_Color=T,Size=S)
A++B++C
NAME=".\PIC\slide_%0"+String(DIGITS,"%.0f")+"d"+"."+TYPE
#RT_DebugF("NAME='%s",NAME,name="SomeInfo: ")
ImageWriter(NAME, start=0,end=2,type=TYPE)
Return last
EDIT: Above, Changed in BLUE, was "jpg"

Creates in PIC dir
slide_000000.JPG # Red
slide_000001.JPG # Grn
slide_000002.JPG # Blu

eg 1st one slide_000000.JPG # Red


Script for your use
Code:
PATH     = ".\PIC\Slide_"                                      # PIC directory relative to current dir, base filename node "Slide_"
TYPE     = "jpg"
DIGITS   = 6
### FIRST WANT FIND NUMBER OF IMAGE FILES FOR ImageReader(END)
IN_FILES = PATH + "*." + TYPE                                  # ".\PIC\Slide_*.jpg"
OUT_FILE = ".\FILE.List"                                       # TMP file
FILES    = RT_WriteFileList(IN_FILES,OUT_FILE)                 # Create a listing file of Pic files
Assert((FILES!=0), "No files found")
RT_FileDelete(OUT_FILE)                                        # We Are done with it
#RT_DebugF("IN_FILES='%s'\nFILES COUNT=%d",IN_FILES,FILES,name="SomeInfo: ")
IR_FILE  = RT_String("%s%%0%dd.%s",PATH,DIGITS,TYPE)           # ".\PIC\Slide_%06d.jpg"    # NOTE, "%%" required for Literal '%' in format str
ImageReader(IR_FILE, end=FILES-1)
#RT_DebugF("READER_FILE='%s",IR_FILE,name="MoreInfo: ")
H=Height/3
T = CROP(0,0,0,H)
M = CROP(0,H,0,H)
B = CROP(0,2*H,0,0)
Interleave(T,M,B)
Return last
It is assumed that images will start at 000000 with 6 digits.
(If dont start at 0 will require script fix for Start and End)

EDIT:
If you add this before Return from 2nd Script will produce this, with all frames stacked and shown as single image,
where original frames as R, or G, or B, and 1=Top, 2=Mid, 3=Bot.
Code:
C=0
For(i=0,8) {
    Z = Last.Trim(i,-1)
    C=(C.IsClip) ? StackHorizontal(C,Z) : Z
}
C
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 22nd November 2020 at 17:55.
StainlessS is offline   Reply With Quote