I had to add a missing bracket to compile, this line should be:

BMP (9, "BMP", list(), list("S_IMAGE/BMP"), type.PICTURE),