Photographs of the Royal Family including images of Princess Margaret taken by her future husband, historic portraits by Cecil Beaton and works by Andy Warhol will go on display next year in Scotland.