View Full Version : How to exploit ImageReader (ImageSource)


hannibalstgt
27th July 2017, 10:16
Hello,

I use Win 10 64 Bit and VirtualDub 1.10.4

When I try to submit the following command:

ImageSource("E:\FilmProjekte\TEST\FRAMES\2\TEST0%06d.JPG", start= 0, end =253, fps=18, use_DevIL=false)

I get the message
ImageReader: error "could not open file in DevIL Library."
DevIL Version 180

I suppose, the DevIL Library is located at the wrong place.
Where do I have to store the DevIL Library, so that AviSynth and/or VirualDub can find it.

Many thanks in advance.
Wolfgang

StainlessS
27th July 2017, 11:00
How are the filenames formatted ?
Is that extra 0 supposed to be in there ? (TEST0%06d.JPG)

Edit: show 1st & last one. (filename)
Mobile.

raffriff42
27th July 2017, 13:41
It's what you get when a file can't be found. An odd way to say it, I know.
http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/src/sources/ImageSeq.cpp?view=markup#l605
if (use_DevIL) /* read using DevIL */
...
if ((info) || (err != IL_COULD_NOT_OPEN_FILE)) {
ostringstream ss;
ss << "ImageReader: error '" << getErrStr(err) << "' in DevIL library\n"
(confirmed by opening an image successfully, then changing the path to a non-existing one - I get same error message)

You tried to disable DeVil, but it is resurrected here:
http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/src/sources/ImageSeq.cpp?view=markup#l448

if (DevIL_Version > 166 && (infoHeader.biWidth <= 0 || infoHeader.biHeight <= 0)) {
use_DevIL = true; // Not values we know, give it to DevIL
}
else {
if (infoHeader.biWidth <= 0)
// use_DevIL = true; // Not a type we know, give it to DevIL
env->ThrowError("ImageReader: Unsupported width %d", infoHeader.biWidth);
if (infoHeader.biHeight <= 0)
// use_DevIL = true; // Not a type we know, give it to DevIL
env->ThrowError("ImageReader: Unsupported height %d", infoHeader.biHeight);
}
}
else {
// DevIL 1.6.6 has a major coronary with compressed BMP files so don't fail thru to it
if (DevIL_Version <= 166)
env->ThrowError("ImageReader: EBMP reader cannot handle compressed images.");

use_DevIL = true; // give it to DevIL (image is compressed)
}
}
else {
use_DevIL = true; // Not a BMP, give it to DevIL
}
}

hannibalstgt
28th July 2017, 08:50
Hello raffriff42,

it worked. Thank you.

Wolfgang