PDA

View Full Version : ImageReader error on blank PNGs


pancserzso
18th July 2011, 16:27
When I use ImageMagick to save a totally black PNG, Avisynth ImageSource() returns an DevIL library error:

error: 'Illegal file' in DevIL library....

I think the output of ImageMagick is 100% standard compilant, so the error must be with ImageMagick. I tried 2.58 official, 2.60 latest, 2.60 MT latest and its all the same.

Can you suggest me some newer build, or a solution to this problem?

I uploaded the file which triggers this error (only 456 bytes).

Wilbert
18th July 2011, 17:38
Perhaps a bug in DevIL 1.6.6? AviSynth v2.60a3 and 1.7.8 DevIL.dll (http://avisynth.org/mediawiki/ImageSource) loads it fine.

pancserzso
18th July 2011, 18:16
Can you help me, I cannot make DevIL 1.7.8 work.

I have the Avisynth 2.60a3 (AviSynth_110525.exe) and downloaded the new 1.7.8 DevIL.dll. I have overwritten the old DevIL with the new one in System32 folder. But I get exception errors, when trying to open the Avisynth script:

http://i.imgur.com/lo4o9.png

It is the line in the avs:
ImageSource("x_alpha%04d.png", 1, 500 ,24)

Do I need to do something with ILU.dll and ILUT.dll? I tried copying it into System32 but no success. Also, I copied the msvcr80 dll files into the System folder, but no change. I am on Windows 7 64-bit, so I don't think it is required (all those dll files are already present inside a windows subdirectory).

Wilbert
18th July 2011, 21:36
You need to put the runtime libraries in your system folder: msvcp80.dll and msvcr80.dll.

Do I need to do something with ILU.dll and ILUT.dll?
No, you don't need those.

pancserzso
18th July 2011, 21:39
You need to put the runtime libraries in your system folder: msvcp80.dll and msvcr80.dll.


No, you don't need those.

Are there more than one version of those? I copied the ones I found inside c:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4027_none_d08a21a2442db2dc\

Can you upload a version which works for sure?

kemuri-_9
18th July 2011, 22:38
those dlls are part of the Visual Studio 2005 redistributable package.

as avisynth is 32bit, make sure you have the x86 version installed, these dlls should go into syswow64 (or more likely a subdirectory within it)

I am not aware if you should get the sp0 or sp1 package however though...
Edit: (generally you should get the sp1, but some programs seem to explicitly state getting the sp0).

IanB
18th July 2011, 22:57
Do NOT just bang copies of msvcp80.dll, msvcr80.dll, etc, into your windows system directories.

You now need to correctly install them (thanks Micro$oft, ........ NOT!) from a re-distributable package.

Visual C++ 2005 SP1 Redistributable Package (x86) (http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en)

See this page "Latest Supported Visual C++ Downloads (http://support.microsoft.com/kb/2019667)" for details.


Also the ScriptEnvironment::ThrowError() problem is a recently identified bug.

pancserzso
19th July 2011, 04:45
I have installed all the latest MSVC 2005 packages (both 32-bit and 64-bit), but no success.

I tried using the latest MT build, and it displays a different message:

http://i.imgur.com/2kigo.png

Can someone help me? BTW, now this error is not only for this special image, it is for all avisynth imagesources now.

pancserzso
19th July 2011, 05:00
2.6.0 MT + use_DevIL = false

http://i.imgur.com/TQxfo.png

2.6.0 MT + use_DevIL = true
http://i.imgur.com/Ygr7D.png (http://imgur.com/Ygr7D)

IanB
19th July 2011, 05:16
Avisynth 2.5.8 pre-dates the bug with reporting the DevIL library errors, so you will at least be able to see the correct error message text for your problem with that version.

Also your error message seems to indicate that the file name causing problems is "Invalid extension" which may mean that something is stomping over the memory that holds the filename.

pancserzso
19th July 2011, 05:45
But I need to use DevIL 1.7.8 to read the problematic images.

Here is what happens with 2.58 official + DevIL 1.7.8:
http://i.imgur.com/GteKZ.png

Also, I copied the avs file to e:\a.avs and the png image to e:\b.png, but the error is exactly the same.

IanB
19th July 2011, 11:52
1. Can you please put a copy x_alpha0001.png somewhere for us to download.

2. The error IL_INVALID_EXTENSION means the parser selected based on the file extension does not recognise the file contents.

The .PNG parser expects the file to start 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, etc

pancserzso
19th July 2011, 14:59
OK, I have uploaded a file with both a good png and a bad png. By bad I mean having size 465 bytes and being 100% transparent, what the old DevIL library doesn't accept. I am trying to find a solution for making bad.png work. It is a 100% correct PNG file, generated by the latest ImageMagick.

http://ifile.it/cqk6xo8

IanB
19th July 2011, 23:01
Okay both work fine with DevIL 1.7.8 (764,416 bytes)

Good.avs works fine, bad.avs gives "Illegal file", IL_ILLEGAL_FILE_VALUE. with DevIL 1.6.6 (719,872 bytes).

Same results with Avisynth.dll 2.5.8, 2.6.3 (apart from bug) and 2.6.4 (my fixed build).

msvcm80.dll, msvcp80.dll and msvcr80.dll all are version 8.00.50727.762

Are you sure x_alpha0001.png is valid? :?


From DevIL docs :-

IL_ILLEGAL_FILE_VALUE => An illegal value was found in a file trying to be loaded.

IL_INVALID_EXTENSION => The extension of the specified filename was not correct for the type of image-loading function.

pancserzso
19th July 2011, 23:03
Okay both work fine with DevIL 1.7.8 (764,416 bytes)

Good.avs works fine, bad.avs gives "Illegal file", IL_ILLEGAL_FILE_VALUE. with DevIL 1.6.6 (719,872 bytes).

Same results with Avisynth.dll 2.5.8, 2.6.3 (apart from bug) and 2.6.4 (my fixed build).

msvcm80.dll, msvcp80.dll and msvcr80.dll all are version 8.00.50727.762

Are you sure x_alpha0001.png is valid? :?


From DevIL docs :-

IL_ILLEGAL_FILE_VALUE => An illegal value was found in a file trying to be loaded.

IL_INVALID_EXTENSION => The extension of the specified filename was not correct for the type of image-loading function.

The files ARE the ones in the RAR. I just renamed it. But I get the same error.

Where can I download your 2.6.4 build? Also, can you upload your dll's to somewhere?

IanB
19th July 2011, 23:34
As I said in my post #7 you cannot just bang copies of the msvc runtimes into your system directory any more. :(

You must correctly install them from a proper Micro$oft distribution. :devil:

I used the vcredist_x86.exe (2,723,264 bytes) as downloaded from the link in my post #7. It was digitally signed Monday, 19 February 2007 07:06:01

pancserzso
19th July 2011, 23:39
As I said in my post #7 you cannot just bang copies of the msvc runtimes into your system directory any more. :(

You must correctly install them from a proper Micro$oft distribution. :devil:

I used the vcredist_x86.exe (2,723,264 bytes) as downloaded from the link in my post #7. It was digitally signed Monday, 19 February 2007 07:06:01

Thats the exact same file I used. Can you link me to your 2.6.4 fixed build?

Also, my versions are: 8.00.50727.4027