Function getImageSourceDimensions