示例#1
0
        public static void ScaleUsingPath(ComboBox minScaleCombox, ComboBox maxScaleCombox, ComboBox filterModeCombox)
        {
            if (!InputIsValid(minScaleCombox, maxScaleCombox))
            {
                return;
            }

            float sMin = minScaleCombox.GetFloat();
            float sMax = sMin;

            if (!string.IsNullOrWhiteSpace(maxScaleCombox.Text.Trim()))
            {
                sMax = maxScaleCombox.GetFloat();
            }
            int filterMode = filterModeCombox.SelectedIndex;

            ScaleUtils.ScaleDir(sMin, sMax, filterMode, filterModeCombox.Text.Trim());
        }
示例#2
0
        public static void ResampleUsingPath(ComboBox minScaleCombox, ComboBox maxScaleCombox, ComboBox downFilterCombox, ComboBox upFilterCombox)
        {
            if (!InputIsValid(minScaleCombox, maxScaleCombox))
            {
                return;
            }

            float sMin = minScaleCombox.GetFloat();
            float sMax = sMin;

            if (!string.IsNullOrWhiteSpace(maxScaleCombox.Text.Trim()))
            {
                sMax = maxScaleCombox.GetFloat();
            }
            int filterMode     = downFilterCombox.SelectedIndex;
            int reupFilterMode = upFilterCombox.SelectedIndex;

            ScaleUtils.ResampleDirRand(sMin, sMax, filterMode, downFilterCombox.Text.Trim(), reupFilterMode, upFilterCombox.Text.Trim());
        }
示例#3
0
        public static void ScaleFileList(string[] files, ComboBox minScaleCombox, ComboBox maxScaleCombox, ComboBox filterModeCombox)
        {
            if (!InputIsValid(minScaleCombox, maxScaleCombox))
            {
                return;
            }

            float sMin = minScaleCombox.GetFloat();
            float sMax = sMin;

            if (!string.IsNullOrWhiteSpace(maxScaleCombox.Text.Trim()))
            {
                sMax = maxScaleCombox.GetFloat();
            }
            int filterMode = filterModeCombox.SelectedIndex;

            foreach (string file in files)
            {
                ScaleUtils.Scale(file, sMin, sMax, filterMode, filterModeCombox.Text.Trim());
            }
        }