Big/little-endian DPX files... how to load...
Posted: Tue Jul 19, 2005 3:46 pm
Hi,
I wonder if you can help.
I am writing a DPX loader and have noticed a number of files with bad 'magic number' elements in the file-information-header. Specifically, the magic number is SDPX when it should be XPDS, indicating big-endian instead of little-endian.
I see that XnView can still read DPX files even if this magic-number is the wrong way round. Also, if I load a DPX file using XnView with the magic-number the wrong way round, then save it using XnView, XnView saves the magic-number the CORRECT way round!
Since the magic-number is the only means of determining the big/little-endian order, how are you determining which way to read the file when the magic-number is the wrong way round?
I hope you can help, thanks,
Simon
I wonder if you can help.
I am writing a DPX loader and have noticed a number of files with bad 'magic number' elements in the file-information-header. Specifically, the magic number is SDPX when it should be XPDS, indicating big-endian instead of little-endian.
I see that XnView can still read DPX files even if this magic-number is the wrong way round. Also, if I load a DPX file using XnView with the magic-number the wrong way round, then save it using XnView, XnView saves the magic-number the CORRECT way round!
Since the magic-number is the only means of determining the big/little-endian order, how are you determining which way to read the file when the magic-number is the wrong way round?
I hope you can help, thanks,
Simon