autodetect flash width - thanks to Kestutis Kupciunas