Get width and height from data