I ran your gif reader in a loop to load a lot of images with comment, ran out of file handles after a while.
Looking into the cpp file, the imwriteGif closes the file handle, imreadGif does not (there's just one call to fclose in that source).
I'll be fine with making a pull request, but if I do - is this the official repo that will make it to CRAN?