Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th July 2011, 16:27   #1  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
ImageReader error on blank PNGs

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).
Attached Images
 

Last edited by pancserzso; 18th July 2011 at 16:33.
pancserzso is offline   Reply With Quote
Old 18th July 2011, 17:38   #2  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Perhaps a bug in DevIL 1.6.6? AviSynth v2.60a3 and 1.7.8 DevIL.dll loads it fine.
Wilbert is offline   Reply With Quote
Old 18th July 2011, 18:16   #3  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
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:



It is the line in the avs:
Quote:
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).

Last edited by pancserzso; 18th July 2011 at 18:49.
pancserzso is offline   Reply With Quote
Old 18th July 2011, 21:36   #4  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
You need to put the runtime libraries in your system folder: msvcp80.dll and msvcr80.dll.

Quote:
Do I need to do something with ILU.dll and ILUT.dll?
No, you don't need those.
Wilbert is offline   Reply With Quote
Old 18th July 2011, 21:39   #5  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
Quote:
Originally Posted by Wilbert View Post
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?
pancserzso is offline   Reply With Quote
Old 18th July 2011, 22:38   #6  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
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).
__________________
custom x264 builds & patches | F@H | My Specs

Last edited by kemuri-_9; 18th July 2011 at 22:46.
kemuri-_9 is offline   Reply With Quote
Old 18th July 2011, 22:57   #7  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
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)

See this page "Latest Supported Visual C++ Downloads" for details.


Also the ScriptEnvironment::ThrowError() problem is a recently identified bug.
IanB is offline   Reply With Quote
Old 19th July 2011, 04:45   #8  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
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:



Can someone help me? BTW, now this error is not only for this special image, it is for all avisynth imagesources now.
pancserzso is offline   Reply With Quote
Old 19th July 2011, 05:00   #9  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
2.6.0 MT + use_DevIL = false



2.6.0 MT + use_DevIL = true

Last edited by pancserzso; 19th July 2011 at 05:02.
pancserzso is offline   Reply With Quote
Old 19th July 2011, 05:16   #10  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
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.
IanB is offline   Reply With Quote
Old 19th July 2011, 05:45   #11  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
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:


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.
pancserzso is offline   Reply With Quote
Old 19th July 2011, 11:52   #12  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
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
IanB is offline   Reply With Quote
Old 19th July 2011, 14:59   #13  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
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
pancserzso is offline   Reply With Quote
Old 19th July 2011, 23:01   #14  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
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.
IanB is offline   Reply With Quote
Old 19th July 2011, 23:03   #15  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
Quote:
Originally Posted by IanB View Post
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?
pancserzso is offline   Reply With Quote
Old 19th July 2011, 23:34   #16  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
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.

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
IanB is offline   Reply With Quote
Old 19th July 2011, 23:39   #17  |  Link
pancserzso
Registered User
 
Join Date: Oct 2004
Posts: 131
Quote:
Originally Posted by IanB View Post
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.

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

Last edited by pancserzso; 19th July 2011 at 23:41.
pancserzso is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.