moved imageToBuffer sub to a new module Image.pm