im trying to get a byte array, such as
47 49 46 38 39 61 0A 00 0A 00 91 00 00 FF FF FF FF 00 00 00 00 FF 00 00 00 21 F9 04 00 00 00 00 00 2C 00 00 00 00 0A 00 0A 00 00 02 16 8C 2D 99 87 2A 1C DC 33 A0 02 75 EC 95 FA A8 DE 60 8C 04 91 4C 01 00 3B
from a gif file in python. However, somehow i couldn't download PIL so is there any other way to do this?
thanks in advance
In order to output the binary content (as 8-bit hexadecimal values) of a GIF (or, indeed, any file) you could do this:
For large files, this could introduce an unacceptable memory overhead. The following variant uses less memory but produces the same result: