Skip to content

Commit

Permalink
Ensure VIPS_ARG_* defaults are in-sync with _init()
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Jan 25, 2025
1 parent 09e9233 commit b6d7b07
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion libvips/arithmetic/clamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ vips_clamp_class_init(VipsClampClass *class)
_("Maximum value"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsClamp, max),
-INFINITY, INFINITY, 0.0);
-INFINITY, INFINITY, 1.0);
}

static void
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/hough_circle.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ vips_hough_circle_class_init(VipsHoughClass *class)
_("Scale down dimensions by this factor"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsHoughCircle, scale),
1, 100000, 3);
1, 100000, 1);

VIPS_ARG_INT(class, "min_radius", 120,
_("Min radius"),
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/max.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ vips_max_class_init(VipsMaxClass *class)
_("Number of maximum values to find"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsMax, size),
1, 1000000, 10);
1, 1000000, 1);

VIPS_ARG_BOXED(class, "out_array", 6,
_("Output array"),
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/min.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ vips_min_class_init(VipsMinClass *class)
_("Number of minimum values to find"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsMin, size),
1, 1000000, 10);
1, 1000000, 1);

VIPS_ARG_BOXED(class, "out_array", 6,
_("Output array"),
Expand Down
2 changes: 1 addition & 1 deletion libvips/conversion/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ vips_cache_class_init(VipsCacheClass *class)
_("Maximum number of tiles to cache"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsCache, max_tiles),
-1, 1000000, 1000);
-1, 1000000, 250);
}

static void
Expand Down
2 changes: 1 addition & 1 deletion libvips/conversion/gamma.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ vips_gamma_class_init(VipsGammaClass *class)
_("Gamma factor"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsGamma, exponent),
0.000001, 1000.0, 2.4);
0.000001, 1000.0, 1.0 / 2.4);
}

static void
Expand Down
2 changes: 1 addition & 1 deletion libvips/conversion/msb.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ vips_msb_class_init(VipsMsbClass *class)
_("Band to msb"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsMsb, band),
0, 100000000, 0);
-1, 100000000, -1);
}

static void
Expand Down
2 changes: 1 addition & 1 deletion libvips/foreign/csvload.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ vips_foreign_load_csv_class_init(VipsForeignLoadCsvClass *class)
_("Read this many lines from the file"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsForeignLoadCsv, lines),
-1, 10000000, 0);
-1, 10000000, -1);

VIPS_ARG_STRING(class, "whitespace", 22,
_("Whitespace"),
Expand Down
2 changes: 1 addition & 1 deletion libvips/foreign/tiffsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ vips_foreign_save_tiff_class_init(VipsForeignSaveTiffClass *class)
_("Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsForeignSaveTiff, level),
1, 22, 6);
0, 22, 0);

VIPS_ARG_BOOL(class, "lossless", 24,
_("Lossless"),
Expand Down
4 changes: 2 additions & 2 deletions libvips/mosaicing/match.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,14 @@ vips_match_class_init(VipsMatchClass *class)
_("Half window size"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsMatch, hwindow),
0, 1000000000, 1);
0, 1000000000, 5);

VIPS_ARG_INT(class, "harea", 14,
_("harea"),
_("Half area size"),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET(VipsMatch, harea),
0, 1000000000, 1);
0, 1000000000, 15);

VIPS_ARG_BOOL(class, "search", 15,
_("Search"),
Expand Down

0 comments on commit b6d7b07

Please sign in to comment.