Using this curve it is easy to find the voltage output in both previous examples:

In the first case v_{D} was 0.75Volt and V_{OUT} is obviously 7.5 Volt:

In the second v_{D} was 1.2Volt and V_{OUT} is 10 Volt (it is not equal to 12Volt because it can't exceed V_{CC}!):