ImageWriter
(clip, string "file", int "start", int "end", string "type", bool "info")
ImageWriter
(present in limited form in v2.51, full functionality in v2.52) writes frames from a clip as images to your harddisk.
file default "c:\": is the path + filename prefix of the saved images. The images have filenames such as:
[path]000000.[type], [path]000001.[type], etc.
start and end are the start and end of the frame range that will be written. They both default to 0 (where ''end''=0 means last frame). If end is negative (possible since v2.58), it specifies the number of frames that will be written.
type default "ebmp", is the filename extension and defines the format of the image.
The supported values for type, are:
(e)bmp, dds, ebmp, jpg/jpe/jpeg, pal, pcx, png,
pbm/pgm/ppm, raw, sgi/bw/rgb/rgba, tga, tif/tiff
info default false: optionally overlay text progress information on the output video clip, showing whether a file is being written, and if so, the filename (added in v2.55).
Format "ebmp" supports all colorspaces (RGB24, RGB32, YUY2, YV12). The "ebmp" files written from RGB colorspaces are standard BMP files; those produced from YUV formats can probably only be read by AviSynth's ImageReader/ImageSource
. This pair of features allows you to save and reload raw video in any internal format.
For all other formats the input colorspace must be RGB24 or RGB32 (when the alpha channel is supported by the format and you want to include it).
Examples:
# Export the entire clip in the current native AviSynth format ImageWriter("D:\backup-stills\myvideo") # Write frame 5 to "C:\000005.PNG" ImageWriter("", 5, 5, "png") # Write frames 100 till the end to "F:\pic-000100.JPEG", "F:\pic-000101.JPEG", etc. # and display progress info ImageWriter(file = "F:\pic", start = 100, type = "jpeg", info = true)
Changelog:
v2.58 | added end=-num_frames |
$Date: 2008/06/06 16:36:46 $