I got the code snippet from here: link
The error is: Undefined reference to SaveBMPFile
Thanks in advance.
It looks like the code you are using was originally copied from this forum thread. Notice that it says "The SaveBMPFile function referenced above is attached (I didn't write it)" and provides an attachment that contains the definition.