For a specific task (replace an image inside a firmware without any data offset shifting), I need to create a GIF file of size 409x240 pixels of exactly 6449 bytes:
- offset 0-5:
GIF89a
(magic string) - ...
- offset 6447-6448: hex
00 3B
When I created such a GIF with, for example MSPaint, the output is ~ 2 KB, which is too small.
Question: is there a way to modify a GIF file to take a larger given size? Can we do null-byte (hex 00
) padding near the end of the GIF file? Maybe with ImageMagick, or directly with a HEX editor (I already have one)?