Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant decode file created with an amiga program (source for pr0ggie included) #3

Open
ghost opened this issue Mar 25, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 25, 2015

https://github.com/paigeadele/derp/raw/master/amiga.iff

if you want to play around and try to figure out why...
https://github.com/paigeadele/derp/tree/master/screenshotutil

Error:

laptop erratic # /usr/local/bin/ilbm2acbm -i amiga.iff -o amiga.acbm
WARNING: Trailing IFF contents found: 66!
Chunk size mismatch! FORM size: -2147483647, while body has: 4
Invalid ILBM file!
laptop erratic # exit

@ghost
Copy link
Author

ghost commented Mar 25, 2015

amiga.iff  /usr/local/bin/iffpp
laptop derp # /usr/local/bin/iffpp amiga.iff 
WARNING: Trailing IFF contents found: 66!
Chunk size mismatch! FORM size: -2147483647, while body has: 4
laptop derp # 

@ghost
Copy link
Author

ghost commented Mar 25, 2015

If you figure out why I'd be curious to hear about it I can only imagine it must be something brilliant

@svanderburg
Copy link
Owner

Hi,

If you run iffpp with the -c parameter (which disables validity checking)
you will see the following output:

$ iffpp amiga.iff -c
WARNING: Trailing IFF contents found: 66!
'FORM' = {
chunkSize = -2147483647;
formType = 'ILBM';
[
];
}

As you may probably notice, there is something wrong with the FORM chunk
size, because it's a negative value. I inspected the file with a hex editor
and noticed that this value is congruent with what is actually inside the
IFF file, so it's not caused by the parser library. The form chunk size
should correspond to the cumulative size of all chunks stored inside it
with padding bytes included. In this file this is not the case, so that's
why it gets confused.

I think some Amiga programs might be able to open this file, because they
probably ignore the FORM chunk size (or the FORM chunk entirely) and only
look for the data chunks that it understands.

So technically the file is incorrect. To be able to open the file with
libilbm or libiff, the chunk size in this file must be fixed or I must
implement something that copes with these kind of errors :-)

On Wed, Mar 25, 2015 at 10:11 AM, Paige Thompson [email protected]
wrote:

If you figure out why I'd be curious to hear about it I can only imagine
it must be something brilliant


Reply to this email directly or view it on GitHub
#3 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant