Log in

View Full Version : Input formats for Imagesource


vcmohan
23rd April 2007, 02:52
I tried using a gif image as input to imagesource. It was accepted but I got output a black frame. When I converted it in Irfanviewer to jpg format then imagesource produced correct output. I checked on media wiki and documentation, but could not find what formats are accepted as input.

foxyshadis
23rd April 2007, 03:16
ImageSource: http://openil.sourceforge.net/features.php
CoronaSource: http://corona.sourceforge.net/corona-1.0.2-doxygen/

GIF has always given me the same result as it did for you, however. I just convert to png or tiff.

Dr.Khron
23rd April 2007, 17:40
Here is a quirk for you... when I first started fooling around with overlaying masks (which are black and white), I tried saving my masks as a binary or 4 color BMP. The idea was to make sure that there wasn't any off-white or dark-grey in the mask, IE that it was really two color.

But imagesource didn't like either of those two kinds of BMP. I had to switch back to regular, full color BMP.

vcmohan
24th April 2007, 02:53
ImageSource: http://openil.sourceforge.net/features.php
CoronaSource: http://corona.sourceforge.net/corona-1.0.2-doxygen/


Thanks for the references. DEvil library lists a whole lot of formats as well as outputs and processing. Its possible imagesource compiled for avisynth may be using a subset of them. Same regarding Coronasource.

I request those maintaining the documentation to kindly list in the documentation the input formats actually supported.

If all formats are supported ( evidently not as gif is not giving proper results) then links to these pages may be given in the documentation and wiki pages

foxyshadis
24th April 2007, 03:51
The Devil lib comes direct from their web site, no devil source code is compiled for avisynth at all. Whatever problems it has with gif might be endemic to the library, or just caused by avisynth not handling sub-24bit images at all. I don't know. I have tested some of the goofier formats and they load fine.

In fact, in the ImageReader source is:
// DevIL 1.6.6 has a major coronary with palletted BMP files so don't fail thru to it
env->ThrowError("ImageReader: %d bit BMP is unsupported.", infoHeader.biBitCount);
after testing for 32/24/16/12-bit BMP images, so the problem is known, but since GIF doesn't go through this code path it chokes anyway. A <24 bit check might have to be added.

vcmohan
25th April 2007, 03:21
Thanks. Again request a link to these pages be included in Avisynth documentation and wiki pages

IanB
25th April 2007, 09:56
Yes we just wrap the 1.6.6 .dll as shipped. To force ImagerSource to use DevIL to handle .BMP files you must set UseDevIL=True (sp?), but be aware it does GPF if it doesn't like the file format (hence the code comment reffered to above).

DevIL has some holes (Big!) in their code. I added some code to catch some of the more stupid actions the library code commits, but it is far from bulletproof. I wasn't aware of problems with GIF files, the ones I tested all work.

Sh0dan/Richard/?? found an alternate image library he was keen to wrap into an alternate image reader, but it hasn't panned out (It probably didn't work any better than DevIL).