|Discussion||Doom9 Thread, Original|
Loading PNG, JPG, BMP, PCX, TGA and GIF images
CoronaSequence(string "file", int "start", int "stop", int "sort", bool "gapless",
int "textmode", int "x", int "y", string "font", int "size", int "text_color", int "halo_color", string "expression")
There are two basic ways to select your images:
The old way: formatting the filename
The filename must have a number inside, which is calculated from the frame number.
This is the way the other image plugins work.
CoronaSequence("c:\PIC%.2d.jpg", start=1, stop=1500, gapless=true)
With gapless = true missing pictures are omitted from the result.
Some typical examples for number formats are:
pic%d.jpg standard numbering "pic1.jpg" "pic15.jpg" "pic153.jpg"
pic%5.3d.jpg 5 characters 3 digits "pic 001.jpg" "pic 015.jpg" "pic 153.jpg"
pic%-5d.jpg 5 characters left aligned "pic1 .jpg" "pic15 .jpg" "pic153 .jpg"
The new way: using wildcards
You select the images with wildcards - this should be much easier to type in most cases.
Subfolders are included and the pictures are sorted by path & filename, filename or filedate.
start, stop and gapless are ignored in this mode.
With sort you can change the ordering of the result:
- 0: don't sort
- 1: sort by path and filename
- 2: sort by filename
- 3: sort by filedate
With textmode you can choose what to print on the image.
- 0: don't print the filename
- 1: print the filename
- 2: print the full filename (including the drive and folder)
- -1: don't even print an error message
- 3: evaluate expression and print the result on the image. The variable "filename" is set to the current filename. The following will use midstr to print the three following characters after "C:\PIC":
CoronaSequence("c:\PIC*.jpg", textmode=3, expression="midstr(filename,7,3)")
You can use font, size, x, y, text_color and halo_color to change the text (the same parameters as Subtitle).
As in Subtitle x=-1 or y=-1 will center the text.
Some more details:
The wildcard search includes results which match either the long filenames or the 8.3 filename (which isn't visible in most applications nowadays). This is not really intended but the Windows functions give those results.
There should never be an error which stops AviSynth.
If a picture cannot be read or has the wrong dimensions a black frame is generated.
If not a single picture is found, a message video is generated.
This plugin uses the Corona Image I/O Library, Version 1.0.2, by Chad Austin.
Loading raw image files
RawSequence (string "file", int "start", int "stop", int "sort", bool "gapless",
int "textmode", int "x", int "y", string "font", int "size", int "text_color", int "halo_color",
string "pixel_type", int "width", int "height")
This function does exactly the same job as CoronaSequence, but instead of using an image library it directly copies the content of the files to the image memory.
It has nearly the same code as RawSource.
Supported pixel_types are:
- RGB, RGBA, BGR, BGRA (interleaved RGB without subsampling, resulting in AviSynth's RGB24 or RGB32)
- YUYV, YVYU, UYVY, VYUY (interleaved horizontally subsampled resulting in AviSynth's YUY2)
- YV16 (planar horizontally subsampled, it is converted to AviSynth's YUY2)
- I420, YV12 (planar horizontally and vertically subsampled resulting in AviSynth's YV12)
For useful results you have to give the correct width and height.
RawSequence("d:\*.raw", pixel_type="YUYV", width=576, height=100, textmode=2)
Back to External Filters ←