I just recently did something similar to use for sharing with social media. Here is the code that allowed my screen shot to be stored on sd card ...
www.google.com.tw