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

Question regarding number on images / bitmaps #11

Open
SandroWissmann opened this issue Nov 30, 2022 · 1 comment
Open

Question regarding number on images / bitmaps #11

SandroWissmann opened this issue Nov 30, 2022 · 1 comment

Comments

@SandroWissmann
Copy link

Hi there,

First of all. Thanks for the great overview of the file format. It helps a lot for reading the data for pharaoh.

I have some questions regarding the encoding which is still unclear to me.

In the header we have:

Offset | Length | Data type | Description
12 | 4 | int32 | Total number of image records present in this file
16 | 4 | int32 | Number of image records in use
20 | 4 | int32 | Number of bitmap records in this file

Now it is clear to me that the data at offset 20 number of bitmaps tells us how many bitmaps we can read from the bitmap section.

But what is the difference between
offset 12 total number of images in file and 16 number of images records in use?

At first glance in some files in pharaoh it looks like both these values are always the same.

To know how many Images i can read from the Image section do I use the calculate at offset 16 or offset 12?

@SandroWissmann
Copy link
Author

Ok forget about this maybe.
I had some mistake in the code.
Now I can see:

at offset 12 I get 1000 == total images possible in the file
at offset 16 I get 682 = images in use.

Now there is just one thing.
If I start reading at the position 40680 to get the images data I get actually data for 683 images before the entries are zero.

If I see it correctly there is always a first image entry which is empty what about that?

Another question I saw in the bitmap data of each sg3 file that we always get as first bitmap:
system.bmp Static image data, common to all applications. w:300 h:200 c:200 f:1 l:200

So is really in each file first the same bmp file from system encoded? Is it something special?

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