30 October 2023, 00:30 | #1 |
Zone Friend
Join Date: Sep 2001
Location: Germany
Posts: 813
|
An ILBM file 'protected' against opening it in a viewer
I uploaded sdlmap1.ilbm to the Zone, it's a picture (a map, I think) from the German game "Stadt der Löwen".
It's a standard ILBM picture, but I think the developer patched the header so a regular picture viewer would choke on it. Here's what the file's header looks like: Code:
464f 524d 0000 6e58 494c 424d 424d 4844 FORM..nXILBMBMHD I tried changing the header accordingly using a hex editor, but my ILBM viewer ("display", from the imagemagick package) still does not display them. Can anybody more familiar with the format identify what's wrong with the uploaded file? |
30 October 2023, 05:44 | #2 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,207
|
https://wiki.amigaos.net/wiki/IFF_FO...Chunk_Registry has all public IFF forms and chunks including ILBM. The hex values you put look correct but there may also be extra data at the end to make your computations less predictable.
|
30 October 2023, 09:36 | #3 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
It looks like the header might be correct but there is something wrong with the data itself (i.e. the contents of the BODY chunk). It does not look like image data and isn't decrunched to anything coherent.
|
30 October 2023, 12:30 | #4 |
Zone Friend
Join Date: Sep 2001
Location: Germany
Posts: 813
|
Thanks guys, for having a look at the file.
I was hoping they had just modified the header, like they did for another game. Looks like I'm out of luck. |
30 October 2023, 12:59 | #5 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,351
|
It could be the game (for example) XORs the data with some value before using it. Looking at the game code could tell you what it's doing.
|
30 October 2023, 13:24 | #6 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,068
|
There are 3 problems:
1. FORM length, you figured that out yourself, 2. BODY length, you also have to adjust that one (starts at $0110, so $717c-$0110=$706b + 1 pad), 3. image dimensions 277x239x5 (=> 288x239x5), which is roughly 42KB and exceeds file size, so file is either too short or compressed, and apparently Compression flag is set to 0 while it should be set to 1 (offset $001f) because the image is actually compressed. Fixed file is in the zone. Last edited by a/b; 30 October 2023 at 13:31. |
31 October 2023, 14:35 | #7 |
Zone Friend
Join Date: Sep 2001
Location: Germany
Posts: 813
|
@a/b:
Ah - awesome, thanks! Looks like the compression flag was the main culprit, modern viewers/converters just ignore the wrong length definitions for FORM/BODY, or just throw a warning. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Opening a Project file with Script on Workbench [HELP] | superkahraman | support.AmigaOS | 4 | 17 February 2022 19:27 |
Bogus file is write protected message with Copy CLONE to shared directory | mark_k | support.WinUAE | 3 | 28 October 2017 21:01 |
File picker dialog not opening in 32-bit version (Win10) | jbenam | support.WinUAE | 8 | 06 May 2017 00:39 |
Opening multi adf/dms files inside a zip file! | amilo3438 | request.UAE Wishlist | 5 | 10 August 2013 06:23 |
|
|