ColinThomas
Member
Hi,
To understand the XISF format a little better, I am looking at writing a python XISF parser.
I have a small RGB XISF file (from a preview) to test on.
I am having an issue with the XISF Block format, and was wondering what I have missed.
The parser can see:
XISF signature 'XISF0100'
Located the header length
Identify the reserved location
Extract the XISF XML header
An then the series of zero byte blocks.
Both the end of the zero byte blocks,and the XML location:attachement value, point to byte
4096
But the 8 bytes at this location are as follows:
INFO: XISF Signature located...
INFO: Header Length located: 1181
INFO: XISF Reserved located...
INFO: Extract Image Data frm XML
INFO: geometry -> 555:483:3
INFO: sampleFormat -> Float32
INFO: bounds -> 0:1
INFO: colorSpace -> RGB
INFO: location -> attachment:4096:3216780
INFO: Found end to Unused Space....
######################
DEBUG: Read from byte No: 4096 8 bytes...
b'\xad\x8dL>\x12t\x1f>'
I have checked all 8 byte from 4096 till the end and can not locate XISB signature of 'XISB0100', (where
I can locate the initial XISF signature 'XISF0100') hence the confusion...
Both signature checks are made using the same python:
self.infile = open(self.xisfFile, 'rb')
while True:
self.numChars = 8
self.buf = self.infile.read(self.numChars)
if (self.DEBUG):
print("DEBUG: Read from byte No:", self.xisfByteLocation, " " , self.numChars , " bytes...")
I have double checked and the xisf is happily being read into pixinsight..
The spec I am looking at is :
https://pixinsight.com/doc/docs/XISF-1.0-spec/XISF-1.0-spec.html
Any pointers/help welcomed
Clear skies
Colin
To understand the XISF format a little better, I am looking at writing a python XISF parser.
I have a small RGB XISF file (from a preview) to test on.
I am having an issue with the XISF Block format, and was wondering what I have missed.
The parser can see:
XISF signature 'XISF0100'
Located the header length
Identify the reserved location
Extract the XISF XML header
An then the series of zero byte blocks.
Both the end of the zero byte blocks,and the XML location:attachement value, point to byte
4096
But the 8 bytes at this location are as follows:
INFO: XISF Signature located...
INFO: Header Length located: 1181
INFO: XISF Reserved located...
INFO: Extract Image Data frm XML
INFO: geometry -> 555:483:3
INFO: sampleFormat -> Float32
INFO: bounds -> 0:1
INFO: colorSpace -> RGB
INFO: location -> attachment:4096:3216780
INFO: Found end to Unused Space....
######################
DEBUG: Read from byte No: 4096 8 bytes...
b'\xad\x8dL>\x12t\x1f>'
I have checked all 8 byte from 4096 till the end and can not locate XISB signature of 'XISB0100', (where
I can locate the initial XISF signature 'XISF0100') hence the confusion...
Both signature checks are made using the same python:
self.infile = open(self.xisfFile, 'rb')
while True:
self.numChars = 8
self.buf = self.infile.read(self.numChars)
if (self.DEBUG):
print("DEBUG: Read from byte No:", self.xisfByteLocation, " " , self.numChars , " bytes...")
I have double checked and the xisf is happily being read into pixinsight..
The spec I am looking at is :
https://pixinsight.com/doc/docs/XISF-1.0-spec/XISF-1.0-spec.html
Any pointers/help welcomed
Clear skies
Colin