View Single Post
Old 7th September 2012, 09:41   #33  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
[Catching up on recent threads after a long absence]

Quote:
Originally Posted by StainlessS View Post
Code:
a=ImageSource("sm444.png")

Tmp = a.subtitle("not rendered").ImageWriter("not_rendered", type="png")

dummy = Tmp.FrameCount()
dummy = dummy - dummy

a.subtitle("rendered").ImageWriter("rendered",start=0+dummy, type="png")
Not tested but should I think work. (There are probably better ways)

EDIT: The dummy arg forces the 1st Imagewrite chain to be processed
as the output is reliant on both subtitled paths through the
graph ...
That doesn't work, since Framecount is known at compile time and does not require run-time access to frame data.
You need something that forces rendering of the frames, such as gyth's example:
Quote:
Originally Posted by gyth View Post
Code:
a = ImageSource("sm444.png")

a0 = a.subtitle("not rendered").ImageWriter("not_rendered", type="png")

a1 = a.subtitle("rendered").ImageWriter("rendered", type="png")

stackhorizontal(a1, a0).crop(0, 0, a1.width, a1.height)
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote