if (intImageWidth > x) {
                intAdjustedHeight = intAdjustedHeight * (x / intAdjustedWidth);
                intAdjustedWidth = x;
                if (intAdjustedHeight > y) {
                    intAdjustedWidth = intAdjustedWidth * (y / intAdjustedHeight);