( Diese Seite in
Deutsch )
ImageWriter(clip clip, string file = "c:\", int start = 0, int end = 0, string type = "ebmp", bool info = false)
ImageWriter (present in limited form in v2.51, full functionality from v2.52) writes frames from a clip as images to your harddisk.
file: the path + filename of the saved images. The images will have filenames as such: [file]000000.[type], [file]000001.[type], etc.
start and end are the frame range that will be written. They both default to 0 (where end=0 means last frame).
type default "ebmp", is the filename extension and defines the format of the image.
The supported values for type, are:
info default false: optionally overlay progress information on the video clip, showing whether a file is being written, and if so, the filename (added in v2.55).
Format "ebmp" supports all color formats. The "ebmp" files written from the RGB or Y8 color formats are standard BMP files; those produced from YUV formats can probably only be read by AviSynth's 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, RGB32 (when the alpha channel is supported by the format and you want to include it) or Y8.
Examples:
# Export the entire clip in the current native AviSynth format
ImageWriter("D:\backup-stills\myvideo")
# Write frame 5 to "C:\000000.PNG"
ImageWriter("", 5, 5, "png")
# note: prior to 2.56 the output filename would be "000005.PNG"
# Write frames 100 to the end to "C:\000000.JPEG", "C:\000001.JPEG", etc. and display progress info
ImageWriter(start = 100, type = "jpeg", info = true)
# Write a jpg as greyscale (note the luma range should be [0,255], not [16,235])
ImageSource("F:\TestPics\GoldPetals.jpg")
ConvertToY8(matrix="PC.601")
ImageWriter("F:\TestPics\GoldPetals-8bit-avs", type = "png")
# Write a jpg as YV24 ebmp (note the luma range should be [0,255], not [16,235])
ImageSource("F:\TestPics\GoldPetals.jpg")
ConvertToYV24(matrix="PC.601")
ImageWriter("F:\TestPics\GoldPetals-24bit", type = "ebmp")
Notes:
Saving as greyscale bmp doesn't work correctly, both for bmp (where DevIL is used) and ebmp (internal parsing).
Changes:
| v2.60 | ebmp supports all formats; greyscale added for all formats |