Use this to precalculate the width/height of the destination bitmap. As factor give the width/height of the original bitmap that is to be scaled via ScaleBitMap(), as numerator give the value you will write into bsa_XSrcFactor/bsa_YSrcFactor and as denominator the value of bsa_XDestFactor/bsa_YDestFactor.