The VGA palette starts 769 bytes before the end of the file. There may be PADs between the end of the image and the start of the palette.
BUG: 463951
(cherry picked from commit 14742cb502272b8029103ce10148dfe5d0317e80)
Two main tests: read the file and compare to a given image (loaded from
png), and write a file out and compare to a previously-written image.
The write test in particular is kind of fragile, but it should help
catch some errors where a code change was not intended to affect the
output of the plugin.
Tests are included for all the writable formats, as well as every
readable format that GIMP can write to (and so I could easily get an
example of).
REVIEW: 115430