
char *endptr;
long int value = strtol(optarg, &endptr, 10);
if (endptr == optarg || *endptr != '\0') {
    // handle error: input string is not a valid integer
}
if (value < INT_MIN || value > INT_MAX) {
    // handle error: input value is outside the range of int
}
horizSubSampling = (int)value;
