I would like to know how i can read the data when a file is opened in Binary mode “rb”. I got this file which is used for a render engine which contains a tuhmnail preview, which is BMP i believe. The addon already uses a piece of code to take out the data of that thmbnail image. But im also intrested to take the rest of the data out.
The beginning of the code is like this;
matFile = open(filename, "rb")
matFile.seek(0)
matData = matFile.read()
If i print matData is see the values i believe as HEX str, not sure. Here’s a small piece of that code.
b'\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
At the end of the file i see regular chracters mixed with HEX code. looks like this;
Focus Distance\x02 \x00\x00\x00\x00\[email protected]\x06\x00\x00\x00\x11\x00\x00\x00Radius Multiplier\x02 \x00\x00\x00\x00\x80?\x06\x00\x00\x00\x06\x00\x00\x00Radius\x02 \x00\x00 \x9b\xa4D\x06\x00\x00\x00\x08\x00\x00\x00Min Rays\x01 \x00\x00\x08\x00\x00\x00\x06\x00\x00\x00\x08\x00\x00\x00Max Rays\x01 \x00\x00d\x00\x00\x00\x06\x00\x00\x00\x05\x00\x00\x00Layer\x01 \x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x12\x00\x00\x00Light Buffer Index\x01 \x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x14\x00\x00\x00Interface Appearance\x03 \x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x04\x00\x00\x00\x0f\x00\x00\x00Global Settings\x0f\x00\x00\x00Global Settings\x00\x00\x00\x00\x0f\x00\x00\x00Global Settings\x06\x00\x00\x00\x10\x00\x00\x00Background Color\x07 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x0c\x00\x00\x00Illumination\x03 \x00\x00\x14\x00\x00\x00Image Based Lighting\x06\x00\x00\x00\x08\x00\x00\x00Sky Type\x03 \x00\x00\x07\x00\x00\x00Sun+Sky\x06\x00\x00\x00\x08\x00\x00\x00IBL Type\x03 \x00\x00\x07\x00\x00\x00Sun+IBL\x06\x00\x00\x00 \x00\x00\x00Sky Frame\x06 \x00\x00\xd8\xc4\x14?\xf7UP?\x00\x00\x00\x00\xf7UP\xbf\xd8\xc4\x14?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\r\x00\x00\x00Sun Direction\x03 \x00\x00\x1a\x00\x00\x000.514046 0.722707 0.462008\x06\x00\x00\x00 \x00\x00\x00Turbidity\x02 \x00\x00\x00\x00 @\x06
How can reach that part after the thumbnail image and get the data?
Iva attached the file which is used to load the data from
Attachments
Goedap_8k_270deg_Toned-v1.zip (20.7 KB)