diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a26601..c7fe0ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * improve NULL pointer handling [dloebl] * improve GFlags argument handling [jcupitt] +* add missing flag and enum docs [jcupitt] ## Version 2.2.4 (2025-06-05) diff --git a/lib/vips/combine.rb b/lib/vips/combine.rb new file mode 100644 index 0000000..4bc7ef4 --- /dev/null +++ b/lib/vips/combine.rb @@ -0,0 +1,10 @@ +module Vips + # How to combine values, see for example {Image#compass}. + # + # * `:max` take the maximum of the possible values + # * `:sum` sum all the values + # * `:min` take the minimum value + + class Combine < Symbol + end +end diff --git a/lib/vips/fail_on.rb b/lib/vips/fail_on.rb new file mode 100644 index 0000000..520a2b7 --- /dev/null +++ b/lib/vips/fail_on.rb @@ -0,0 +1,15 @@ +module Vips + # How sensitive loaders are to errors, from never stop (very insensitive), + # to stop on the smallest warning (very sensitive). + # + # Each implies the ones before it, so `:error` implies `:truncated`, for + # example. + # + # * `:none` never stop + # * `:truncated` stop on image truncated, nothing else + # * `:error` stop on serious error or truncation + # * `:warning` stop on anything, even warnings + + class FailOn < Symbol + end +end diff --git a/lib/vips/foreign_dz_container.rb b/lib/vips/foreign_dz_container.rb new file mode 100644 index 0000000..d83d09f --- /dev/null +++ b/lib/vips/foreign_dz_container.rb @@ -0,0 +1,10 @@ +module Vips + # The container format to use + # + # * `:fs` write tiles to the filesystem + # * `:zip` write tiles to a zip file + # * `:szi` write to a szi file + + class ForeignDzContainer < Symbol + end +end diff --git a/lib/vips/foreign_dz_depth.rb b/lib/vips/foreign_dz_depth.rb new file mode 100644 index 0000000..f6f33af --- /dev/null +++ b/lib/vips/foreign_dz_depth.rb @@ -0,0 +1,10 @@ +module Vips + # How many pyramid layers to create. + # + # * `:onepixel` create layers down to 1x1 pixel + # * `:onetile` create layers down to 1x1 tile + # * `:one` only create a single layer + + class ForeignDzDepth < Symbol + end +end diff --git a/lib/vips/foreign_dz_layout.rb b/lib/vips/foreign_dz_layout.rb new file mode 100644 index 0000000..7503e18 --- /dev/null +++ b/lib/vips/foreign_dz_layout.rb @@ -0,0 +1,12 @@ +module Vips + # What directory layout and metadata standard to use. + # + # * `:dz` use DeepZoom directory layout + # * `:zoomify` use Zoomify directory layout + # * `:google` use Google maps directory layout + # * `:iiif` use IIIF v2 directory layout + # * `:iiif3` use IIIF v3 directory layout + + class ForeignDzLayout < Symbol + end +end diff --git a/lib/vips/foreign_heif_compression.rb b/lib/vips/foreign_heif_compression.rb new file mode 100644 index 0000000..0601e04 --- /dev/null +++ b/lib/vips/foreign_heif_compression.rb @@ -0,0 +1,11 @@ +module Vips + # The compression format to use inside a HEIF container + # + # * `:hevc` x265 + # * `:avc` x264 + # * `:jpeg` jpeg + # * `:av1` aom + + class ForeignHeifCompression < Symbol + end +end diff --git a/lib/vips/foreign_heif_encoder.rb b/lib/vips/foreign_heif_encoder.rb new file mode 100644 index 0000000..c3f3df8 --- /dev/null +++ b/lib/vips/foreign_heif_encoder.rb @@ -0,0 +1,11 @@ +module Vips + # The selected encoder to use. + # + # * `:auto` auto + # * `:rav1e` RAV1E + # * `:svt` SVT-AV1 + # * `:x265` x265 + + class ForeignHeifEncoder < Symbol + end +end diff --git a/lib/vips/foreign_keep.rb b/lib/vips/foreign_keep.rb new file mode 100644 index 0000000..26871e4 --- /dev/null +++ b/lib/vips/foreign_keep.rb @@ -0,0 +1,13 @@ +module Vips + # Savers can be given a set of metadata items to keep. + # + # * `:none` remove all metadata + # * `:exif` keep EXIF metadata + # * `:xmp` keep XMP metadata + # * `:iptc` keep IPTC metadata + # * `:icc` keep ICC profiles + # * `:other` keep other metadata + + class ForeignKeep < Symbol + end +end diff --git a/lib/vips/foreign_png_filter.rb b/lib/vips/foreign_png_filter.rb new file mode 100644 index 0000000..fb928bd --- /dev/null +++ b/lib/vips/foreign_png_filter.rb @@ -0,0 +1,13 @@ +module Vips + # The set of filters for PNG save. See http://www.w3.org/TR/PNG-Filters.html + # + # * `:none` no filtering + # * `:sub` difference to the left + # * `:up` difference up + # * `:avg` average of left and up + # * `:paeth` pick best neighbor predictor automatically + # * `:all` adaptive + + class ForeignPngFilter < Symbol + end +end diff --git a/lib/vips/foreign_ppm_format.rb b/lib/vips/foreign_ppm_format.rb new file mode 100644 index 0000000..4ef2827 --- /dev/null +++ b/lib/vips/foreign_ppm_format.rb @@ -0,0 +1,12 @@ +module Vips + # The netpbm file format to save as. + # + # * `:pbm` portable bitmap + # * `:pgm` portable greymap + # * `:ppm` portable pixmap + # * `:pfm` portable float map + # * `:pnm` portable anymap + + class ForeignPpmFormat < Symbol + end +end diff --git a/lib/vips/foreign_subsample.rb b/lib/vips/foreign_subsample.rb new file mode 100644 index 0000000..deb9f50 --- /dev/null +++ b/lib/vips/foreign_subsample.rb @@ -0,0 +1,10 @@ +module Vips + # Set subsampling mode. + # + # * `:auto` prevent subsampling when quality >= 90 + # * `:on` always perform subsampling + # * `:off` never perform subsampling + + class ForeignSubsample < Symbol + end +end diff --git a/lib/vips/foreign_tiff_compression.rb b/lib/vips/foreign_tiff_compression.rb new file mode 100644 index 0000000..b6aec3c --- /dev/null +++ b/lib/vips/foreign_tiff_compression.rb @@ -0,0 +1,16 @@ +module Vips + # The compression types supported by the tiff writer. + # + # * `:none` no compression + # * `:jpeg` jpeg compression + # * `:deflate` deflate (zip) compression + # * `:packbits` packbits compression + # * `:ccittfax4` fax4 compression + # * `:lzw` LZW compression + # * `:webp` WEBP compression + # * `:zstd` ZSTD compression + # * `:jp2k` JP2K compression + + class ForeignTiffCompression < Symbol + end +end diff --git a/lib/vips/foreign_tiff_predictor.rb b/lib/vips/foreign_tiff_predictor.rb new file mode 100644 index 0000000..3141558 --- /dev/null +++ b/lib/vips/foreign_tiff_predictor.rb @@ -0,0 +1,10 @@ +module Vips + # The predictor can help deflate and lzw compression. + # + # * `:none` no prediction + # * `:horizontal` horizontal differencing + # * `:float` float predictor + + class ForeignTiffPredictor < Symbol + end +end diff --git a/lib/vips/foreign_tiff_resunit.rb b/lib/vips/foreign_tiff_resunit.rb new file mode 100644 index 0000000..80c199f --- /dev/null +++ b/lib/vips/foreign_tiff_resunit.rb @@ -0,0 +1,9 @@ +module Vips + # Use inches or centimeters as the resolution unit for a tiff file. + # + # * `:cm` use centimeters + # * `:inch` use inches + + class ForeignTiffResunit < Symbol + end +end diff --git a/lib/vips/foreign_webp_preset.rb b/lib/vips/foreign_webp_preset.rb new file mode 100644 index 0000000..3e400df --- /dev/null +++ b/lib/vips/foreign_webp_preset.rb @@ -0,0 +1,13 @@ +module Vips + # Tune lossy encoder settings for different image types. + # + # * `:default` default preset + # * `:picture` digital picture, like portrait, inner shot + # * `:photo` outdoor photograph, with natural lighting + # * `:drawing` hand or line drawing, with high-contrast details + # * `:icon` small-sized colorful images + # * `:text` text-like + + class ForeignWebpPreset < Symbol + end +end diff --git a/lib/vips/intent.rb b/lib/vips/intent.rb new file mode 100644 index 0000000..8ce3622 --- /dev/null +++ b/lib/vips/intent.rb @@ -0,0 +1,12 @@ +module Vips + # The rendering intent. + # + # * `:perceptual` perceptual rendering intent + # * `:relative` relative colorimetric rendering intent + # * `:saturation` saturation rendering intent + # * `:absolute` absolute colorimetric rendering intent + # * `:auto` the rendering intent that the profile suggests + + class Intent < Symbol + end +end diff --git a/lib/vips/interpretation.rb b/lib/vips/interpretation.rb index 96f314e..9005311 100644 --- a/lib/vips/interpretation.rb +++ b/lib/vips/interpretation.rb @@ -6,7 +6,6 @@ module Vips # * `:multiband` generic many-band image # * `:b_w` some kind of single-band image # * `:histogram` a 1D image, eg. histogram or lookup table - # * `:fourier` image is in fourier space # * `:xyz` the first three bands are CIE XYZ # * `:lab` pixels are in CIE Lab space # * `:cmyk` the first four bands are in CMYK space @@ -16,12 +15,14 @@ module Vips # * `:lch` pixels are in CIE LCh space # * `:labs` CIE LAB coded as three signed 16-bit values # * `:srgb` pixels are sRGB - # * `:hsv` pixels are HSV - # * `:scrgb` pixels are scRGB # * `:yxy` pixels are CIE Yxy + # * `:fourier` image is in fourier space # * `:rgb16` generic 16-bit RGB # * `:grey16` generic 16-bit mono # * `:matrix` a matrix + # * `:scrgb` pixels are scRGB + # * `:hsv` pixels are HSV + class Interpretation < Symbol end end diff --git a/lib/vips/kernel.rb b/lib/vips/kernel.rb index 5c7a513..69cd913 100644 --- a/lib/vips/kernel.rb +++ b/lib/vips/kernel.rb @@ -4,16 +4,19 @@ module Vips # # At least these should be available: # - # * `:nearest` Nearest-neighbour interpolation. - # * `:linear` Linear interpolation. - # * `:cubic` Cubic interpolation. - # * `:lanczos2` Two-lobe Lanczos - # * `:lanczos3` Three-lobe Lanczos + # * `:nearest` nearest-neighbour interpolation + # * `:linear` linear interpolation + # * `:cubic` cubic interpolation + # * `:mitchell` Mitchell interpolation + # * `:lanczos2` two-lobe Lanczos + # * `:lanczos3` three-lobe Lanczos + # * `:mks2013` convolve with Magic Kernel Sharp 2013 + # * `:mks2021` convolve with Magic Kernel Sharp 2021 # # For example: # # ```ruby - # im = im.resize 3, :kernel => :lanczos2 + # im = im.resize 3, kernel: :lanczos2 # ``` class Kernel < Symbol diff --git a/lib/vips/operation_morphology.rb b/lib/vips/operation_morphology.rb new file mode 100644 index 0000000..02bc2bc --- /dev/null +++ b/lib/vips/operation_morphology.rb @@ -0,0 +1,9 @@ +module Vips + # Pick a morphological operator. + # + # * `:erode` true if all set + # * `:dilate` true if any set + + class OperationMorphology < Symbol + end +end diff --git a/lib/vips/pcs.rb b/lib/vips/pcs.rb new file mode 100644 index 0000000..1edb046 --- /dev/null +++ b/lib/vips/pcs.rb @@ -0,0 +1,10 @@ +module Vips + # Pick a Profile Connection Space for {Image#icc_import} and + # {Image#icc_export}`. + # + # * `:lab` use CIELAB D65 as the Profile Connection Space + # * `:xyz` use XYZ as the Profile Connection Space + + class PCS < Symbol + end +end diff --git a/lib/vips/precision.rb b/lib/vips/precision.rb new file mode 100644 index 0000000..01207be --- /dev/null +++ b/lib/vips/precision.rb @@ -0,0 +1,10 @@ +module Vips + # How accurate an operation should be. + # + # * `:integer` int everywhere + # * `:float` float everywhere + # * `:approximate` approximate integer output + + class Precision < Symbol + end +end diff --git a/lib/vips/region_shrink.rb b/lib/vips/region_shrink.rb new file mode 100644 index 0000000..13f556d --- /dev/null +++ b/lib/vips/region_shrink.rb @@ -0,0 +1,13 @@ +module Vips + # ow to calculate the output pixels when shrinking a 2x2 region. + # + # * `:mean` use the average + # * `:median` use the median + # * `:mode` use the mode + # * `:max` use the maximum + # * `:min` use the minimum + # * `:nearest` use the top-left pixel + + class RegionShrink < Symbol + end +end diff --git a/lib/vips/sdf_shape.rb b/lib/vips/sdf_shape.rb new file mode 100644 index 0000000..1ab35f0 --- /dev/null +++ b/lib/vips/sdf_shape.rb @@ -0,0 +1,11 @@ +module Vips + # The SDF to generate, see {Image.sdf}. + # + # * `:circle` a circle at @a, radius @r + # * `:box` a box from @a to @b + # * `:rounded_box` a box with rounded @corners from @a to @b + # * `:line` a line from @a to @b + + class SdfShape < Symbol + end +end diff --git a/lib/vips/text_wrap.rb b/lib/vips/text_wrap.rb new file mode 100644 index 0000000..53da2db --- /dev/null +++ b/lib/vips/text_wrap.rb @@ -0,0 +1,11 @@ +module Vips + # Sets the word wrapping style for {Image#text} when used with a + # maximum width. + # + # * `:char` wrap at character boundaries + # * `:word_char` wrap at word boundaries, but fall back to character boundaries if there is not enough space for a full word + # * `:none` no wrapping + + class TextWrap < Symbol + end +end