Skip to content

Commit d5fb816

Browse files
authored
update conversion docs (#4472)
* ooof update conversion docs to new format, revise arithmetic and colour * fix icc_transform optional args
1 parent d003027 commit d5fb816

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+521
-480
lines changed

doc/rename.sed

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ s/vips_\(cos\)()/[method@Image.\1]/g
121121
s/vips_\(countlines\)()/[method@Image.\1]/g
122122
s/vips_\(crop\)()/[method@Image.\1]/g
123123
s/vips_\(cross_phase\)()/[method@Image.\1]/g
124+
s/vips_\(csvload\)()/[ctor@Image.\1]/g
124125
s/vips_\(csvsave\)()/[method@Image.\1]/g
125126
s/vips_\(csvsave_target\)()/[method@Image.\1]/g
126127
s/vips_\(dE00\)()/[method@Image.\1]/g
@@ -199,6 +200,7 @@ s/vips_\(HSV2sRGB\)()/[method@Image.\1]/g
199200
s/vips_\(icc_export\)()/[method@Image.\1]/g
200201
s/vips_\(icc_import\)()/[method@Image.\1]/g
201202
s/vips_\(icc_transform\)()/[method@Image.\1]/g
203+
s/vips_\(identity\)()/[ctor@Image.\1]/g
202204
s/vips_\(ifthenelse\)()/[method@Image.\1]/g
203205
s/vips_image_\(get_typeof\)()/[method@Image.\1]/g
204206
s/vips_\(imag\)()/[method@Image.\1]/g
@@ -210,6 +212,7 @@ s/vips_\(join\)()/[method@Image.\1]/g
210212
s/vips_\(jp2ksave_buffer\)()/[method@Image.\1]/g
211213
s/vips_\(jp2ksave\)()/[method@Image.\1]/g
212214
s/vips_\(jp2ksave_target\)()/[method@Image.\1]/g
215+
s/vips_\(jpegload\)()/[ctor@Image.\1]/g
213216
s/vips_\(jpegsave_buffer\)()/[method@Image.\1]/g
214217
s/vips_\(jpegsave\)()/[method@Image.\1]/g
215218
s/vips_\(jpegsave_mime\)()/[method@Image.\1]/g
@@ -285,10 +288,13 @@ s/vips_\(orimage_const\)()/[method@Image.\1]/g
285288
s/vips_\(orimage\)()/[method@Image.\1]/g
286289
s/vips_\(percent\)()/[method@Image.\1]/g
287290
s/vips_\(phasecor\)()/[method@Image.\1]/g
291+
s/vips_\(pngload\)()/[ctor@Image.\1]/g
288292
s/vips_\(pngsave_buffer\)()/[method@Image.\1]/g
289293
s/vips_\(pngsave\)()/[method@Image.\1]/g
290294
s/vips_\(pngsave_target\)()/[method@Image.\1]/g
291295
s/vips_\(polar\)()/[method@Image.\1]/g
296+
s/vips_\(pow_const1\)()/[method@Image.\1]/g
297+
s/vips_\(pow_const\)()/[method@Image.\1]/g
292298
s/vips_\(pow\)()/[method@Image.\1]/g
293299
s/vips_\(ppmsave\)()/[method@Image.\1]/g
294300
s/vips_\(ppmsave_target\)()/[method@Image.\1]/g
@@ -302,6 +308,7 @@ s/vips_\(radsave_buffer\)()/[method@Image.\1]/g
302308
s/vips_\(radsave\)()/[method@Image.\1]/g
303309
s/vips_\(radsave_target\)()/[method@Image.\1]/g
304310
s/vips_\(rank\)()/[method@Image.\1]/g
311+
s/vips_\(rawload\)()/[ctor@Image.\1]/g
305312
s/vips_\(rawsave_buffer\)()/[method@Image.\1]/g
306313
s/vips_\(rawsave_fd\)()/[method@Image.\1]/g
307314
s/vips_\(rawsave\)()/[method@Image.\1]/g
@@ -381,15 +388,29 @@ s/vips_\(XYZ2Yxy\)()/[method@Image.\1]/g
381388
s/vips_\(Yxy2XYZ\)()/[method@Image.\1]/g
382389
s/vips_\(zoom\)()/[method@Image.\1]/g
383390

391+
s/vips_\(arrayjoin\)()/[func@Image.\1]/g
392+
s/vips_\(bandjoin\)()/[func@Image.\1]/g
393+
s/vips_\(bandrank\)()/[func@Image.\1]/g
394+
s/vips_\(composite\)()/[func@Image.\1]/g
395+
s/vips_\(sum\)()/[func@Image.\1]/g
396+
s/vips_\(switch\)()/[func@Image.\1]/g
397+
384398
s/vips_\([^(]*\)()/[func@\1]/g
385399

400+
s/#Vips\(Extend\)/[enum@\1]/g
401+
s/#Vips\(Angle45\)/[enum@\1]/g
402+
s/#Vips\(Interesting\)/[enum@\1]/g
386403
s/#Vips\(Access\)/[enum@\1]/g
404+
s/#Vips\(Align\)/[enum@\1]/g
405+
s/#Vips\(Angle\)/[enum@\1]/g
406+
s/#Vips\(ArgumentFlags\)/[flags@\1]/g
387407
s/#Vips\(BandFormat\)/[enum@\1]/g
388-
s/#Vips\(Interpretation\)/[enum@\1]/g
389408
s/#Vips\(Coding\)/[enum@\1]/g
390409
s/#Vips\(DemandStyle\)/[enum@\1]/g
410+
s/#Vips\(Intent\)/[enum@\1]/g
411+
s/#Vips\(Interpretation\)/[enum@\1]/g
412+
s/#Vips\(PCS\)/[enum@\1]/g
391413
s/#Vips\(Precision\)/[enum@\1]/g
392-
s/#Vips\(ArgumentFlags\)/[flags@\1]/g
393414

394415
s/#Vips\(Rect\)/[struct@\1]/g
395416
s/#Vips\(Progress\)/[struct@\1]/g
@@ -420,6 +441,7 @@ s/#Vips\(ThreadpoolWorkFn\)/[callback@\1]/g
420441
s/#Vips\(ThreadpoolProgressFn\)/[callback@\1]/g
421442

422443
s/#VIPS_OPERATION_MATH_\([^ ,.]*\)/[enum@Vips.OperationMath.\1]/g
444+
s/#VIPS_PCS_\([^ ,.]*\)/[enum@Vips.PCS.\1]/g
423445
s/#VIPS_OPERATION_MATH2_\([^ ,.]*\)/[enum@Vips.OperationMath2.\1]/g
424446
s/#VIPS_OPERATION_RELATIONAL_\([^ ,.]*\)/[enum@Vips.OperationRelational.\1]/g
425447
s/#VIPS_OPERATION_BOOLEAN_\([^ ,.]*\)/[enum@Vips.OperationBoolean.\1]/g
@@ -435,6 +457,8 @@ s/#VIPS_INTERPRETATION_\([^ ,.]*\)/[enum@Vips.Interpretation.\1]/g
435457
s/#VIPS_ACCESS_\([^ ,.]*\)/[enum@Vips.Access.\1]/g
436458
s/#VIPS_CODING_\([^ ,.]*\)/[enum@Vips.Coding.\1]/g
437459

460+
s/g_\(assert_not_reached\)/banana_\1_banana/g
461+
438462
s/g_thread_\([^(]*new\)()/[ctor@GLib.Thread.\1]/g
439463
s/g_object_\(new\)()/[ctor@GObject.Object.\1]/g
440464
s/g_object_\([^(]*\)()/[method@GObject.Object.\1]/g
@@ -446,3 +470,5 @@ s/%GInput/[class@Gio.Input]/g
446470
s/%GSList/[struct@GLib.SList]/g
447471

448472
s/g_\([^(]*\)()/[func@GLib.\1]/g
473+
474+
s/banana_\(.*\)_banana/g_\1/g

libvips/arithmetic/clamp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,14 @@ vips_clamp_init(VipsClamp *clamp)
186186
* @out: (out): output [class@Image]
187187
* @...: %NULL-terminated list of optional named arguments
188188
*
189-
* ::: note "Optional arguments"
190-
* * @min: %gdouble, minimum value
191-
* * @max: %gdouble, maximum value
192-
*
193189
* This operation clamps pixel values to a range, by default 0 - 1.
194190
*
195191
* Use @min and @max to change the range.
196192
*
193+
* ::: tip "Optional arguments"
194+
* * @min: %gdouble, minimum value
195+
* * @max: %gdouble, maximum value
196+
*
197197
* ::: seealso
198198
* [method@Image.sign], [method@Image.abs], [ctor@Image.sdf].
199199
*

libvips/arithmetic/find_trim.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,6 @@ vips_find_trim_init(VipsFindTrim *find_trim)
256256
* @height: (out): output height
257257
* @...: %NULL-terminated list of optional named arguments
258258
*
259-
* ::: note "Optional arguments"
260-
* * @threshold: %gdouble, background / object threshold
261-
* * @background: [struct@ArrayDouble], background colour
262-
* * @line_art: %gboolean, enable line art mode
263-
*
264259
* Search @in for the bounding box of the non-background area.
265260
*
266261
* Any alpha is flattened out, then the image is median-filtered (unless
@@ -269,12 +264,12 @@ vips_find_trim_init(VipsFindTrim *find_trim)
269264
* the absolute difference are calculated from this binary image and searched
270265
* for the first row or column in each direction to obtain the bounding box.
271266
*
272-
* If the image is entirely background, [method@Image.find_trim] returns @width == 0
273-
* and @height == 0.
267+
* If the image is entirely background, [method@Image.find_trim] returns
268+
* @width == 0 and @height == 0.
274269
*
275270
* @background defaults to 255, or 65535 for 16-bit images. Set another value,
276-
* or use [method@Image.getpoint] to pick a value from an edge. You'll need to flatten
277-
* before [method@Image.getpoint] to get a correct background value.
271+
* or use [method@Image.getpoint] to pick a value from an edge. You'll need
272+
* to flatten before [method@Image.getpoint] to get a correct background value.
278273
*
279274
* @threshold defaults to 10.
280275
*
@@ -285,6 +280,11 @@ vips_find_trim_init(VipsFindTrim *find_trim)
285280
*
286281
* The image needs to be at least 3x3 pixels in size.
287282
*
283+
* ::: tip "Optional arguments"
284+
* * @threshold: %gdouble, background / object threshold
285+
* * @background: [struct@ArrayDouble], background colour
286+
* * @line_art: %gboolean, enable line art mode
287+
*
288288
* ::: seealso
289289
* [method@Image.getpoint], [method@Image.extract_area], [method@Image.smartcrop].
290290
*

libvips/arithmetic/hist_find.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,16 +453,16 @@ vips_hist_find_init(VipsHistFind *hist_find)
453453
* @out: (out): output image
454454
* @...: %NULL-terminated list of optional named arguments
455455
*
456-
* ::: note "Optional arguments"
457-
* * @band: band to equalise
458-
*
459456
* Find the histogram of @in. Find the histogram for band @band (producing a
460457
* one-band histogram), or for all bands (producing an n-band histogram) if
461458
* @band is -1.
462459
*
463460
* char and uchar images are cast to uchar before histogramming, all other
464461
* image types are cast to ushort.
465462
*
463+
* ::: tip "Optional arguments"
464+
* * @band: band to equalise
465+
*
466466
* ::: seealso
467467
* [method@Image.hist_find_ndim], [method@Image.hist_find_indexed].
468468
*

libvips/arithmetic/hist_find_indexed.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,6 @@ vips_hist_find_indexed_init(VipsHistFindIndexed *indexed)
498498
* @out: (out): output image
499499
* @...: %NULL-terminated list of optional named arguments
500500
*
501-
* ::: note "Optional arguments"
502-
* * @combine: #VipsCombine, combine bins like this
503501
*
504502
* Make a histogram of @in, but use image @index to pick the bins. In other
505503
* words, element zero in @out contains the combination of all the pixels in @in
@@ -515,8 +513,12 @@ vips_hist_find_indexed_init(VipsHistFindIndexed *indexed)
515513
* Normally, bins are summed, but you can use @combine to set other combine
516514
* modes.
517515
*
518-
* This operation is useful in conjunction with [method@Image.labelregions]. You can
519-
* use it to find the centre of gravity of blobs in an image, for example.
516+
* This operation is useful in conjunction with [method@Image.labelregions].
517+
* You can use it to find the centre of gravity of blobs in an image, for
518+
* example.
519+
*
520+
* ::: tip "Optional arguments"
521+
* * @combine: #VipsCombine, combine bins like this
520522
*
521523
* ::: seealso
522524
* [method@Image.hist_find], [method@Image.labelregions].

libvips/arithmetic/hist_find_ndim.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,6 @@ vips_hist_find_ndim_init(VipsHistFindNDim *ndim)
335335
* @out: (out): output image
336336
* @...: %NULL-terminated list of optional named arguments
337337
*
338-
* ::: note "Optional arguments"
339-
* * @bins: number of bins to make on each axis
340-
*
341338
* Make a one, two or three dimensional histogram of a 1, 2 or
342339
* 3 band image. Divide each axis into @bins bins .. ie.
343340
* output is 1 x bins, bins x bins, or bins x bins x bins bands.
@@ -346,6 +343,9 @@ vips_hist_find_ndim_init(VipsHistFindNDim *ndim)
346343
* char and uchar images are cast to uchar before histogramming, all other
347344
* image types are cast to ushort.
348345
*
346+
* ::: tip "Optional arguments"
347+
* * @bins: number of bins to make on each axis
348+
*
349349
* ::: seealso
350350
* [method@Image.hist_find], [method@Image.hist_find_indexed].
351351
*

libvips/arithmetic/hough_circle.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,6 @@ vips_hough_circle_init(VipsHoughCircle *hough_circle)
265265
* @out: (out): output image
266266
* @...: %NULL-terminated list of optional named arguments
267267
*
268-
* ::: note "Optional arguments"
269-
* * @scale: scale down dimensions by this much
270-
* * @min_radius: smallest radius to search for
271-
* * @max_radius: largest radius to search for
272-
*
273268
* Find the circular Hough transform of an image. @in must be one band, with
274269
* non-zero pixels for image edges. @out is three-band, with the third channel
275270
* representing the detected circle radius. The operation scales the number of
@@ -286,6 +281,11 @@ vips_hough_circle_init(VipsHoughCircle *hough_circle)
286281
* @in, and reduce the number of radii tested (and hence the number of bands
287282
* int @out) by a factor of three as well.
288283
*
284+
* ::: tip "Optional arguments"
285+
* * @scale: scale down dimensions by this much
286+
* * @min_radius: smallest radius to search for
287+
* * @max_radius: largest radius to search for
288+
*
289289
* ::: seealso
290290
* [method@Image.hough_line].
291291
*

libvips/arithmetic/hough_line.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,6 @@ vips_hough_line_init(VipsHoughLine *hough_line)
171171
* @out: (out): output image
172172
* @...: %NULL-terminated list of optional named arguments
173173
*
174-
* ::: note "Optional arguments"
175-
* * @width: horizontal size of parameter space
176-
* * @height: vertical size of parameter space
177-
*
178174
* Find the line Hough transform for @in. @in must have one band. @out has one
179175
* band, with pixels being the number of votes for that line. The X dimension
180176
* of @out is the line angle in 0 - 180 degrees, the Y dimension is the
@@ -183,6 +179,10 @@ vips_hough_line_init(VipsHoughLine *hough_line)
183179
* Use @width @height to set the size of the parameter space image (@out),
184180
* that is, how accurate the line determination should be.
185181
*
182+
* ::: tip "Optional arguments"
183+
* * @width: horizontal size of parameter space
184+
* * @height: vertical size of parameter space
185+
*
186186
* ::: seealso
187187
* [method@Image.hough_circle].
188188
*

libvips/arithmetic/linear.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,6 @@ vips_linearv(VipsImage *in, VipsImage **out,
505505
* @n: length of constant arrays
506506
* @...: %NULL-terminated list of optional named arguments
507507
*
508-
* ::: note "Optional arguments"
509-
* * @uchar: output uchar pixels
510-
*
511508
* Pass an image through a linear transform, ie. (@out = @in * @a + @b). Output
512509
* is float for integer input, double for double input, complex for
513510
* complex input and double complex for double complex input. Set @uchar to
@@ -520,6 +517,9 @@ vips_linearv(VipsImage *in, VipsImage **out,
520517
* element and the image only has a single band, the result is a many-band
521518
* image where each band corresponds to one array element.
522519
*
520+
* ::: tip "Optional arguments"
521+
* * @uchar: output uchar pixels
522+
*
523523
* ::: seealso
524524
* [method@Image.linear1], [method@Image.add].
525525
*
@@ -547,12 +547,11 @@ vips_linear(VipsImage *in, VipsImage **out,
547547
* @b: constant for addition
548548
* @...: %NULL-terminated list of optional named arguments
549549
*
550-
* Optional arguments:
551-
*
552-
* * @uchar: output uchar pixels
553-
*
554550
* Run [method@Image.linear] with a single constant.
555551
*
552+
* ::: tip "Optional arguments"
553+
* * @uchar: output uchar pixels
554+
*
556555
* ::: seealso
557556
* [method@Image.linear].
558557
*

libvips/arithmetic/max.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -510,14 +510,6 @@ vips_max_init(VipsMax *max)
510510
* @out: (out): output pixel maximum
511511
* @...: %NULL-terminated list of optional named arguments
512512
*
513-
* ::: note "Optional arguments"
514-
* * @x: horizontal position of maximum
515-
* * @y: vertical position of maximum
516-
* * @size: number of maxima to find
517-
* * @out_array: return array of maximum values
518-
* * @x_array: corresponding horizontal positions
519-
* * @y_array: corresponding vertical positions
520-
*
521513
* This operation finds the maximum value in an image.
522514
*
523515
* By default it finds the single largest value. If @size is set >1, it will
@@ -539,6 +531,14 @@ vips_max_init(VipsMax *max)
539531
* If there are more than @size maxima, the maxima returned will be a random
540532
* selection of the maxima in the image.
541533
*
534+
* ::: tip "Optional arguments"
535+
* * @x: horizontal position of maximum
536+
* * @y: vertical position of maximum
537+
* * @size: number of maxima to find
538+
* * @out_array: return array of maximum values
539+
* * @x_array: corresponding horizontal positions
540+
* * @y_array: corresponding vertical positions
541+
*
542542
* ::: seealso
543543
* [method@Image.min], [method@Image.stats].
544544
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy