Did it using the below code:
Image badge = Addin1.Properties.Resources.img;
String path = Path.Combine(Path.GetTempPath (), "img.png");
badge.Save(path);
Remove the image after the image has been pasted on the slide, delete the image from the above path.
File.Delete(path);