Log in

View Full Version : ImageReader/ImageSource BMP bug?


tin3tin
21st November 2010, 08:36
Friom the Avisynth docs:use_DevIL = false: When false, an attempt is made to parse (E)BMP files with the internal parser, upon failure DevIL processing is invoked. When true, execution skips directly to DevIL processing. You should only need to use this if you have BMP files you don't want read by ImageReader's internal parser.

Apparently this 'When false, an attempt is made to parse (E)BMP files with the internal parser, upon failure DevIL processing is invoked' doesn't seem to work with this (http://forum.videohelp.com/attachments/4280-1290276617/BMP.bmp) BMP.

This doesn't work:
ImageReader("BMP.bmp",use_DevIL = false)

This works:
ImageReader("BMP.bmp",use_DevIL = true)

I rather not use the use_DevIL = true function because I'm affraid that will cause more unsuccesful loadings images when used generic(I do not know what images the users are attempting to be loading)

From Avisynth docs:
NOTE : DevIL version 1.6.6 as shipped with Avisynth does not correctly support DIB/BMP type files that use a pallette, these include 8 bit RGB, Monochrome, RLE8 and RLE4. Because the failure is usually catastrophic, from revision 2.56, internal BMP processing does not automatically fail over to DevIL processing. Forcing DevIL processing for these file types is currently not recommended.

Gavino
21st November 2010, 11:15
It seems to me that ImageSource is working as intended, although the documentation is confusing.
When false, an attempt is made to parse (E)BMP files with the internal parser, upon failure DevIL processing is invoked
This part is qualified by the later note:
from revision 2.56, internal BMP processing does not automatically fail over to DevIL processing.
Thus, "upon failure DevIL processing is invoked" only applies prior to revision 2.56, and the only way now to get DevIL processing for BMP files is to set use_DevIL=true.

tin3tin
21st November 2010, 13:05
from revision 2.56, internal BMP processing does not automatically fail over to DevIL processing.

I wonder why this has been changed - it doesn't seem to be an improvement.

Gavino
21st November 2010, 14:14
That's explained in the documentation:
DevIL version 1.6.6 as shipped with Avisynth does not correctly support DIB/BMP type files that use a pallette, these include 8 bit RGB, Monochrome, RLE8 and RLE4. Because the failure is usually catastrophic, from revision 2.56, internal BMP processing does not automatically fail over to DevIL processing.
Since Avisynth is unable to recover from the DevIL failure (not even to report an error), I guess the decision was taken not to call DevIL at all if Avisynth cannot handle a BMP file itself (when use_DevIL=false).