Dimensions of measures on carpets