Is there an effecient/fast way in python to convert binary data fromįile (24bit hex(int) big endian) to 32bit int (little endian)? Have What type of data is being loaded it's hard to give a better recommendation. I understand your description of the data correctly). Likely have something to manipulate RGB to RGBA images), similarly, youĬould use Numpy to add large numbers of rows simultaneously (all 512 if There are faster ways if you have a lot of such data (e.g. (258L,) print repr(struct.pack( 'I', '\000' data ) # pad to 4-byte unsignedīig-endian integer format print temp # is now a regular python integer (in a tuple) If I'm understanding correctly, hex has nothing to do with this and theĭata is really binary, so what you're looking for is probably:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |