* @return <code>true</code> if the screenshot was created and saved, <code>false</code> otherwise.
* @since 2.0
*/
public static boolean captureScreenshot(final String fileName, final Control control) {
new ImageFormatConverter().imageTypeOf(fileName.substring(fileName.lastIndexOf('.') + 1));
return UIThreadRunnable.syncExec(new BoolResult() {
public Boolean run() {
Display display = control.getDisplay();
Rectangle bounds = control.getBounds();
Rectangle mappedToDisplay = display.map(control.getParent(), null, bounds);