Skip to main content

rs_vips/
ops.rs

1// (c) Copyright 2019-2025 OLX
2// (c) Copyright 2025 mrdkprj
3#![allow(clippy::too_many_arguments)]
4#![allow(clippy::upper_case_acronyms)]
5use crate::enums::*;
6use crate::error::*;
7use crate::utils;
8use crate::voption::{call, Setter, VOption};
9use crate::Result;
10use crate::VipsImage;
11use crate::VipsSource;
12use crate::VipsTarget;
13use std::ptr::null_mut;
14
15impl VipsImage {
16    /// VipsCMC2LCh (CMC2LCh), transform LCh to CMC
17    /// returns `VipsImage` - Output image
18    pub fn CMC2LCh(&self) -> Result<VipsImage> {
19        let mut out_out = VipsImage::from(null_mut());
20        let vips_op_response = call(
21            "CMC2LCh",
22            VOption::new()
23                .set("in", self)
24                .set(
25                    "out",
26                    &mut out_out,
27                ),
28        )?;
29        utils::result(
30            vips_op_response,
31            out_out,
32            Error::OperationError("Cmc2LCh (vips_CMC2LCh) failed".to_string()),
33        )
34    }
35
36    /// VipsCMYK2XYZ (CMYK2XYZ), transform CMYK to XYZ
37    /// returns `VipsImage` - Output image
38    pub fn CMYK2XYZ(&self) -> Result<VipsImage> {
39        let mut out_out = VipsImage::from(null_mut());
40        let vips_op_response = call(
41            "CMYK2XYZ",
42            VOption::new()
43                .set("in", self)
44                .set(
45                    "out",
46                    &mut out_out,
47                ),
48        )?;
49        utils::result(
50            vips_op_response,
51            out_out,
52            Error::OperationError("Cmyk2Xyz (vips_CMYK2XYZ) failed".to_string()),
53        )
54    }
55
56    /// VipsHSV2sRGB (HSV2sRGB), transform HSV to sRGB
57    /// returns `VipsImage` - Output image
58    pub fn HSV2sRGB(&self) -> Result<VipsImage> {
59        let mut out_out = VipsImage::from(null_mut());
60        let vips_op_response = call(
61            "HSV2sRGB",
62            VOption::new()
63                .set("in", self)
64                .set(
65                    "out",
66                    &mut out_out,
67                ),
68        )?;
69        utils::result(
70            vips_op_response,
71            out_out,
72            Error::OperationError("Hsv2SRgb (vips_HSV2sRGB) failed".to_string()),
73        )
74    }
75
76    /// VipsLCh2CMC (LCh2CMC), transform LCh to CMC
77    /// returns `VipsImage` - Output image
78    pub fn LCh2CMC(&self) -> Result<VipsImage> {
79        let mut out_out = VipsImage::from(null_mut());
80        let vips_op_response = call(
81            "LCh2CMC",
82            VOption::new()
83                .set("in", self)
84                .set(
85                    "out",
86                    &mut out_out,
87                ),
88        )?;
89        utils::result(
90            vips_op_response,
91            out_out,
92            Error::OperationError("LCh2Cmc (vips_LCh2CMC) failed".to_string()),
93        )
94    }
95
96    /// VipsLCh2Lab (LCh2Lab), transform LCh to Lab
97    /// returns `VipsImage` - Output image
98    pub fn LCh2Lab(&self) -> Result<VipsImage> {
99        let mut out_out = VipsImage::from(null_mut());
100        let vips_op_response = call(
101            "LCh2Lab",
102            VOption::new()
103                .set("in", self)
104                .set(
105                    "out",
106                    &mut out_out,
107                ),
108        )?;
109        utils::result(
110            vips_op_response,
111            out_out,
112            Error::OperationError("LCh2Lab (vips_LCh2Lab) failed".to_string()),
113        )
114    }
115
116    /// VipsLab2LCh (Lab2LCh), transform Lab to LCh
117    /// returns `VipsImage` - Output image
118    pub fn Lab2LCh(&self) -> Result<VipsImage> {
119        let mut out_out = VipsImage::from(null_mut());
120        let vips_op_response = call(
121            "Lab2LCh",
122            VOption::new()
123                .set("in", self)
124                .set(
125                    "out",
126                    &mut out_out,
127                ),
128        )?;
129        utils::result(
130            vips_op_response,
131            out_out,
132            Error::OperationError("Lab2LCh (vips_Lab2LCh) failed".to_string()),
133        )
134    }
135
136    /// VipsLab2LabQ (Lab2LabQ), transform float Lab to LabQ coding
137    /// returns `VipsImage` - Output image
138    pub fn Lab2LabQ(&self) -> Result<VipsImage> {
139        let mut out_out = VipsImage::from(null_mut());
140        let vips_op_response = call(
141            "Lab2LabQ",
142            VOption::new()
143                .set("in", self)
144                .set(
145                    "out",
146                    &mut out_out,
147                ),
148        )?;
149        utils::result(
150            vips_op_response,
151            out_out,
152            Error::OperationError("Lab2LabQ (vips_Lab2LabQ) failed".to_string()),
153        )
154    }
155
156    /// VipsLab2LabS (Lab2LabS), transform float Lab to signed short
157    /// returns `VipsImage` - Output image
158    pub fn Lab2LabS(&self) -> Result<VipsImage> {
159        let mut out_out = VipsImage::from(null_mut());
160        let vips_op_response = call(
161            "Lab2LabS",
162            VOption::new()
163                .set("in", self)
164                .set(
165                    "out",
166                    &mut out_out,
167                ),
168        )?;
169        utils::result(
170            vips_op_response,
171            out_out,
172            Error::OperationError("Lab2LabSs (vips_Lab2LabS) failed".to_string()),
173        )
174    }
175
176    /// VipsLab2XYZ (Lab2XYZ), transform CIELAB to XYZ
177    /// returns `VipsImage` - Output image
178    pub fn Lab2XYZ(&self) -> Result<VipsImage> {
179        let mut out_out = VipsImage::from(null_mut());
180        let vips_op_response = call(
181            "Lab2XYZ",
182            VOption::new()
183                .set("in", self)
184                .set(
185                    "out",
186                    &mut out_out,
187                ),
188        )?;
189        utils::result(
190            vips_op_response,
191            out_out,
192            Error::OperationError("Lab2Xyz (vips_Lab2XYZ) failed".to_string()),
193        )
194    }
195
196    /// VipsLab2XYZ (Lab2XYZ), transform CIELAB to XYZ
197    /// returns `VipsImage` - Output image
198    ///
199    /// <ins>Optional arguments</ins>
200    ///
201    /// temp: `&[f64]` -> Color temperature
202    pub fn Lab2XYZ_with_opts(&self, option: VOption) -> Result<VipsImage> {
203        let mut out_out = VipsImage::from(null_mut());
204        let vips_op_response = call(
205            "Lab2XYZ",
206            option
207                .set("in", self)
208                .set(
209                    "out",
210                    &mut out_out,
211                ),
212        )?;
213        utils::result(
214            vips_op_response,
215            out_out,
216            Error::OperationError("Lab2Xyz (vips_Lab2XYZ) failed".to_string()),
217        )
218    }
219
220    /// VipsLabQ2Lab (LabQ2Lab), unpack a LabQ image to float Lab
221    /// returns `VipsImage` - Output image
222    pub fn LabQ2Lab(&self) -> Result<VipsImage> {
223        let mut out_out = VipsImage::from(null_mut());
224        let vips_op_response = call(
225            "LabQ2Lab",
226            VOption::new()
227                .set("in", self)
228                .set(
229                    "out",
230                    &mut out_out,
231                ),
232        )?;
233        utils::result(
234            vips_op_response,
235            out_out,
236            Error::OperationError("LabQ2Lab (vips_LabQ2Lab) failed".to_string()),
237        )
238    }
239
240    /// VipsLabQ2LabS (LabQ2LabS), unpack a LabQ image to short Lab
241    /// returns `VipsImage` - Output image
242    pub fn LabQ2LabS(&self) -> Result<VipsImage> {
243        let mut out_out = VipsImage::from(null_mut());
244        let vips_op_response = call(
245            "LabQ2LabS",
246            VOption::new()
247                .set("in", self)
248                .set(
249                    "out",
250                    &mut out_out,
251                ),
252        )?;
253        utils::result(
254            vips_op_response,
255            out_out,
256            Error::OperationError("LabQ2LabSs (vips_LabQ2LabS) failed".to_string()),
257        )
258    }
259
260    /// VipsLabQ2sRGB (LabQ2sRGB), convert a LabQ image to sRGB
261    /// returns `VipsImage` - Output image
262    pub fn LabQ2sRGB(&self) -> Result<VipsImage> {
263        let mut out_out = VipsImage::from(null_mut());
264        let vips_op_response = call(
265            "LabQ2sRGB",
266            VOption::new()
267                .set("in", self)
268                .set(
269                    "out",
270                    &mut out_out,
271                ),
272        )?;
273        utils::result(
274            vips_op_response,
275            out_out,
276            Error::OperationError("LabQ2SRgb (vips_LabQ2sRGB) failed".to_string()),
277        )
278    }
279
280    /// VipsLabS2Lab (LabS2Lab), transform signed short Lab to float
281    /// returns `VipsImage` - Output image
282    pub fn LabS2Lab(&self) -> Result<VipsImage> {
283        let mut out_out = VipsImage::from(null_mut());
284        let vips_op_response = call(
285            "LabS2Lab",
286            VOption::new()
287                .set("in", self)
288                .set(
289                    "out",
290                    &mut out_out,
291                ),
292        )?;
293        utils::result(
294            vips_op_response,
295            out_out,
296            Error::OperationError("LabS2Lab (vips_LabS2Lab) failed".to_string()),
297        )
298    }
299
300    /// VipsLabS2LabQ (LabS2LabQ), transform short Lab to LabQ coding
301    /// returns `VipsImage` - Output image
302    pub fn LabS2LabQ(&self) -> Result<VipsImage> {
303        let mut out_out = VipsImage::from(null_mut());
304        let vips_op_response = call(
305            "LabS2LabQ",
306            VOption::new()
307                .set("in", self)
308                .set(
309                    "out",
310                    &mut out_out,
311                ),
312        )?;
313        utils::result(
314            vips_op_response,
315            out_out,
316            Error::OperationError("LabS2LabQ (vips_LabS2LabQ) failed".to_string()),
317        )
318    }
319
320    /// VipsOklab2Oklch (Oklab2Oklch), transform Oklab to Oklch
321    /// returns `VipsImage` - Output image
322    pub fn Oklab2Oklch(&self) -> Result<VipsImage> {
323        let mut out_out = VipsImage::from(null_mut());
324        let vips_op_response = call(
325            "Oklab2Oklch",
326            VOption::new()
327                .set("in", self)
328                .set(
329                    "out",
330                    &mut out_out,
331                ),
332        )?;
333        utils::result(
334            vips_op_response,
335            out_out,
336            Error::OperationError("Oklab2Oklch (vips_Oklab2Oklch) failed".to_string()),
337        )
338    }
339
340    /// VipsOklab2XYZ (Oklab2XYZ), transform Oklab to XYZ
341    /// returns `VipsImage` - Output image
342    pub fn Oklab2XYZ(&self) -> Result<VipsImage> {
343        let mut out_out = VipsImage::from(null_mut());
344        let vips_op_response = call(
345            "Oklab2XYZ",
346            VOption::new()
347                .set("in", self)
348                .set(
349                    "out",
350                    &mut out_out,
351                ),
352        )?;
353        utils::result(
354            vips_op_response,
355            out_out,
356            Error::OperationError("Oklab2Xyz (vips_Oklab2XYZ) failed".to_string()),
357        )
358    }
359
360    /// VipsOklch2Oklab (Oklch2Oklab), transform Oklch to Oklab
361    /// returns `VipsImage` - Output image
362    pub fn Oklch2Oklab(&self) -> Result<VipsImage> {
363        let mut out_out = VipsImage::from(null_mut());
364        let vips_op_response = call(
365            "Oklch2Oklab",
366            VOption::new()
367                .set("in", self)
368                .set(
369                    "out",
370                    &mut out_out,
371                ),
372        )?;
373        utils::result(
374            vips_op_response,
375            out_out,
376            Error::OperationError("Oklch2Oklab (vips_Oklch2Oklab) failed".to_string()),
377        )
378    }
379
380    /// VipsXYZ2CMYK (XYZ2CMYK), transform XYZ to CMYK
381    /// returns `VipsImage` - Output image
382    pub fn XYZ2CMYK(&self) -> Result<VipsImage> {
383        let mut out_out = VipsImage::from(null_mut());
384        let vips_op_response = call(
385            "XYZ2CMYK",
386            VOption::new()
387                .set("in", self)
388                .set(
389                    "out",
390                    &mut out_out,
391                ),
392        )?;
393        utils::result(
394            vips_op_response,
395            out_out,
396            Error::OperationError("Xyz2Cmyk (vips_XYZ2CMYK) failed".to_string()),
397        )
398    }
399
400    /// VipsXYZ2Lab (XYZ2Lab), transform XYZ to Lab
401    /// returns `VipsImage` - Output image
402    pub fn XYZ2Lab(&self) -> Result<VipsImage> {
403        let mut out_out = VipsImage::from(null_mut());
404        let vips_op_response = call(
405            "XYZ2Lab",
406            VOption::new()
407                .set("in", self)
408                .set(
409                    "out",
410                    &mut out_out,
411                ),
412        )?;
413        utils::result(
414            vips_op_response,
415            out_out,
416            Error::OperationError("Xyz2Lab (vips_XYZ2Lab) failed".to_string()),
417        )
418    }
419
420    /// VipsXYZ2Lab (XYZ2Lab), transform XYZ to Lab
421    /// returns `VipsImage` - Output image
422    ///
423    /// <ins>Optional arguments</ins>
424    ///
425    /// temp: `&[f64]` -> Colour temperature
426    pub fn XYZ2Lab_with_opts(&self, option: VOption) -> Result<VipsImage> {
427        let mut out_out = VipsImage::from(null_mut());
428        let vips_op_response = call(
429            "XYZ2Lab",
430            option
431                .set("in", self)
432                .set(
433                    "out",
434                    &mut out_out,
435                ),
436        )?;
437        utils::result(
438            vips_op_response,
439            out_out,
440            Error::OperationError("Xyz2Lab (vips_XYZ2Lab) failed".to_string()),
441        )
442    }
443
444    /// VipsXYZ2Oklab (XYZ2Oklab), transform XYZ to Oklab
445    /// returns `VipsImage` - Output image
446    pub fn XYZ2Oklab(&self) -> Result<VipsImage> {
447        let mut out_out = VipsImage::from(null_mut());
448        let vips_op_response = call(
449            "XYZ2Oklab",
450            VOption::new()
451                .set("in", self)
452                .set(
453                    "out",
454                    &mut out_out,
455                ),
456        )?;
457        utils::result(
458            vips_op_response,
459            out_out,
460            Error::OperationError("Xyz2Oklab (vips_XYZ2Oklab) failed".to_string()),
461        )
462    }
463
464    /// VipsXYZ2Yxy (XYZ2Yxy), transform XYZ to Yxy
465    /// returns `VipsImage` - Output image
466    pub fn XYZ2Yxy(&self) -> Result<VipsImage> {
467        let mut out_out = VipsImage::from(null_mut());
468        let vips_op_response = call(
469            "XYZ2Yxy",
470            VOption::new()
471                .set("in", self)
472                .set(
473                    "out",
474                    &mut out_out,
475                ),
476        )?;
477        utils::result(
478            vips_op_response,
479            out_out,
480            Error::OperationError("Xyz2Yxy (vips_XYZ2Yxy) failed".to_string()),
481        )
482    }
483
484    /// VipsXYZ2scRGB (XYZ2scRGB), transform XYZ to scRGB
485    /// returns `VipsImage` - Output image
486    pub fn XYZ2scRGB(&self) -> Result<VipsImage> {
487        let mut out_out = VipsImage::from(null_mut());
488        let vips_op_response = call(
489            "XYZ2scRGB",
490            VOption::new()
491                .set("in", self)
492                .set(
493                    "out",
494                    &mut out_out,
495                ),
496        )?;
497        utils::result(
498            vips_op_response,
499            out_out,
500            Error::OperationError("Xyz2ScRgb (vips_XYZ2scRGB) failed".to_string()),
501        )
502    }
503
504    /// VipsYxy2XYZ (Yxy2XYZ), transform Yxy to XYZ
505    /// returns `VipsImage` - Output image
506    pub fn Yxy2XYZ(&self) -> Result<VipsImage> {
507        let mut out_out = VipsImage::from(null_mut());
508        let vips_op_response = call(
509            "Yxy2XYZ",
510            VOption::new()
511                .set("in", self)
512                .set(
513                    "out",
514                    &mut out_out,
515                ),
516        )?;
517        utils::result(
518            vips_op_response,
519            out_out,
520            Error::OperationError("Yxy2Xyz (vips_Yxy2XYZ) failed".to_string()),
521        )
522    }
523
524    /// VipsAbs (abs), absolute value of an image
525    /// returns `VipsImage` - Output image
526    pub fn abs(&self) -> Result<VipsImage> {
527        let mut out_out = VipsImage::from(null_mut());
528        let vips_op_response = call(
529            "abs",
530            VOption::new()
531                .set("in", self)
532                .set(
533                    "out",
534                    &mut out_out,
535                ),
536        )?;
537        utils::result(
538            vips_op_response,
539            out_out,
540            Error::OperationError("Abs (vips_abs) failed".to_string()),
541        )
542    }
543
544    /// VipsAdd (add), add two images
545    /// returns `VipsImage` - Output image
546    ///
547    /// right: `&VipsImage` -> Right-hand image argument
548    pub fn add(&self, right: &VipsImage) -> Result<VipsImage> {
549        let mut out_out = VipsImage::from(null_mut());
550        let vips_op_response = call(
551            "add",
552            VOption::new()
553                .set(
554                    "left",
555                    self,
556                )
557                .set(
558                    "right",
559                    right,
560                )
561                .set(
562                    "out",
563                    &mut out_out,
564                ),
565        )?;
566        utils::result(
567            vips_op_response,
568            out_out,
569            Error::OperationError("Add (vips_add) failed".to_string()),
570        )
571    }
572
573    /// VipsAddAlpha (addalpha), append an alpha channel
574    /// returns `VipsImage` - Output image
575    pub fn addalpha(&self) -> Result<VipsImage> {
576        let mut out_out = VipsImage::from(null_mut());
577        let vips_op_response = call(
578            "addalpha",
579            VOption::new()
580                .set("in", self)
581                .set(
582                    "out",
583                    &mut out_out,
584                ),
585        )?;
586        utils::result(
587            vips_op_response,
588            out_out,
589            Error::OperationError("Addalpha (vips_addalpha) failed".to_string()),
590        )
591    }
592
593    /// VipsAffine (affine), affine transform of an image
594    /// returns `VipsImage` - Output image
595    ///
596    /// matrix: `&[f64]` -> Transformation matrix
597    pub fn affine(&self, matrix: &[f64]) -> Result<VipsImage> {
598        let mut out_out = VipsImage::from(null_mut());
599        let vips_op_response = call(
600            "affine",
601            VOption::new()
602                .set("in", self)
603                .set(
604                    "out",
605                    &mut out_out,
606                )
607                .set(
608                    "matrix",
609                    matrix,
610                ),
611        )?;
612        utils::result(
613            vips_op_response,
614            out_out,
615            Error::OperationError("Affine (vips_affine) failed".to_string()),
616        )
617    }
618
619    /// VipsAffine (affine), affine transform of an image
620    /// returns `VipsImage` - Output image
621    ///
622    /// matrix: `&[f64]` -> Transformation matrix
623    ///
624    /// <ins>Optional arguments</ins>
625    ///
626    /// interpolate: `&VipsInterpolate` -> Interpolate pixels with this
627    ///
628    /// oarea: `&[i32]` -> Area of output to generate
629    ///
630    /// odx: `f64` -> Horizontal output displacement
631    ///
632    /// ody: `f64` -> Vertical output displacement
633    ///
634    /// idx: `f64` -> Horizontal input displacement
635    ///
636    /// idy: `f64` -> Vertical input displacement
637    ///
638    /// background: `&[f64]` -> Background value
639    ///
640    /// premultiplied: `bool` -> Images have premultiplied alpha
641    ///
642    /// extend: [`Extend`] -> How to generate the extra pixels
643    pub fn affine_with_opts(&self, matrix: &[f64], option: VOption) -> Result<VipsImage> {
644        let mut out_out = VipsImage::from(null_mut());
645        let vips_op_response = call(
646            "affine",
647            option
648                .set("in", self)
649                .set(
650                    "out",
651                    &mut out_out,
652                )
653                .set(
654                    "matrix",
655                    matrix,
656                ),
657        )?;
658        utils::result(
659            vips_op_response,
660            out_out,
661            Error::OperationError("Affine (vips_affine) failed".to_string()),
662        )
663    }
664
665    /// VipsForeignLoadAnalyze (analyzeload), load an Analyze6 image (.img, .hdr), priority=-50, untrusted, is_a, get_flags, get_flags_filename, header, load
666    /// returns `VipsImage` - Output image
667    ///
668    /// filename: `&str` -> Filename to load from
669    pub fn analyzeload(filename: &str) -> Result<VipsImage> {
670        let mut out_out = VipsImage::from(null_mut());
671        let vips_op_response = call(
672            "analyzeload",
673            VOption::new()
674                .set(
675                    "filename",
676                    filename,
677                )
678                .set(
679                    "out",
680                    &mut out_out,
681                ),
682        )?;
683        utils::result(
684            vips_op_response,
685            out_out,
686            Error::OperationError("Analyzeload (vips_analyzeload) failed".to_string()),
687        )
688    }
689
690    /// VipsForeignLoadAnalyze (analyzeload), load an Analyze6 image (.img, .hdr), priority=-50, untrusted, is_a, get_flags, get_flags_filename, header, load
691    /// returns `VipsImage` - Output image
692    ///
693    /// filename: `&str` -> Filename to load from
694    ///
695    /// <ins>Optional arguments</ins>
696    ///
697    /// flags: [`ForeignFlags`] -> Flags for this file
698    ///
699    /// memory: `bool` -> Force open via memory
700    ///
701    /// access: [`Access`] -> Required access pattern for this file
702    ///
703    /// fail_on: [`FailOn`] -> Error level to fail on
704    ///
705    /// revalidate: `bool` -> Don't use a cached result for this operation
706    pub fn analyzeload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
707        let mut out_out = VipsImage::from(null_mut());
708        let vips_op_response = call(
709            "analyzeload",
710            option
711                .set(
712                    "filename",
713                    filename,
714                )
715                .set(
716                    "out",
717                    &mut out_out,
718                ),
719        )?;
720        utils::result(
721            vips_op_response,
722            out_out,
723            Error::OperationError("Analyzeload (vips_analyzeload) failed".to_string()),
724        )
725    }
726
727    /// VipsArrayjoin (arrayjoin), join an array of images
728    /// returns `VipsImage` - Output image
729    ///
730    /// inp: `&[VipsImage]` -> Array of input images
731    pub fn arrayjoin(inp: &[VipsImage]) -> Result<VipsImage> {
732        let mut out_out = VipsImage::from(null_mut());
733        let vips_op_response = call(
734            "arrayjoin",
735            VOption::new()
736                .set("in", inp)
737                .set(
738                    "out",
739                    &mut out_out,
740                ),
741        )?;
742        utils::result(
743            vips_op_response,
744            out_out,
745            Error::OperationError("Arrayjoin (vips_arrayjoin) failed".to_string()),
746        )
747    }
748
749    /// VipsArrayjoin (arrayjoin), join an array of images
750    /// returns `VipsImage` - Output image
751    ///
752    /// inp: `&[VipsImage]` -> Array of input images
753    ///
754    /// <ins>Optional arguments</ins>
755    ///
756    /// across: `i32` -> Number of images across grid
757    ///
758    /// shim: `i32` -> Pixels between images
759    ///
760    /// background: `&[f64]` -> Colour for new pixels
761    ///
762    /// halign: [`Align`] -> Align on the left, centre or right
763    ///
764    /// valign: [`Align`] -> Align on the top, centre or bottom
765    ///
766    /// hspacing: `i32` -> Horizontal spacing between images
767    ///
768    /// vspacing: `i32` -> Vertical spacing between images
769    pub fn arrayjoin_with_opts(inp: &[VipsImage], option: VOption) -> Result<VipsImage> {
770        let mut out_out = VipsImage::from(null_mut());
771        let vips_op_response = call(
772            "arrayjoin",
773            option
774                .set("in", inp)
775                .set(
776                    "out",
777                    &mut out_out,
778                ),
779        )?;
780        utils::result(
781            vips_op_response,
782            out_out,
783            Error::OperationError("Arrayjoin (vips_arrayjoin) failed".to_string()),
784        )
785    }
786
787    /// VipsAutorot (autorot), autorotate image by exif tag
788    /// returns `VipsImage` - Output image
789    pub fn autorot(&self) -> Result<VipsImage> {
790        let mut out_out = VipsImage::from(null_mut());
791        let vips_op_response = call(
792            "autorot",
793            VOption::new()
794                .set("in", self)
795                .set(
796                    "out",
797                    &mut out_out,
798                ),
799        )?;
800        utils::result(
801            vips_op_response,
802            out_out,
803            Error::OperationError("Autorot (vips_autorot) failed".to_string()),
804        )
805    }
806
807    /// VipsAutorot (autorot), autorotate image by exif tag
808    /// returns `VipsImage` - Output image
809    ///
810    /// <ins>Optional arguments</ins>
811    ///
812    /// angle: [`Angle`] -> Angle image was rotated by
813    ///
814    /// flip: `&mut bool` -> Whether the image was flipped or not
815    pub fn autorot_with_opts(&self, option: VOption) -> Result<VipsImage> {
816        let mut out_out = VipsImage::from(null_mut());
817        let vips_op_response = call(
818            "autorot",
819            option
820                .set("in", self)
821                .set(
822                    "out",
823                    &mut out_out,
824                ),
825        )?;
826        utils::result(
827            vips_op_response,
828            out_out,
829            Error::OperationError("Autorot (vips_autorot) failed".to_string()),
830        )
831    }
832
833    /// VipsAvg (avg), find image average
834    /// returns `f64` - Output value
835    pub fn avg(&self) -> Result<f64> {
836        let mut out_out: f64 = 0.0;
837        let vips_op_response = call(
838            "avg",
839            VOption::new()
840                .set("in", self)
841                .set(
842                    "out",
843                    &mut out_out,
844                ),
845        )?;
846        utils::result(
847            vips_op_response,
848            out_out,
849            Error::OperationError("Avg (vips_avg) failed".to_string()),
850        )
851    }
852
853    /// VipsBandbool (bandbool), boolean operation across image bands
854    /// returns `VipsImage` - Output image
855    ///
856    /// boolean: `OperationBoolean` -> Boolean to perform
857    pub fn bandbool(&self, boolean: OperationBoolean) -> Result<VipsImage> {
858        let mut out_out = VipsImage::from(null_mut());
859        let vips_op_response = call(
860            "bandbool",
861            VOption::new()
862                .set("in", self)
863                .set(
864                    "out",
865                    &mut out_out,
866                )
867                .set(
868                    "boolean",
869                    boolean as i32,
870                ),
871        )?;
872        utils::result(
873            vips_op_response,
874            out_out,
875            Error::OperationError("Bandbool (vips_bandbool) failed".to_string()),
876        )
877    }
878
879    /// VipsBandfold (bandfold), fold up x axis into bands
880    /// returns `VipsImage` - Output image
881    pub fn bandfold(&self) -> Result<VipsImage> {
882        let mut out_out = VipsImage::from(null_mut());
883        let vips_op_response = call(
884            "bandfold",
885            VOption::new()
886                .set("in", self)
887                .set(
888                    "out",
889                    &mut out_out,
890                ),
891        )?;
892        utils::result(
893            vips_op_response,
894            out_out,
895            Error::OperationError("Bandfold (vips_bandfold) failed".to_string()),
896        )
897    }
898
899    /// VipsBandfold (bandfold), fold up x axis into bands
900    /// returns `VipsImage` - Output image
901    ///
902    /// <ins>Optional arguments</ins>
903    ///
904    /// factor: `i32` -> Fold by this factor
905    pub fn bandfold_with_opts(&self, option: VOption) -> Result<VipsImage> {
906        let mut out_out = VipsImage::from(null_mut());
907        let vips_op_response = call(
908            "bandfold",
909            option
910                .set("in", self)
911                .set(
912                    "out",
913                    &mut out_out,
914                ),
915        )?;
916        utils::result(
917            vips_op_response,
918            out_out,
919            Error::OperationError("Bandfold (vips_bandfold) failed".to_string()),
920        )
921    }
922
923    /// VipsBandjoin (bandjoin), bandwise join a set of images
924    /// returns `VipsImage` - Output image
925    ///
926    /// inp: `&[VipsImage]` -> Array of input images
927    pub fn bandjoin(inp: &[VipsImage]) -> Result<VipsImage> {
928        let mut out_out = VipsImage::from(null_mut());
929        let vips_op_response = call(
930            "bandjoin",
931            VOption::new()
932                .set("in", inp)
933                .set(
934                    "out",
935                    &mut out_out,
936                ),
937        )?;
938        utils::result(
939            vips_op_response,
940            out_out,
941            Error::OperationError("Bandjoin (vips_bandjoin) failed".to_string()),
942        )
943    }
944
945    /// VipsBandjoinConst (bandjoin_const), append a constant band to an image
946    /// returns `VipsImage` - Output image
947    ///
948    /// c: `&[f64]` -> Array of constants to add
949    pub fn bandjoin_const(&self, c: &[f64]) -> Result<VipsImage> {
950        let mut out_out = VipsImage::from(null_mut());
951        let vips_op_response = call(
952            "bandjoin_const",
953            VOption::new()
954                .set("in", self)
955                .set(
956                    "out",
957                    &mut out_out,
958                )
959                .set("c", c),
960        )?;
961        utils::result(
962            vips_op_response,
963            out_out,
964            Error::OperationError("BandjoinConst (vips_bandjoin_const) failed".to_string()),
965        )
966    }
967
968    /// VipsBandmean (bandmean), band-wise average
969    /// returns `VipsImage` - Output image
970    pub fn bandmean(&self) -> Result<VipsImage> {
971        let mut out_out = VipsImage::from(null_mut());
972        let vips_op_response = call(
973            "bandmean",
974            VOption::new()
975                .set("in", self)
976                .set(
977                    "out",
978                    &mut out_out,
979                ),
980        )?;
981        utils::result(
982            vips_op_response,
983            out_out,
984            Error::OperationError("Bandmean (vips_bandmean) failed".to_string()),
985        )
986    }
987
988    /// VipsBandrank (bandrank), band-wise rank of a set of images
989    /// returns `VipsImage` - Output image
990    ///
991    /// inp: `&[VipsImage]` -> Array of input images
992    pub fn bandrank(inp: &[VipsImage]) -> Result<VipsImage> {
993        let mut out_out = VipsImage::from(null_mut());
994        let vips_op_response = call(
995            "bandrank",
996            VOption::new()
997                .set("in", inp)
998                .set(
999                    "out",
1000                    &mut out_out,
1001                ),
1002        )?;
1003        utils::result(
1004            vips_op_response,
1005            out_out,
1006            Error::OperationError("Bandrank (vips_bandrank) failed".to_string()),
1007        )
1008    }
1009
1010    /// VipsBandrank (bandrank), band-wise rank of a set of images
1011    /// returns `VipsImage` - Output image
1012    ///
1013    /// inp: `&[VipsImage]` -> Array of input images
1014    ///
1015    /// <ins>Optional arguments</ins>
1016    ///
1017    /// index: `i32` -> Select this band element from sorted list
1018    pub fn bandrank_with_opts(inp: &[VipsImage], option: VOption) -> Result<VipsImage> {
1019        let mut out_out = VipsImage::from(null_mut());
1020        let vips_op_response = call(
1021            "bandrank",
1022            option
1023                .set("in", inp)
1024                .set(
1025                    "out",
1026                    &mut out_out,
1027                ),
1028        )?;
1029        utils::result(
1030            vips_op_response,
1031            out_out,
1032            Error::OperationError("Bandrank (vips_bandrank) failed".to_string()),
1033        )
1034    }
1035
1036    /// VipsBandunfold (bandunfold), unfold image bands into x axis
1037    /// returns `VipsImage` - Output image
1038    pub fn bandunfold(&self) -> Result<VipsImage> {
1039        let mut out_out = VipsImage::from(null_mut());
1040        let vips_op_response = call(
1041            "bandunfold",
1042            VOption::new()
1043                .set("in", self)
1044                .set(
1045                    "out",
1046                    &mut out_out,
1047                ),
1048        )?;
1049        utils::result(
1050            vips_op_response,
1051            out_out,
1052            Error::OperationError("Bandunfold (vips_bandunfold) failed".to_string()),
1053        )
1054    }
1055
1056    /// VipsBandunfold (bandunfold), unfold image bands into x axis
1057    /// returns `VipsImage` - Output image
1058    ///
1059    /// <ins>Optional arguments</ins>
1060    ///
1061    /// factor: `i32` -> Unfold by this factor
1062    pub fn bandunfold_with_opts(&self, option: VOption) -> Result<VipsImage> {
1063        let mut out_out = VipsImage::from(null_mut());
1064        let vips_op_response = call(
1065            "bandunfold",
1066            option
1067                .set("in", self)
1068                .set(
1069                    "out",
1070                    &mut out_out,
1071                ),
1072        )?;
1073        utils::result(
1074            vips_op_response,
1075            out_out,
1076            Error::OperationError("Bandunfold (vips_bandunfold) failed".to_string()),
1077        )
1078    }
1079
1080    /// VipsBlack (black), make a black image
1081    /// returns `VipsImage` - Output image
1082    ///
1083    /// width: `i32` -> Image width in pixels
1084    ///
1085    /// height: `i32` -> Image height in pixels
1086    pub fn black(width: i32, height: i32) -> Result<VipsImage> {
1087        let mut out_out = VipsImage::from(null_mut());
1088        let vips_op_response = call(
1089            "black",
1090            VOption::new()
1091                .set(
1092                    "out",
1093                    &mut out_out,
1094                )
1095                .set(
1096                    "width",
1097                    width,
1098                )
1099                .set(
1100                    "height",
1101                    height,
1102                ),
1103        )?;
1104        utils::result(
1105            vips_op_response,
1106            out_out,
1107            Error::OperationError("Black (vips_black) failed".to_string()),
1108        )
1109    }
1110
1111    /// VipsBlack (black), make a black image
1112    /// returns `VipsImage` - Output image
1113    ///
1114    /// width: `i32` -> Image width in pixels
1115    ///
1116    /// height: `i32` -> Image height in pixels
1117    ///
1118    /// <ins>Optional arguments</ins>
1119    ///
1120    /// bands: `i32` -> Number of bands in image
1121    pub fn black_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
1122        let mut out_out = VipsImage::from(null_mut());
1123        let vips_op_response = call(
1124            "black",
1125            option
1126                .set(
1127                    "out",
1128                    &mut out_out,
1129                )
1130                .set(
1131                    "width",
1132                    width,
1133                )
1134                .set(
1135                    "height",
1136                    height,
1137                ),
1138        )?;
1139        utils::result(
1140            vips_op_response,
1141            out_out,
1142            Error::OperationError("Black (vips_black) failed".to_string()),
1143        )
1144    }
1145
1146    /// VipsBoolean (boolean), boolean operation on two images
1147    /// returns `VipsImage` - Output image
1148    ///
1149    /// right: `&VipsImage` -> Right-hand image argument
1150    ///
1151    /// boolean: `OperationBoolean` -> Boolean to perform
1152    pub fn boolean(&self, right: &VipsImage, boolean: OperationBoolean) -> Result<VipsImage> {
1153        let mut out_out = VipsImage::from(null_mut());
1154        let vips_op_response = call(
1155            "boolean",
1156            VOption::new()
1157                .set(
1158                    "left",
1159                    self,
1160                )
1161                .set(
1162                    "right",
1163                    right,
1164                )
1165                .set(
1166                    "out",
1167                    &mut out_out,
1168                )
1169                .set(
1170                    "boolean",
1171                    boolean as i32,
1172                ),
1173        )?;
1174        utils::result(
1175            vips_op_response,
1176            out_out,
1177            Error::OperationError("Boolean (vips_boolean) failed".to_string()),
1178        )
1179    }
1180
1181    /// VipsBooleanConst (boolean_const), boolean operations against a constant
1182    /// returns `VipsImage` - Output image
1183    ///
1184    /// boolean: `OperationBoolean` -> Boolean to perform
1185    ///
1186    /// c: `&[f64]` -> Array of constants
1187    pub fn boolean_const(&self, boolean: OperationBoolean, c: &[f64]) -> Result<VipsImage> {
1188        let mut out_out = VipsImage::from(null_mut());
1189        let vips_op_response = call(
1190            "boolean_const",
1191            VOption::new()
1192                .set("in", self)
1193                .set(
1194                    "out",
1195                    &mut out_out,
1196                )
1197                .set(
1198                    "boolean",
1199                    boolean as i32,
1200                )
1201                .set("c", c),
1202        )?;
1203        utils::result(
1204            vips_op_response,
1205            out_out,
1206            Error::OperationError("BooleanConst (vips_boolean_const) failed".to_string()),
1207        )
1208    }
1209
1210    /// VipsBuildlut (buildlut), build a look-up table
1211    /// returns `VipsImage` - Output image
1212    pub fn buildlut(&self) -> Result<VipsImage> {
1213        let mut out_out = VipsImage::from(null_mut());
1214        let vips_op_response = call(
1215            "buildlut",
1216            VOption::new()
1217                .set("in", self)
1218                .set(
1219                    "out",
1220                    &mut out_out,
1221                ),
1222        )?;
1223        utils::result(
1224            vips_op_response,
1225            out_out,
1226            Error::OperationError("Buildlut (vips_buildlut) failed".to_string()),
1227        )
1228    }
1229
1230    /// VipsByteswap (byteswap), byteswap an image
1231    /// returns `VipsImage` - Output image
1232    pub fn byteswap(&self) -> Result<VipsImage> {
1233        let mut out_out = VipsImage::from(null_mut());
1234        let vips_op_response = call(
1235            "byteswap",
1236            VOption::new()
1237                .set("in", self)
1238                .set(
1239                    "out",
1240                    &mut out_out,
1241                ),
1242        )?;
1243        utils::result(
1244            vips_op_response,
1245            out_out,
1246            Error::OperationError("Byteswap (vips_byteswap) failed".to_string()),
1247        )
1248    }
1249
1250    /// VipsCanny (canny), Canny edge detector
1251    /// returns `VipsImage` - Output image
1252    pub fn canny(&self) -> Result<VipsImage> {
1253        let mut out_out = VipsImage::from(null_mut());
1254        let vips_op_response = call(
1255            "canny",
1256            VOption::new()
1257                .set("in", self)
1258                .set(
1259                    "out",
1260                    &mut out_out,
1261                ),
1262        )?;
1263        utils::result(
1264            vips_op_response,
1265            out_out,
1266            Error::OperationError("Canny (vips_canny) failed".to_string()),
1267        )
1268    }
1269
1270    /// VipsCanny (canny), Canny edge detector
1271    /// returns `VipsImage` - Output image
1272    ///
1273    /// <ins>Optional arguments</ins>
1274    ///
1275    /// sigma: `f64` -> Sigma of Gaussian
1276    ///
1277    /// precision: [`Precision`] -> Convolve with this precision
1278    pub fn canny_with_opts(&self, option: VOption) -> Result<VipsImage> {
1279        let mut out_out = VipsImage::from(null_mut());
1280        let vips_op_response = call(
1281            "canny",
1282            option
1283                .set("in", self)
1284                .set(
1285                    "out",
1286                    &mut out_out,
1287                ),
1288        )?;
1289        utils::result(
1290            vips_op_response,
1291            out_out,
1292            Error::OperationError("Canny (vips_canny) failed".to_string()),
1293        )
1294    }
1295
1296    /// VipsCase (case), use pixel values to pick cases from an array of images
1297    /// returns `VipsImage` - Output image
1298    ///
1299    /// cases: `&[VipsImage]` -> Array of case images
1300    pub fn case(&self, cases: &[VipsImage]) -> Result<VipsImage> {
1301        let mut out_out = VipsImage::from(null_mut());
1302        let vips_op_response = call(
1303            "case",
1304            VOption::new()
1305                .set(
1306                    "index",
1307                    self,
1308                )
1309                .set(
1310                    "cases",
1311                    cases,
1312                )
1313                .set(
1314                    "out",
1315                    &mut out_out,
1316                ),
1317        )?;
1318        utils::result(
1319            vips_op_response,
1320            out_out,
1321            Error::OperationError("Case (vips_case) failed".to_string()),
1322        )
1323    }
1324
1325    /// VipsCast (cast), cast an image
1326    /// returns `VipsImage` - Output image
1327    ///
1328    /// format: `BandFormat` -> Format to cast to
1329    pub fn cast(&self, format: BandFormat) -> Result<VipsImage> {
1330        let mut out_out = VipsImage::from(null_mut());
1331        let vips_op_response = call(
1332            "cast",
1333            VOption::new()
1334                .set("in", self)
1335                .set(
1336                    "out",
1337                    &mut out_out,
1338                )
1339                .set(
1340                    "format",
1341                    format as i32,
1342                ),
1343        )?;
1344        utils::result(
1345            vips_op_response,
1346            out_out,
1347            Error::OperationError("Cast (vips_cast) failed".to_string()),
1348        )
1349    }
1350
1351    /// VipsCast (cast), cast an image
1352    /// returns `VipsImage` - Output image
1353    ///
1354    /// format: `BandFormat` -> Format to cast to
1355    ///
1356    /// <ins>Optional arguments</ins>
1357    ///
1358    /// shift: `bool` -> Shift integer values up and down
1359    pub fn cast_with_opts(&self, format: BandFormat, option: VOption) -> Result<VipsImage> {
1360        let mut out_out = VipsImage::from(null_mut());
1361        let vips_op_response = call(
1362            "cast",
1363            option
1364                .set("in", self)
1365                .set(
1366                    "out",
1367                    &mut out_out,
1368                )
1369                .set(
1370                    "format",
1371                    format as i32,
1372                ),
1373        )?;
1374        utils::result(
1375            vips_op_response,
1376            out_out,
1377            Error::OperationError("Cast (vips_cast) failed".to_string()),
1378        )
1379    }
1380
1381    /// VipsClamp (clamp), clamp values of an image
1382    /// returns `VipsImage` - Output image
1383    pub fn clamp(&self) -> Result<VipsImage> {
1384        let mut out_out = VipsImage::from(null_mut());
1385        let vips_op_response = call(
1386            "clamp",
1387            VOption::new()
1388                .set("in", self)
1389                .set(
1390                    "out",
1391                    &mut out_out,
1392                ),
1393        )?;
1394        utils::result(
1395            vips_op_response,
1396            out_out,
1397            Error::OperationError("Clamp (vips_clamp) failed".to_string()),
1398        )
1399    }
1400
1401    /// VipsClamp (clamp), clamp values of an image
1402    /// returns `VipsImage` - Output image
1403    ///
1404    /// <ins>Optional arguments</ins>
1405    ///
1406    /// min: `f64` -> Minimum value
1407    ///
1408    /// max: `f64` -> Maximum value
1409    pub fn clamp_with_opts(&self, option: VOption) -> Result<VipsImage> {
1410        let mut out_out = VipsImage::from(null_mut());
1411        let vips_op_response = call(
1412            "clamp",
1413            option
1414                .set("in", self)
1415                .set(
1416                    "out",
1417                    &mut out_out,
1418                ),
1419        )?;
1420        utils::result(
1421            vips_op_response,
1422            out_out,
1423            Error::OperationError("Clamp (vips_clamp) failed".to_string()),
1424        )
1425    }
1426
1427    /// VipsColourspace (colourspace), convert to a new colorspace
1428    /// returns `VipsImage` - Output image
1429    ///
1430    /// space: `Interpretation` -> Destination color space
1431    pub fn colourspace(&self, space: Interpretation) -> Result<VipsImage> {
1432        let mut out_out = VipsImage::from(null_mut());
1433        let vips_op_response = call(
1434            "colourspace",
1435            VOption::new()
1436                .set("in", self)
1437                .set(
1438                    "out",
1439                    &mut out_out,
1440                )
1441                .set(
1442                    "space",
1443                    space as i32,
1444                ),
1445        )?;
1446        utils::result(
1447            vips_op_response,
1448            out_out,
1449            Error::OperationError("Colourspace (vips_colourspace) failed".to_string()),
1450        )
1451    }
1452
1453    /// VipsColourspace (colourspace), convert to a new colorspace
1454    /// returns `VipsImage` - Output image
1455    ///
1456    /// space: `Interpretation` -> Destination color space
1457    ///
1458    /// <ins>Optional arguments</ins>
1459    ///
1460    /// source_space: [`Interpretation`] -> Source color space
1461    pub fn colourspace_with_opts(
1462        &self,
1463        space: Interpretation,
1464        option: VOption,
1465    ) -> Result<VipsImage> {
1466        let mut out_out = VipsImage::from(null_mut());
1467        let vips_op_response = call(
1468            "colourspace",
1469            option
1470                .set("in", self)
1471                .set(
1472                    "out",
1473                    &mut out_out,
1474                )
1475                .set(
1476                    "space",
1477                    space as i32,
1478                ),
1479        )?;
1480        utils::result(
1481            vips_op_response,
1482            out_out,
1483            Error::OperationError("Colourspace (vips_colourspace) failed".to_string()),
1484        )
1485    }
1486
1487    /// VipsCompass (compass), convolve with rotating mask
1488    /// returns `VipsImage` - Output image
1489    ///
1490    /// mask: `&VipsImage` -> Input matrix image
1491    pub fn compass(&self, mask: &VipsImage) -> Result<VipsImage> {
1492        let mut out_out = VipsImage::from(null_mut());
1493        let vips_op_response = call(
1494            "compass",
1495            VOption::new()
1496                .set("in", self)
1497                .set(
1498                    "out",
1499                    &mut out_out,
1500                )
1501                .set(
1502                    "mask",
1503                    mask,
1504                ),
1505        )?;
1506        utils::result(
1507            vips_op_response,
1508            out_out,
1509            Error::OperationError("Compass (vips_compass) failed".to_string()),
1510        )
1511    }
1512
1513    /// VipsCompass (compass), convolve with rotating mask
1514    /// returns `VipsImage` - Output image
1515    ///
1516    /// mask: `&VipsImage` -> Input matrix image
1517    ///
1518    /// <ins>Optional arguments</ins>
1519    ///
1520    /// times: `i32` -> Rotate and convolve this many times
1521    ///
1522    /// angle: [`Angle45`] -> Rotate mask by this much between convolutions
1523    ///
1524    /// combine: [`Combine`] -> Combine convolution results like this
1525    ///
1526    /// precision: [`Precision`] -> Convolve with this precision
1527    ///
1528    /// layers: `i32` -> Use this many layers in approximation
1529    ///
1530    /// cluster: `i32` -> Cluster lines closer than this in approximation
1531    pub fn compass_with_opts(&self, mask: &VipsImage, option: VOption) -> Result<VipsImage> {
1532        let mut out_out = VipsImage::from(null_mut());
1533        let vips_op_response = call(
1534            "compass",
1535            option
1536                .set("in", self)
1537                .set(
1538                    "out",
1539                    &mut out_out,
1540                )
1541                .set(
1542                    "mask",
1543                    mask,
1544                ),
1545        )?;
1546        utils::result(
1547            vips_op_response,
1548            out_out,
1549            Error::OperationError("Compass (vips_compass) failed".to_string()),
1550        )
1551    }
1552
1553    /// VipsComplex2 (complex2), complex binary operations on two images
1554    /// returns `VipsImage` - Output image
1555    ///
1556    /// right: `&VipsImage` -> Right-hand image argument
1557    ///
1558    /// cmplx: `OperationComplex2` -> Binary complex operation to perform
1559    pub fn complex2(&self, right: &VipsImage, cmplx: OperationComplex2) -> Result<VipsImage> {
1560        let mut out_out = VipsImage::from(null_mut());
1561        let vips_op_response = call(
1562            "complex2",
1563            VOption::new()
1564                .set(
1565                    "left",
1566                    self,
1567                )
1568                .set(
1569                    "right",
1570                    right,
1571                )
1572                .set(
1573                    "out",
1574                    &mut out_out,
1575                )
1576                .set(
1577                    "cmplx",
1578                    cmplx as i32,
1579                ),
1580        )?;
1581        utils::result(
1582            vips_op_response,
1583            out_out,
1584            Error::OperationError("Complex2 (vips_complex2) failed".to_string()),
1585        )
1586    }
1587
1588    /// VipsComplex (complex), perform a complex operation on an image
1589    /// returns `VipsImage` - Output image
1590    ///
1591    /// cmplx: `OperationComplex` -> Complex to perform
1592    pub fn complex(&self, cmplx: OperationComplex) -> Result<VipsImage> {
1593        let mut out_out = VipsImage::from(null_mut());
1594        let vips_op_response = call(
1595            "complex",
1596            VOption::new()
1597                .set("in", self)
1598                .set(
1599                    "out",
1600                    &mut out_out,
1601                )
1602                .set(
1603                    "cmplx",
1604                    cmplx as i32,
1605                ),
1606        )?;
1607        utils::result(
1608            vips_op_response,
1609            out_out,
1610            Error::OperationError("Complex (vips_complex) failed".to_string()),
1611        )
1612    }
1613
1614    /// VipsComplexform (complexform), form a complex image from two real images
1615    /// returns `VipsImage` - Output image
1616    ///
1617    /// right: `&VipsImage` -> Right-hand image argument
1618    pub fn complexform(&self, right: &VipsImage) -> Result<VipsImage> {
1619        let mut out_out = VipsImage::from(null_mut());
1620        let vips_op_response = call(
1621            "complexform",
1622            VOption::new()
1623                .set(
1624                    "left",
1625                    self,
1626                )
1627                .set(
1628                    "right",
1629                    right,
1630                )
1631                .set(
1632                    "out",
1633                    &mut out_out,
1634                ),
1635        )?;
1636        utils::result(
1637            vips_op_response,
1638            out_out,
1639            Error::OperationError("Complexform (vips_complexform) failed".to_string()),
1640        )
1641    }
1642
1643    /// VipsComplexget (complexget), get a component from a complex image
1644    /// returns `VipsImage` - Output image
1645    ///
1646    /// get: `OperationComplexget` -> Complex to perform
1647    pub fn complexget(&self, get: OperationComplexget) -> Result<VipsImage> {
1648        let mut out_out = VipsImage::from(null_mut());
1649        let vips_op_response = call(
1650            "complexget",
1651            VOption::new()
1652                .set("in", self)
1653                .set(
1654                    "out",
1655                    &mut out_out,
1656                )
1657                .set(
1658                    "get",
1659                    get as i32,
1660                ),
1661        )?;
1662        utils::result(
1663            vips_op_response,
1664            out_out,
1665            Error::OperationError("Complexget (vips_complexget) failed".to_string()),
1666        )
1667    }
1668
1669    /// VipsComposite2 (composite2), blend a pair of images with a blend mode
1670    /// returns `VipsImage` - Output image
1671    ///
1672    /// overlay: `&VipsImage` -> Overlay image
1673    ///
1674    /// mode: `BlendMode` -> VipsBlendMode to join with
1675    pub fn composite2(&self, overlay: &VipsImage, mode: BlendMode) -> Result<VipsImage> {
1676        let mut out_out = VipsImage::from(null_mut());
1677        let vips_op_response = call(
1678            "composite2",
1679            VOption::new()
1680                .set(
1681                    "base",
1682                    self,
1683                )
1684                .set(
1685                    "overlay",
1686                    overlay,
1687                )
1688                .set(
1689                    "out",
1690                    &mut out_out,
1691                )
1692                .set(
1693                    "mode",
1694                    mode as i32,
1695                ),
1696        )?;
1697        utils::result(
1698            vips_op_response,
1699            out_out,
1700            Error::OperationError("Composite2 (vips_composite2) failed".to_string()),
1701        )
1702    }
1703
1704    /// VipsComposite2 (composite2), blend a pair of images with a blend mode
1705    /// returns `VipsImage` - Output image
1706    ///
1707    /// overlay: `&VipsImage` -> Overlay image
1708    ///
1709    /// mode: `BlendMode` -> VipsBlendMode to join with
1710    ///
1711    /// <ins>Optional arguments</ins>
1712    ///
1713    /// x: `i32` -> x position of overlay
1714    ///
1715    /// y: `i32` -> y position of overlay
1716    ///
1717    /// compositing_space: [`Interpretation`] -> Composite images in this colour space
1718    ///
1719    /// premultiplied: `bool` -> Images have premultiplied alpha
1720    pub fn composite2_with_opts(
1721        &self,
1722        overlay: &VipsImage,
1723        mode: BlendMode,
1724        option: VOption,
1725    ) -> Result<VipsImage> {
1726        let mut out_out = VipsImage::from(null_mut());
1727        let vips_op_response = call(
1728            "composite2",
1729            option
1730                .set(
1731                    "base",
1732                    self,
1733                )
1734                .set(
1735                    "overlay",
1736                    overlay,
1737                )
1738                .set(
1739                    "out",
1740                    &mut out_out,
1741                )
1742                .set(
1743                    "mode",
1744                    mode as i32,
1745                ),
1746        )?;
1747        utils::result(
1748            vips_op_response,
1749            out_out,
1750            Error::OperationError("Composite2 (vips_composite2) failed".to_string()),
1751        )
1752    }
1753
1754    /// VipsComposite (composite), blend an array of images with an array of blend modes
1755    /// returns `VipsImage` - Output image
1756    ///
1757    /// inp: `&[VipsImage]` -> Array of input images
1758    ///
1759    /// mode: `&[i32]` -> Array of VipsBlendMode to join with
1760    pub fn composite(inp: &[VipsImage], mode: &[i32]) -> Result<VipsImage> {
1761        let mut out_out = VipsImage::from(null_mut());
1762        let vips_op_response = call(
1763            "composite",
1764            VOption::new()
1765                .set("in", inp)
1766                .set(
1767                    "out",
1768                    &mut out_out,
1769                )
1770                .set(
1771                    "mode",
1772                    mode,
1773                ),
1774        )?;
1775        utils::result(
1776            vips_op_response,
1777            out_out,
1778            Error::OperationError("Composite (vips_composite) failed".to_string()),
1779        )
1780    }
1781
1782    /// VipsComposite (composite), blend an array of images with an array of blend modes
1783    /// returns `VipsImage` - Output image
1784    ///
1785    /// inp: `&[VipsImage]` -> Array of input images
1786    ///
1787    /// mode: `&[i32]` -> Array of VipsBlendMode to join with
1788    ///
1789    /// <ins>Optional arguments</ins>
1790    ///
1791    /// x: `&[i32]` -> Array of x coordinates to join at
1792    ///
1793    /// y: `&[i32]` -> Array of y coordinates to join at
1794    ///
1795    /// compositing_space: [`Interpretation`] -> Composite images in this colour space
1796    ///
1797    /// premultiplied: `bool` -> Images have premultiplied alpha
1798    pub fn composite_with_opts(
1799        inp: &[VipsImage],
1800        mode: &[i32],
1801        option: VOption,
1802    ) -> Result<VipsImage> {
1803        let mut out_out = VipsImage::from(null_mut());
1804        let vips_op_response = call(
1805            "composite",
1806            option
1807                .set("in", inp)
1808                .set(
1809                    "out",
1810                    &mut out_out,
1811                )
1812                .set(
1813                    "mode",
1814                    mode,
1815                ),
1816        )?;
1817        utils::result(
1818            vips_op_response,
1819            out_out,
1820            Error::OperationError("Composite (vips_composite) failed".to_string()),
1821        )
1822    }
1823
1824    /// VipsConv (conv), convolution operation
1825    /// returns `VipsImage` - Output image
1826    ///
1827    /// mask: `&VipsImage` -> Input matrix image
1828    pub fn conv(&self, mask: &VipsImage) -> Result<VipsImage> {
1829        let mut out_out = VipsImage::from(null_mut());
1830        let vips_op_response = call(
1831            "conv",
1832            VOption::new()
1833                .set("in", self)
1834                .set(
1835                    "out",
1836                    &mut out_out,
1837                )
1838                .set(
1839                    "mask",
1840                    mask,
1841                ),
1842        )?;
1843        utils::result(
1844            vips_op_response,
1845            out_out,
1846            Error::OperationError("Conv (vips_conv) failed".to_string()),
1847        )
1848    }
1849
1850    /// VipsConv (conv), convolution operation
1851    /// returns `VipsImage` - Output image
1852    ///
1853    /// mask: `&VipsImage` -> Input matrix image
1854    ///
1855    /// <ins>Optional arguments</ins>
1856    ///
1857    /// precision: [`Precision`] -> Convolve with this precision
1858    ///
1859    /// layers: `i32` -> Use this many layers in approximation
1860    ///
1861    /// cluster: `i32` -> Cluster lines closer than this in approximation
1862    pub fn conv_with_opts(&self, mask: &VipsImage, option: VOption) -> Result<VipsImage> {
1863        let mut out_out = VipsImage::from(null_mut());
1864        let vips_op_response = call(
1865            "conv",
1866            option
1867                .set("in", self)
1868                .set(
1869                    "out",
1870                    &mut out_out,
1871                )
1872                .set(
1873                    "mask",
1874                    mask,
1875                ),
1876        )?;
1877        utils::result(
1878            vips_op_response,
1879            out_out,
1880            Error::OperationError("Conv (vips_conv) failed".to_string()),
1881        )
1882    }
1883
1884    /// VipsConva (conva), approximate integer convolution
1885    /// returns `VipsImage` - Output image
1886    ///
1887    /// mask: `&VipsImage` -> Input matrix image
1888    pub fn conva(&self, mask: &VipsImage) -> Result<VipsImage> {
1889        let mut out_out = VipsImage::from(null_mut());
1890        let vips_op_response = call(
1891            "conva",
1892            VOption::new()
1893                .set("in", self)
1894                .set(
1895                    "out",
1896                    &mut out_out,
1897                )
1898                .set(
1899                    "mask",
1900                    mask,
1901                ),
1902        )?;
1903        utils::result(
1904            vips_op_response,
1905            out_out,
1906            Error::OperationError("Conva (vips_conva) failed".to_string()),
1907        )
1908    }
1909
1910    /// VipsConva (conva), approximate integer convolution
1911    /// returns `VipsImage` - Output image
1912    ///
1913    /// mask: `&VipsImage` -> Input matrix image
1914    ///
1915    /// <ins>Optional arguments</ins>
1916    ///
1917    /// layers: `i32` -> Use this many layers in approximation
1918    ///
1919    /// cluster: `i32` -> Cluster lines closer than this in approximation
1920    pub fn conva_with_opts(&self, mask: &VipsImage, option: VOption) -> Result<VipsImage> {
1921        let mut out_out = VipsImage::from(null_mut());
1922        let vips_op_response = call(
1923            "conva",
1924            option
1925                .set("in", self)
1926                .set(
1927                    "out",
1928                    &mut out_out,
1929                )
1930                .set(
1931                    "mask",
1932                    mask,
1933                ),
1934        )?;
1935        utils::result(
1936            vips_op_response,
1937            out_out,
1938            Error::OperationError("Conva (vips_conva) failed".to_string()),
1939        )
1940    }
1941
1942    /// VipsConvasep (convasep), approximate separable integer convolution
1943    /// returns `VipsImage` - Output image
1944    ///
1945    /// mask: `&VipsImage` -> Input matrix image
1946    pub fn convasep(&self, mask: &VipsImage) -> Result<VipsImage> {
1947        let mut out_out = VipsImage::from(null_mut());
1948        let vips_op_response = call(
1949            "convasep",
1950            VOption::new()
1951                .set("in", self)
1952                .set(
1953                    "out",
1954                    &mut out_out,
1955                )
1956                .set(
1957                    "mask",
1958                    mask,
1959                ),
1960        )?;
1961        utils::result(
1962            vips_op_response,
1963            out_out,
1964            Error::OperationError("Convasep (vips_convasep) failed".to_string()),
1965        )
1966    }
1967
1968    /// VipsConvasep (convasep), approximate separable integer convolution
1969    /// returns `VipsImage` - Output image
1970    ///
1971    /// mask: `&VipsImage` -> Input matrix image
1972    ///
1973    /// <ins>Optional arguments</ins>
1974    ///
1975    /// layers: `i32` -> Use this many layers in approximation
1976    pub fn convasep_with_opts(&self, mask: &VipsImage, option: VOption) -> Result<VipsImage> {
1977        let mut out_out = VipsImage::from(null_mut());
1978        let vips_op_response = call(
1979            "convasep",
1980            option
1981                .set("in", self)
1982                .set(
1983                    "out",
1984                    &mut out_out,
1985                )
1986                .set(
1987                    "mask",
1988                    mask,
1989                ),
1990        )?;
1991        utils::result(
1992            vips_op_response,
1993            out_out,
1994            Error::OperationError("Convasep (vips_convasep) failed".to_string()),
1995        )
1996    }
1997
1998    /// VipsConvf (convf), float convolution operation
1999    /// returns `VipsImage` - Output image
2000    ///
2001    /// mask: `&VipsImage` -> Input matrix image
2002    pub fn convf(&self, mask: &VipsImage) -> Result<VipsImage> {
2003        let mut out_out = VipsImage::from(null_mut());
2004        let vips_op_response = call(
2005            "convf",
2006            VOption::new()
2007                .set("in", self)
2008                .set(
2009                    "out",
2010                    &mut out_out,
2011                )
2012                .set(
2013                    "mask",
2014                    mask,
2015                ),
2016        )?;
2017        utils::result(
2018            vips_op_response,
2019            out_out,
2020            Error::OperationError("Convf (vips_convf) failed".to_string()),
2021        )
2022    }
2023
2024    /// VipsConvi (convi), int convolution operation
2025    /// returns `VipsImage` - Output image
2026    ///
2027    /// mask: `&VipsImage` -> Input matrix image
2028    pub fn convi(&self, mask: &VipsImage) -> Result<VipsImage> {
2029        let mut out_out = VipsImage::from(null_mut());
2030        let vips_op_response = call(
2031            "convi",
2032            VOption::new()
2033                .set("in", self)
2034                .set(
2035                    "out",
2036                    &mut out_out,
2037                )
2038                .set(
2039                    "mask",
2040                    mask,
2041                ),
2042        )?;
2043        utils::result(
2044            vips_op_response,
2045            out_out,
2046            Error::OperationError("Convi (vips_convi) failed".to_string()),
2047        )
2048    }
2049
2050    /// VipsConvsep (convsep), separable convolution operation
2051    /// returns `VipsImage` - Output image
2052    ///
2053    /// mask: `&VipsImage` -> Input matrix image
2054    pub fn convsep(&self, mask: &VipsImage) -> Result<VipsImage> {
2055        let mut out_out = VipsImage::from(null_mut());
2056        let vips_op_response = call(
2057            "convsep",
2058            VOption::new()
2059                .set("in", self)
2060                .set(
2061                    "out",
2062                    &mut out_out,
2063                )
2064                .set(
2065                    "mask",
2066                    mask,
2067                ),
2068        )?;
2069        utils::result(
2070            vips_op_response,
2071            out_out,
2072            Error::OperationError("Convsep (vips_convsep) failed".to_string()),
2073        )
2074    }
2075
2076    /// VipsConvsep (convsep), separable convolution operation
2077    /// returns `VipsImage` - Output image
2078    ///
2079    /// mask: `&VipsImage` -> Input matrix image
2080    ///
2081    /// <ins>Optional arguments</ins>
2082    ///
2083    /// precision: [`Precision`] -> Convolve with this precision
2084    ///
2085    /// layers: `i32` -> Use this many layers in approximation
2086    ///
2087    /// cluster: `i32` -> Cluster lines closer than this in approximation
2088    pub fn convsep_with_opts(&self, mask: &VipsImage, option: VOption) -> Result<VipsImage> {
2089        let mut out_out = VipsImage::from(null_mut());
2090        let vips_op_response = call(
2091            "convsep",
2092            option
2093                .set("in", self)
2094                .set(
2095                    "out",
2096                    &mut out_out,
2097                )
2098                .set(
2099                    "mask",
2100                    mask,
2101                ),
2102        )?;
2103        utils::result(
2104            vips_op_response,
2105            out_out,
2106            Error::OperationError("Convsep (vips_convsep) failed".to_string()),
2107        )
2108    }
2109
2110    /// VipsCopy (copy), copy an image, nocache
2111    /// returns `VipsImage` - Output image
2112    pub fn copy(&self) -> Result<VipsImage> {
2113        let mut out_out = VipsImage::from(null_mut());
2114        let vips_op_response = call(
2115            "copy",
2116            VOption::new()
2117                .set("in", self)
2118                .set(
2119                    "out",
2120                    &mut out_out,
2121                ),
2122        )?;
2123        utils::result(
2124            vips_op_response,
2125            out_out,
2126            Error::OperationError("Copy (vips_copy) failed".to_string()),
2127        )
2128    }
2129
2130    /// VipsCopy (copy), copy an image, nocache
2131    /// returns `VipsImage` - Output image
2132    ///
2133    /// <ins>Optional arguments</ins>
2134    ///
2135    /// width: `i32` -> Image width in pixels
2136    ///
2137    /// height: `i32` -> Image height in pixels
2138    ///
2139    /// bands: `i32` -> Number of bands in image
2140    ///
2141    /// format: [`BandFormat`] -> Pixel format in image
2142    ///
2143    /// coding: [`Coding`] -> Pixel coding
2144    ///
2145    /// interpretation: [`Interpretation`] -> Pixel interpretation
2146    ///
2147    /// xres: `f64` -> Horizontal resolution in pixels/mm
2148    ///
2149    /// yres: `f64` -> Vertical resolution in pixels/mm
2150    ///
2151    /// xoffset: `i32` -> Horizontal offset of origin
2152    ///
2153    /// yoffset: `i32` -> Vertical offset of origin
2154    pub fn copy_with_opts(&self, option: VOption) -> Result<VipsImage> {
2155        let mut out_out = VipsImage::from(null_mut());
2156        let vips_op_response = call(
2157            "copy",
2158            option
2159                .set("in", self)
2160                .set(
2161                    "out",
2162                    &mut out_out,
2163                ),
2164        )?;
2165        utils::result(
2166            vips_op_response,
2167            out_out,
2168            Error::OperationError("Copy (vips_copy) failed".to_string()),
2169        )
2170    }
2171
2172    /// VipsCountlines (countlines), count lines in an image
2173    /// returns `f64` - Number of lines
2174    ///
2175    /// direction: `Direction` -> Countlines left-right or up-down
2176    pub fn countlines(&self, direction: Direction) -> Result<f64> {
2177        let mut nolines_out: f64 = 0.0;
2178        let vips_op_response = call(
2179            "countlines",
2180            VOption::new()
2181                .set("in", self)
2182                .set(
2183                    "nolines",
2184                    &mut nolines_out,
2185                )
2186                .set(
2187                    "direction",
2188                    direction as i32,
2189                ),
2190        )?;
2191        utils::result(
2192            vips_op_response,
2193            nolines_out,
2194            Error::OperationError("Countlines (vips_countlines) failed".to_string()),
2195        )
2196    }
2197
2198    /// VipsForeignLoadCsvFile (csvload), load csv (.csv), priority=0, untrusted, get_flags, get_flags_filename, header, load
2199    /// returns `VipsImage` - Output image
2200    ///
2201    /// filename: `&str` -> Filename to load from
2202    pub fn csvload(filename: &str) -> Result<VipsImage> {
2203        let mut out_out = VipsImage::from(null_mut());
2204        let vips_op_response = call(
2205            "csvload",
2206            VOption::new()
2207                .set(
2208                    "filename",
2209                    filename,
2210                )
2211                .set(
2212                    "out",
2213                    &mut out_out,
2214                ),
2215        )?;
2216        utils::result(
2217            vips_op_response,
2218            out_out,
2219            Error::OperationError("Csvload (vips_csvload) failed".to_string()),
2220        )
2221    }
2222
2223    /// VipsForeignLoadCsvFile (csvload), load csv (.csv), priority=0, untrusted, get_flags, get_flags_filename, header, load
2224    /// returns `VipsImage` - Output image
2225    ///
2226    /// filename: `&str` -> Filename to load from
2227    ///
2228    /// <ins>Optional arguments</ins>
2229    ///
2230    /// skip: `i32` -> Skip this many lines at the start of the file
2231    ///
2232    /// lines: `i32` -> Read this many lines from the file
2233    ///
2234    /// whitespace: `&str` -> Set of whitespace characters
2235    ///
2236    /// separator: `&str` -> Set of separator characters
2237    ///
2238    /// flags: [`ForeignFlags`] -> Flags for this file
2239    ///
2240    /// memory: `bool` -> Force open via memory
2241    ///
2242    /// access: [`Access`] -> Required access pattern for this file
2243    ///
2244    /// fail_on: [`FailOn`] -> Error level to fail on
2245    ///
2246    /// revalidate: `bool` -> Don't use a cached result for this operation
2247    pub fn csvload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
2248        let mut out_out = VipsImage::from(null_mut());
2249        let vips_op_response = call(
2250            "csvload",
2251            option
2252                .set(
2253                    "filename",
2254                    filename,
2255                )
2256                .set(
2257                    "out",
2258                    &mut out_out,
2259                ),
2260        )?;
2261        utils::result(
2262            vips_op_response,
2263            out_out,
2264            Error::OperationError("Csvload (vips_csvload) failed".to_string()),
2265        )
2266    }
2267
2268    /// VipsForeignLoadCsvSource (csvload_source), load csv, nocache, priority=0, untrusted, is_a_source, get_flags, header, load
2269    /// returns `VipsImage` - Output image
2270    ///
2271    /// source: `&VipsSource` -> Source to load from
2272    pub fn csvload_source(source: &VipsSource) -> Result<VipsImage> {
2273        let mut out_out = VipsImage::from(null_mut());
2274        let vips_op_response = call(
2275            "csvload_source",
2276            VOption::new()
2277                .set(
2278                    "source",
2279                    source,
2280                )
2281                .set(
2282                    "out",
2283                    &mut out_out,
2284                ),
2285        )?;
2286        utils::result(
2287            vips_op_response,
2288            out_out,
2289            Error::OperationError("CsvloadSource (vips_csvload_source) failed".to_string()),
2290        )
2291    }
2292
2293    /// VipsForeignLoadCsvSource (csvload_source), load csv, nocache, priority=0, untrusted, is_a_source, get_flags, header, load
2294    /// returns `VipsImage` - Output image
2295    ///
2296    /// source: `&VipsSource` -> Source to load from
2297    ///
2298    /// <ins>Optional arguments</ins>
2299    ///
2300    /// skip: `i32` -> Skip this many lines at the start of the file
2301    ///
2302    /// lines: `i32` -> Read this many lines from the file
2303    ///
2304    /// whitespace: `&str` -> Set of whitespace characters
2305    ///
2306    /// separator: `&str` -> Set of separator characters
2307    ///
2308    /// flags: [`ForeignFlags`] -> Flags for this file
2309    ///
2310    /// memory: `bool` -> Force open via memory
2311    ///
2312    /// access: [`Access`] -> Required access pattern for this file
2313    ///
2314    /// fail_on: [`FailOn`] -> Error level to fail on
2315    ///
2316    /// revalidate: `bool` -> Don't use a cached result for this operation
2317    pub fn csvload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
2318        let mut out_out = VipsImage::from(null_mut());
2319        let vips_op_response = call(
2320            "csvload_source",
2321            option
2322                .set(
2323                    "source",
2324                    source,
2325                )
2326                .set(
2327                    "out",
2328                    &mut out_out,
2329                ),
2330        )?;
2331        utils::result(
2332            vips_op_response,
2333            out_out,
2334            Error::OperationError("CsvloadSource (vips_csvload_source) failed".to_string()),
2335        )
2336    }
2337
2338    /// VipsForeignSaveCsvFile (csvsave), save image to csv, nocache (.csv), priority=0, mono
2339    ///
2340    /// filename: `&str` -> Filename to save to
2341    pub fn csvsave(&self, filename: &str) -> Result<()> {
2342        let vips_op_response = call(
2343            "csvsave",
2344            VOption::new()
2345                .set("in", self)
2346                .set(
2347                    "filename",
2348                    filename,
2349                ),
2350        )?;
2351        utils::result(
2352            vips_op_response,
2353            (),
2354            Error::OperationError("Csvsave (vips_csvsave) failed".to_string()),
2355        )
2356    }
2357
2358    /// VipsForeignSaveCsvFile (csvsave), save image to csv, nocache (.csv), priority=0, mono
2359    ///
2360    /// filename: `&str` -> Filename to save to
2361    ///
2362    /// <ins>Optional arguments</ins>
2363    ///
2364    /// separator: `&str` -> Separator characters
2365    ///
2366    /// keep: [`ForeignKeep`] -> Which metadata to retain
2367    ///
2368    /// background: `&[f64]` -> Background value
2369    ///
2370    /// page_height: `i32` -> Set page height for multipage save
2371    ///
2372    /// profile: `&str` -> Filename of ICC profile to embed
2373    pub fn csvsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
2374        let vips_op_response = call(
2375            "csvsave",
2376            option
2377                .set("in", self)
2378                .set(
2379                    "filename",
2380                    filename,
2381                ),
2382        )?;
2383        utils::result(
2384            vips_op_response,
2385            (),
2386            Error::OperationError("Csvsave (vips_csvsave) failed".to_string()),
2387        )
2388    }
2389
2390    /// VipsForeignSaveCsvTarget (csvsave_target), save image to csv, nocache (.csv), priority=0, mono
2391    ///
2392    /// target: `&VipsTarget` -> Target to save to
2393    pub fn csvsave_target(&self, target: &VipsTarget) -> Result<()> {
2394        let vips_op_response = call(
2395            "csvsave_target",
2396            VOption::new()
2397                .set("in", self)
2398                .set(
2399                    "target",
2400                    target,
2401                ),
2402        )?;
2403        utils::result(
2404            vips_op_response,
2405            (),
2406            Error::OperationError("CsvsaveTarget (vips_csvsave_target) failed".to_string()),
2407        )
2408    }
2409
2410    /// VipsForeignSaveCsvTarget (csvsave_target), save image to csv, nocache (.csv), priority=0, mono
2411    ///
2412    /// target: `&VipsTarget` -> Target to save to
2413    ///
2414    /// <ins>Optional arguments</ins>
2415    ///
2416    /// separator: `&str` -> Separator characters
2417    ///
2418    /// keep: [`ForeignKeep`] -> Which metadata to retain
2419    ///
2420    /// background: `&[f64]` -> Background value
2421    ///
2422    /// page_height: `i32` -> Set page height for multipage save
2423    ///
2424    /// profile: `&str` -> Filename of ICC profile to embed
2425    pub fn csvsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
2426        let vips_op_response = call(
2427            "csvsave_target",
2428            option
2429                .set("in", self)
2430                .set(
2431                    "target",
2432                    target,
2433                ),
2434        )?;
2435        utils::result(
2436            vips_op_response,
2437            (),
2438            Error::OperationError("CsvsaveTarget (vips_csvsave_target) failed".to_string()),
2439        )
2440    }
2441
2442    /// VipsdE00 (dE00), calculate dE00
2443    /// returns `VipsImage` - Output image
2444    ///
2445    /// right: `&VipsImage` -> Right-hand input image
2446    pub fn dE00(&self, right: &VipsImage) -> Result<VipsImage> {
2447        let mut out_out = VipsImage::from(null_mut());
2448        let vips_op_response = call(
2449            "dE00",
2450            VOption::new()
2451                .set(
2452                    "left",
2453                    self,
2454                )
2455                .set(
2456                    "right",
2457                    right,
2458                )
2459                .set(
2460                    "out",
2461                    &mut out_out,
2462                ),
2463        )?;
2464        utils::result(
2465            vips_op_response,
2466            out_out,
2467            Error::OperationError("DE00 (vips_dE00) failed".to_string()),
2468        )
2469    }
2470
2471    /// VipsdE76 (dE76), calculate dE76
2472    /// returns `VipsImage` - Output image
2473    ///
2474    /// right: `&VipsImage` -> Right-hand input image
2475    pub fn dE76(&self, right: &VipsImage) -> Result<VipsImage> {
2476        let mut out_out = VipsImage::from(null_mut());
2477        let vips_op_response = call(
2478            "dE76",
2479            VOption::new()
2480                .set(
2481                    "left",
2482                    self,
2483                )
2484                .set(
2485                    "right",
2486                    right,
2487                )
2488                .set(
2489                    "out",
2490                    &mut out_out,
2491                ),
2492        )?;
2493        utils::result(
2494            vips_op_response,
2495            out_out,
2496            Error::OperationError("DE76 (vips_dE76) failed".to_string()),
2497        )
2498    }
2499
2500    /// VipsdECMC (dECMC), calculate dECMC
2501    /// returns `VipsImage` - Output image
2502    ///
2503    /// right: `&VipsImage` -> Right-hand input image
2504    pub fn dECMC(&self, right: &VipsImage) -> Result<VipsImage> {
2505        let mut out_out = VipsImage::from(null_mut());
2506        let vips_op_response = call(
2507            "dECMC",
2508            VOption::new()
2509                .set(
2510                    "left",
2511                    self,
2512                )
2513                .set(
2514                    "right",
2515                    right,
2516                )
2517                .set(
2518                    "out",
2519                    &mut out_out,
2520                ),
2521        )?;
2522        utils::result(
2523            vips_op_response,
2524            out_out,
2525            Error::OperationError("DEcmc (vips_dECMC) failed".to_string()),
2526        )
2527    }
2528
2529    /// VipsForeignLoadDcRawFile (dcrawload), load RAW camera files (.3fr, .ari, .arw, .cap, .cin, .cr2, .cr3, .crw, .dcr, .dng, .erf, .fff, .iiq, .k25, .kdc, .mdc, .mos, .mrw, .nef, .nrw, .orf, .ori, .pef, .pxn, .raf, .raw, .rw2, .rwl, .sr2, .srf, .srw, .x3f), priority=100, untrusted, get_flags, get_flags_filename, header, load
2530    /// returns `VipsImage` - Output image
2531    ///
2532    /// filename: `&str` -> Filename to load from
2533    pub fn dcrawload(filename: &str) -> Result<VipsImage> {
2534        let mut out_out = VipsImage::from(null_mut());
2535        let vips_op_response = call(
2536            "dcrawload",
2537            VOption::new()
2538                .set(
2539                    "filename",
2540                    filename,
2541                )
2542                .set(
2543                    "out",
2544                    &mut out_out,
2545                ),
2546        )?;
2547        utils::result(
2548            vips_op_response,
2549            out_out,
2550            Error::OperationError("Dcrawload (vips_dcrawload) failed".to_string()),
2551        )
2552    }
2553
2554    /// VipsForeignLoadDcRawFile (dcrawload), load RAW camera files (.3fr, .ari, .arw, .cap, .cin, .cr2, .cr3, .crw, .dcr, .dng, .erf, .fff, .iiq, .k25, .kdc, .mdc, .mos, .mrw, .nef, .nrw, .orf, .ori, .pef, .pxn, .raf, .raw, .rw2, .rwl, .sr2, .srf, .srw, .x3f), priority=100, untrusted, get_flags, get_flags_filename, header, load
2555    /// returns `VipsImage` - Output image
2556    ///
2557    /// filename: `&str` -> Filename to load from
2558    ///
2559    /// <ins>Optional arguments</ins>
2560    ///
2561    /// bitdepth: `i32` -> Number of bits per pixel
2562    ///
2563    /// flags: [`ForeignFlags`] -> Flags for this file
2564    ///
2565    /// memory: `bool` -> Force open via memory
2566    ///
2567    /// access: [`Access`] -> Required access pattern for this file
2568    ///
2569    /// fail_on: [`FailOn`] -> Error level to fail on
2570    ///
2571    /// revalidate: `bool` -> Don't use a cached result for this operation
2572    pub fn dcrawload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
2573        let mut out_out = VipsImage::from(null_mut());
2574        let vips_op_response = call(
2575            "dcrawload",
2576            option
2577                .set(
2578                    "filename",
2579                    filename,
2580                )
2581                .set(
2582                    "out",
2583                    &mut out_out,
2584                ),
2585        )?;
2586        utils::result(
2587            vips_op_response,
2588            out_out,
2589            Error::OperationError("Dcrawload (vips_dcrawload) failed".to_string()),
2590        )
2591    }
2592
2593    /// VipsForeignLoadDcRawBuffer (dcrawload_buffer), load RAW camera files, priority=100, untrusted, is_a_buffer, get_flags, header, load
2594    /// returns `VipsImage` - Output image
2595    ///
2596    /// buffer: `&[u8]` -> Buffer to load from
2597    pub fn dcrawload_buffer(buffer: &[u8]) -> Result<VipsImage> {
2598        let mut out_out = VipsImage::from(null_mut());
2599        let vips_op_response = call(
2600            "dcrawload_buffer",
2601            VOption::new()
2602                .set(
2603                    "buffer",
2604                    buffer,
2605                )
2606                .set(
2607                    "out",
2608                    &mut out_out,
2609                ),
2610        )?;
2611        utils::result(
2612            vips_op_response,
2613            out_out,
2614            Error::OperationError("DcrawloadBuffer (vips_dcrawload_buffer) failed".to_string()),
2615        )
2616    }
2617
2618    /// VipsForeignLoadDcRawBuffer (dcrawload_buffer), load RAW camera files, priority=100, untrusted, is_a_buffer, get_flags, header, load
2619    /// returns `VipsImage` - Output image
2620    ///
2621    /// buffer: `&[u8]` -> Buffer to load from
2622    ///
2623    /// <ins>Optional arguments</ins>
2624    ///
2625    /// bitdepth: `i32` -> Number of bits per pixel
2626    ///
2627    /// flags: [`ForeignFlags`] -> Flags for this file
2628    ///
2629    /// memory: `bool` -> Force open via memory
2630    ///
2631    /// access: [`Access`] -> Required access pattern for this file
2632    ///
2633    /// fail_on: [`FailOn`] -> Error level to fail on
2634    ///
2635    /// revalidate: `bool` -> Don't use a cached result for this operation
2636    pub fn dcrawload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
2637        let mut out_out = VipsImage::from(null_mut());
2638        let vips_op_response = call(
2639            "dcrawload_buffer",
2640            option
2641                .set(
2642                    "buffer",
2643                    buffer,
2644                )
2645                .set(
2646                    "out",
2647                    &mut out_out,
2648                ),
2649        )?;
2650        utils::result(
2651            vips_op_response,
2652            out_out,
2653            Error::OperationError("DcrawloadBuffer (vips_dcrawload_buffer) failed".to_string()),
2654        )
2655    }
2656
2657    /// VipsForeignLoadDcRawSource (dcrawload_source), load RAW camera files, nocache, priority=100, untrusted, is_a_source, get_flags, header, load
2658    /// returns `VipsImage` - Output image
2659    ///
2660    /// source: `&VipsSource` -> Source to load from
2661    pub fn dcrawload_source(source: &VipsSource) -> Result<VipsImage> {
2662        let mut out_out = VipsImage::from(null_mut());
2663        let vips_op_response = call(
2664            "dcrawload_source",
2665            VOption::new()
2666                .set(
2667                    "source",
2668                    source,
2669                )
2670                .set(
2671                    "out",
2672                    &mut out_out,
2673                ),
2674        )?;
2675        utils::result(
2676            vips_op_response,
2677            out_out,
2678            Error::OperationError("DcrawloadSource (vips_dcrawload_source) failed".to_string()),
2679        )
2680    }
2681
2682    /// VipsForeignLoadDcRawSource (dcrawload_source), load RAW camera files, nocache, priority=100, untrusted, is_a_source, get_flags, header, load
2683    /// returns `VipsImage` - Output image
2684    ///
2685    /// source: `&VipsSource` -> Source to load from
2686    ///
2687    /// <ins>Optional arguments</ins>
2688    ///
2689    /// bitdepth: `i32` -> Number of bits per pixel
2690    ///
2691    /// flags: [`ForeignFlags`] -> Flags for this file
2692    ///
2693    /// memory: `bool` -> Force open via memory
2694    ///
2695    /// access: [`Access`] -> Required access pattern for this file
2696    ///
2697    /// fail_on: [`FailOn`] -> Error level to fail on
2698    ///
2699    /// revalidate: `bool` -> Don't use a cached result for this operation
2700    pub fn dcrawload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
2701        let mut out_out = VipsImage::from(null_mut());
2702        let vips_op_response = call(
2703            "dcrawload_source",
2704            option
2705                .set(
2706                    "source",
2707                    source,
2708                )
2709                .set(
2710                    "out",
2711                    &mut out_out,
2712                ),
2713        )?;
2714        utils::result(
2715            vips_op_response,
2716            out_out,
2717            Error::OperationError("DcrawloadSource (vips_dcrawload_source) failed".to_string()),
2718        )
2719    }
2720
2721    /// VipsDeviate (deviate), find image standard deviation
2722    /// returns `f64` - Output value
2723    pub fn deviate(&self) -> Result<f64> {
2724        let mut out_out: f64 = 0.0;
2725        let vips_op_response = call(
2726            "deviate",
2727            VOption::new()
2728                .set("in", self)
2729                .set(
2730                    "out",
2731                    &mut out_out,
2732                ),
2733        )?;
2734        utils::result(
2735            vips_op_response,
2736            out_out,
2737            Error::OperationError("Deviate (vips_deviate) failed".to_string()),
2738        )
2739    }
2740
2741    /// VipsDivide (divide), divide two images
2742    /// returns `VipsImage` - Output image
2743    ///
2744    /// right: `&VipsImage` -> Right-hand image argument
2745    pub fn divide(&self, right: &VipsImage) -> Result<VipsImage> {
2746        let mut out_out = VipsImage::from(null_mut());
2747        let vips_op_response = call(
2748            "divide",
2749            VOption::new()
2750                .set(
2751                    "left",
2752                    self,
2753                )
2754                .set(
2755                    "right",
2756                    right,
2757                )
2758                .set(
2759                    "out",
2760                    &mut out_out,
2761                ),
2762        )?;
2763        utils::result(
2764            vips_op_response,
2765            out_out,
2766            Error::OperationError("Divide (vips_divide) failed".to_string()),
2767        )
2768    }
2769
2770    /// VipsDrawCircle (draw_circle), draw a circle on an image, nocache
2771    ///
2772    /// ink: `&[f64]` -> Color for pixels
2773    ///
2774    /// cx: `i32` -> Centre of draw_circle
2775    ///
2776    /// cy: `i32` -> Centre of draw_circle
2777    ///
2778    /// radius: `i32` -> Radius in pixels
2779    pub fn draw_circle(&mut self, ink: &[f64], cx: i32, cy: i32, radius: i32) -> Result<()> {
2780        self.prepare_draw()?;
2781        let vips_op_response = call(
2782            "draw_circle",
2783            VOption::new()
2784                .set(
2785                    "image",
2786                    self,
2787                )
2788                .set("ink", ink)
2789                .set("cx", cx)
2790                .set("cy", cy)
2791                .set(
2792                    "radius",
2793                    radius,
2794                ),
2795        )?;
2796        utils::result(
2797            vips_op_response,
2798            (),
2799            Error::OperationError("DrawCircle (vips_draw_circle) failed".to_string()),
2800        )
2801    }
2802
2803    /// VipsDrawCircle (draw_circle), draw a circle on an image, nocache
2804    ///
2805    /// ink: `&[f64]` -> Color for pixels
2806    ///
2807    /// cx: `i32` -> Centre of draw_circle
2808    ///
2809    /// cy: `i32` -> Centre of draw_circle
2810    ///
2811    /// radius: `i32` -> Radius in pixels
2812    ///
2813    /// <ins>Optional arguments</ins>
2814    ///
2815    /// fill: `bool` -> Draw a solid object
2816    pub fn draw_circle_with_opts(
2817        &mut self,
2818        ink: &[f64],
2819        cx: i32,
2820        cy: i32,
2821        radius: i32,
2822        option: VOption,
2823    ) -> Result<()> {
2824        self.prepare_draw()?;
2825        let vips_op_response = call(
2826            "draw_circle",
2827            option
2828                .set(
2829                    "image",
2830                    self,
2831                )
2832                .set("ink", ink)
2833                .set("cx", cx)
2834                .set("cy", cy)
2835                .set(
2836                    "radius",
2837                    radius,
2838                ),
2839        )?;
2840        utils::result(
2841            vips_op_response,
2842            (),
2843            Error::OperationError("DrawCircle (vips_draw_circle) failed".to_string()),
2844        )
2845    }
2846
2847    /// VipsDrawFlood (draw_flood), flood-fill an area, nocache
2848    ///
2849    /// ink: `&[f64]` -> Color for pixels
2850    ///
2851    /// x: `i32` -> DrawFlood start point
2852    ///
2853    /// y: `i32` -> DrawFlood start point
2854    pub fn draw_flood(&mut self, ink: &[f64], x: i32, y: i32) -> Result<()> {
2855        self.prepare_draw()?;
2856        let vips_op_response = call(
2857            "draw_flood",
2858            VOption::new()
2859                .set(
2860                    "image",
2861                    self,
2862                )
2863                .set("ink", ink)
2864                .set("x", x)
2865                .set("y", y),
2866        )?;
2867        utils::result(
2868            vips_op_response,
2869            (),
2870            Error::OperationError("DrawFlood (vips_draw_flood) failed".to_string()),
2871        )
2872    }
2873
2874    /// VipsDrawFlood (draw_flood), flood-fill an area, nocache
2875    ///
2876    /// ink: `&[f64]` -> Color for pixels
2877    ///
2878    /// x: `i32` -> DrawFlood start point
2879    ///
2880    /// y: `i32` -> DrawFlood start point
2881    ///
2882    /// <ins>Optional arguments</ins>
2883    ///
2884    /// test: `` -> Test pixels in this image
2885    ///
2886    /// equal: `bool` -> DrawFlood while equal to edge
2887    ///
2888    /// left: `&mut i32` -> Left edge of modified area
2889    ///
2890    /// top: `&mut i32` -> Top edge of modified area
2891    ///
2892    /// width: `&mut i32` -> Width of modified area
2893    ///
2894    /// height: `&mut i32` -> Height of modified area
2895    pub fn draw_flood_with_opts(
2896        &mut self,
2897        ink: &[f64],
2898        x: i32,
2899        y: i32,
2900        option: VOption,
2901    ) -> Result<()> {
2902        self.prepare_draw()?;
2903        let vips_op_response = call(
2904            "draw_flood",
2905            option
2906                .set(
2907                    "image",
2908                    self,
2909                )
2910                .set("ink", ink)
2911                .set("x", x)
2912                .set("y", y),
2913        )?;
2914        utils::result(
2915            vips_op_response,
2916            (),
2917            Error::OperationError("DrawFlood (vips_draw_flood) failed".to_string()),
2918        )
2919    }
2920
2921    /// VipsDrawImage (draw_image), paint an image into another image, nocache
2922    ///
2923    /// sub: `&VipsImage` -> Sub-image to insert into main image
2924    ///
2925    /// x: `i32` -> Draw image here
2926    ///
2927    /// y: `i32` -> Draw image here
2928    pub fn draw_image(&mut self, sub: &VipsImage, x: i32, y: i32) -> Result<()> {
2929        self.prepare_draw()?;
2930        let vips_op_response = call(
2931            "draw_image",
2932            VOption::new()
2933                .set(
2934                    "image",
2935                    self,
2936                )
2937                .set("sub", sub)
2938                .set("x", x)
2939                .set("y", y),
2940        )?;
2941        utils::result(
2942            vips_op_response,
2943            (),
2944            Error::OperationError("DrawImage (vips_draw_image) failed".to_string()),
2945        )
2946    }
2947
2948    /// VipsDrawImage (draw_image), paint an image into another image, nocache
2949    ///
2950    /// sub: `&VipsImage` -> Sub-image to insert into main image
2951    ///
2952    /// x: `i32` -> Draw image here
2953    ///
2954    /// y: `i32` -> Draw image here
2955    ///
2956    /// <ins>Optional arguments</ins>
2957    ///
2958    /// mode: [`CombineMode`] -> Combining mode
2959    pub fn draw_image_with_opts(
2960        &mut self,
2961        sub: &VipsImage,
2962        x: i32,
2963        y: i32,
2964        option: VOption,
2965    ) -> Result<()> {
2966        self.prepare_draw()?;
2967        let vips_op_response = call(
2968            "draw_image",
2969            option
2970                .set(
2971                    "image",
2972                    self,
2973                )
2974                .set("sub", sub)
2975                .set("x", x)
2976                .set("y", y),
2977        )?;
2978        utils::result(
2979            vips_op_response,
2980            (),
2981            Error::OperationError("DrawImage (vips_draw_image) failed".to_string()),
2982        )
2983    }
2984
2985    /// VipsDrawLine (draw_line), draw a line on an image, nocache
2986    ///
2987    /// ink: `&[f64]` -> Color for pixels
2988    ///
2989    /// x1: `i32` -> Start of draw_line
2990    ///
2991    /// y1: `i32` -> Start of draw_line
2992    ///
2993    /// x2: `i32` -> End of draw_line
2994    ///
2995    /// y2: `i32` -> End of draw_line
2996    pub fn draw_line(&mut self, ink: &[f64], x1: i32, y1: i32, x2: i32, y2: i32) -> Result<()> {
2997        self.prepare_draw()?;
2998        let vips_op_response = call(
2999            "draw_line",
3000            VOption::new()
3001                .set(
3002                    "image",
3003                    self,
3004                )
3005                .set("ink", ink)
3006                .set("x1", x1)
3007                .set("y1", y1)
3008                .set("x2", x2)
3009                .set("y2", y2),
3010        )?;
3011        utils::result(
3012            vips_op_response,
3013            (),
3014            Error::OperationError("DrawLine (vips_draw_line) failed".to_string()),
3015        )
3016    }
3017
3018    /// VipsDrawMask (draw_mask), draw a mask on an image, nocache
3019    ///
3020    /// ink: `&[f64]` -> Color for pixels
3021    ///
3022    /// mask: `&VipsImage` -> Mask of pixels to draw
3023    ///
3024    /// x: `i32` -> Draw mask here
3025    ///
3026    /// y: `i32` -> Draw mask here
3027    pub fn draw_mask(&mut self, ink: &[f64], mask: &VipsImage, x: i32, y: i32) -> Result<()> {
3028        self.prepare_draw()?;
3029        let vips_op_response = call(
3030            "draw_mask",
3031            VOption::new()
3032                .set(
3033                    "image",
3034                    self,
3035                )
3036                .set("ink", ink)
3037                .set(
3038                    "mask",
3039                    mask,
3040                )
3041                .set("x", x)
3042                .set("y", y),
3043        )?;
3044        utils::result(
3045            vips_op_response,
3046            (),
3047            Error::OperationError("DrawMask (vips_draw_mask) failed".to_string()),
3048        )
3049    }
3050
3051    /// VipsDrawRect (draw_rect), paint a rectangle on an image, nocache
3052    ///
3053    /// ink: `&[f64]` -> Color for pixels
3054    ///
3055    /// left: `i32` -> Rect to fill
3056    ///
3057    /// top: `i32` -> Rect to fill
3058    ///
3059    /// width: `i32` -> Rect to fill
3060    ///
3061    /// height: `i32` -> Rect to fill
3062    pub fn draw_rect(
3063        &mut self,
3064        ink: &[f64],
3065        left: i32,
3066        top: i32,
3067        width: i32,
3068        height: i32,
3069    ) -> Result<()> {
3070        self.prepare_draw()?;
3071        let vips_op_response = call(
3072            "draw_rect",
3073            VOption::new()
3074                .set(
3075                    "image",
3076                    self,
3077                )
3078                .set("ink", ink)
3079                .set(
3080                    "left",
3081                    left,
3082                )
3083                .set("top", top)
3084                .set(
3085                    "width",
3086                    width,
3087                )
3088                .set(
3089                    "height",
3090                    height,
3091                ),
3092        )?;
3093        utils::result(
3094            vips_op_response,
3095            (),
3096            Error::OperationError("DrawRect (vips_draw_rect) failed".to_string()),
3097        )
3098    }
3099
3100    /// VipsDrawRect (draw_rect), paint a rectangle on an image, nocache
3101    ///
3102    /// ink: `&[f64]` -> Color for pixels
3103    ///
3104    /// left: `i32` -> Rect to fill
3105    ///
3106    /// top: `i32` -> Rect to fill
3107    ///
3108    /// width: `i32` -> Rect to fill
3109    ///
3110    /// height: `i32` -> Rect to fill
3111    ///
3112    /// <ins>Optional arguments</ins>
3113    ///
3114    /// fill: `bool` -> Draw a solid object
3115    pub fn draw_rect_with_opts(
3116        &mut self,
3117        ink: &[f64],
3118        left: i32,
3119        top: i32,
3120        width: i32,
3121        height: i32,
3122        option: VOption,
3123    ) -> Result<()> {
3124        self.prepare_draw()?;
3125        let vips_op_response = call(
3126            "draw_rect",
3127            option
3128                .set(
3129                    "image",
3130                    self,
3131                )
3132                .set("ink", ink)
3133                .set(
3134                    "left",
3135                    left,
3136                )
3137                .set("top", top)
3138                .set(
3139                    "width",
3140                    width,
3141                )
3142                .set(
3143                    "height",
3144                    height,
3145                ),
3146        )?;
3147        utils::result(
3148            vips_op_response,
3149            (),
3150            Error::OperationError("DrawRect (vips_draw_rect) failed".to_string()),
3151        )
3152    }
3153
3154    /// VipsDrawSmudge (draw_smudge), blur a rectangle on an image, nocache
3155    ///
3156    /// left: `i32` -> Rect to fill
3157    ///
3158    /// top: `i32` -> Rect to fill
3159    ///
3160    /// width: `i32` -> Rect to fill
3161    ///
3162    /// height: `i32` -> Rect to fill
3163    pub fn draw_smudge(&mut self, left: i32, top: i32, width: i32, height: i32) -> Result<()> {
3164        self.prepare_draw()?;
3165        let vips_op_response = call(
3166            "draw_smudge",
3167            VOption::new()
3168                .set(
3169                    "image",
3170                    self,
3171                )
3172                .set(
3173                    "left",
3174                    left,
3175                )
3176                .set("top", top)
3177                .set(
3178                    "width",
3179                    width,
3180                )
3181                .set(
3182                    "height",
3183                    height,
3184                ),
3185        )?;
3186        utils::result(
3187            vips_op_response,
3188            (),
3189            Error::OperationError("DrawSmudge (vips_draw_smudge) failed".to_string()),
3190        )
3191    }
3192
3193    /// VipsForeignSaveDzFile (dzsave), save image to deepzoom file, nocache (.dz, .szi), priority=0,
3194    ///
3195    /// filename: `&str` -> Filename to save to
3196    pub fn dzsave(&self, filename: &str) -> Result<()> {
3197        let vips_op_response = call(
3198            "dzsave",
3199            VOption::new()
3200                .set("in", self)
3201                .set(
3202                    "filename",
3203                    filename,
3204                ),
3205        )?;
3206        utils::result(
3207            vips_op_response,
3208            (),
3209            Error::OperationError("Dzsave (vips_dzsave) failed".to_string()),
3210        )
3211    }
3212
3213    /// VipsForeignSaveDzFile (dzsave), save image to deepzoom file, nocache (.dz, .szi), priority=0,
3214    ///
3215    /// filename: `&str` -> Filename to save to
3216    ///
3217    /// <ins>Optional arguments</ins>
3218    ///
3219    /// imagename: `&str` -> Image name
3220    ///
3221    /// layout: [`ForeignDzLayout`] -> Directory layout
3222    ///
3223    /// suffix: `&str` -> Filename suffix for tiles
3224    ///
3225    /// overlap: `i32` -> Tile overlap in pixels
3226    ///
3227    /// tile_size: `i32` -> Tile size in pixels
3228    ///
3229    /// centre: `bool` -> Center image in tile
3230    ///
3231    /// depth: [`ForeignDzDepth`] -> Pyramid depth
3232    ///
3233    /// angle: [`Angle`] -> Rotate image during save
3234    ///
3235    /// container: [`ForeignDzContainer`] -> Pyramid container type
3236    ///
3237    /// compression: `i32` -> ZIP deflate compression level
3238    ///
3239    /// region_shrink: [`RegionShrink`] -> Method to shrink regions
3240    ///
3241    /// skip_blanks: `i32` -> Skip tiles which are nearly equal to the background
3242    ///
3243    /// id: `&str` -> Resource ID
3244    ///
3245    /// Q: `i32` -> Q factor
3246    ///
3247    /// keep: [`ForeignKeep`] -> Which metadata to retain
3248    ///
3249    /// background: `&[f64]` -> Background value
3250    ///
3251    /// page_height: `i32` -> Set page height for multipage save
3252    ///
3253    /// profile: `&str` -> Filename of ICC profile to embed
3254    pub fn dzsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
3255        let vips_op_response = call(
3256            "dzsave",
3257            option
3258                .set("in", self)
3259                .set(
3260                    "filename",
3261                    filename,
3262                ),
3263        )?;
3264        utils::result(
3265            vips_op_response,
3266            (),
3267            Error::OperationError("Dzsave (vips_dzsave) failed".to_string()),
3268        )
3269    }
3270
3271    /// VipsForeignSaveDzBuffer (dzsave_buffer), save image to dz buffer, nocache (.dz, .szi), priority=0,
3272    /// returns `Vec<u8>` - Buffer to save to
3273    pub fn dzsave_buffer(&self) -> Result<Vec<u8>> {
3274        let mut buffer_out = Vec::new();
3275        let vips_op_response = call(
3276            "dzsave_buffer",
3277            VOption::new()
3278                .set("in", self)
3279                .set(
3280                    "buffer",
3281                    &mut buffer_out,
3282                ),
3283        )?;
3284        utils::result(
3285            vips_op_response,
3286            buffer_out,
3287            Error::OperationError("DzsaveBuffer (vips_dzsave_buffer) failed".to_string()),
3288        )
3289    }
3290
3291    /// VipsForeignSaveDzBuffer (dzsave_buffer), save image to dz buffer, nocache (.dz, .szi), priority=0,
3292    /// returns `Vec<u8>` - Buffer to save to
3293    ///
3294    /// <ins>Optional arguments</ins>
3295    ///
3296    /// imagename: `&str` -> Image name
3297    ///
3298    /// layout: [`ForeignDzLayout`] -> Directory layout
3299    ///
3300    /// suffix: `&str` -> Filename suffix for tiles
3301    ///
3302    /// overlap: `i32` -> Tile overlap in pixels
3303    ///
3304    /// tile_size: `i32` -> Tile size in pixels
3305    ///
3306    /// centre: `bool` -> Center image in tile
3307    ///
3308    /// depth: [`ForeignDzDepth`] -> Pyramid depth
3309    ///
3310    /// angle: [`Angle`] -> Rotate image during save
3311    ///
3312    /// container: [`ForeignDzContainer`] -> Pyramid container type
3313    ///
3314    /// compression: `i32` -> ZIP deflate compression level
3315    ///
3316    /// region_shrink: [`RegionShrink`] -> Method to shrink regions
3317    ///
3318    /// skip_blanks: `i32` -> Skip tiles which are nearly equal to the background
3319    ///
3320    /// id: `&str` -> Resource ID
3321    ///
3322    /// Q: `i32` -> Q factor
3323    ///
3324    /// keep: [`ForeignKeep`] -> Which metadata to retain
3325    ///
3326    /// background: `&[f64]` -> Background value
3327    ///
3328    /// page_height: `i32` -> Set page height for multipage save
3329    ///
3330    /// profile: `&str` -> Filename of ICC profile to embed
3331    pub fn dzsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
3332        let mut buffer_out = Vec::new();
3333        let vips_op_response = call(
3334            "dzsave_buffer",
3335            option
3336                .set("in", self)
3337                .set(
3338                    "buffer",
3339                    &mut buffer_out,
3340                ),
3341        )?;
3342        utils::result(
3343            vips_op_response,
3344            buffer_out,
3345            Error::OperationError("DzsaveBuffer (vips_dzsave_buffer) failed".to_string()),
3346        )
3347    }
3348
3349    /// VipsForeignSaveDzTarget (dzsave_target), save image to deepzoom target, nocache (.dz, .szi), priority=0,
3350    ///
3351    /// target: `&VipsTarget` -> Target to save to
3352    pub fn dzsave_target(&self, target: &VipsTarget) -> Result<()> {
3353        let vips_op_response = call(
3354            "dzsave_target",
3355            VOption::new()
3356                .set("in", self)
3357                .set(
3358                    "target",
3359                    target,
3360                ),
3361        )?;
3362        utils::result(
3363            vips_op_response,
3364            (),
3365            Error::OperationError("DzsaveTarget (vips_dzsave_target) failed".to_string()),
3366        )
3367    }
3368
3369    /// VipsForeignSaveDzTarget (dzsave_target), save image to deepzoom target, nocache (.dz, .szi), priority=0,
3370    ///
3371    /// target: `&VipsTarget` -> Target to save to
3372    ///
3373    /// <ins>Optional arguments</ins>
3374    ///
3375    /// imagename: `&str` -> Image name
3376    ///
3377    /// layout: [`ForeignDzLayout`] -> Directory layout
3378    ///
3379    /// suffix: `&str` -> Filename suffix for tiles
3380    ///
3381    /// overlap: `i32` -> Tile overlap in pixels
3382    ///
3383    /// tile_size: `i32` -> Tile size in pixels
3384    ///
3385    /// centre: `bool` -> Center image in tile
3386    ///
3387    /// depth: [`ForeignDzDepth`] -> Pyramid depth
3388    ///
3389    /// angle: [`Angle`] -> Rotate image during save
3390    ///
3391    /// container: [`ForeignDzContainer`] -> Pyramid container type
3392    ///
3393    /// compression: `i32` -> ZIP deflate compression level
3394    ///
3395    /// region_shrink: [`RegionShrink`] -> Method to shrink regions
3396    ///
3397    /// skip_blanks: `i32` -> Skip tiles which are nearly equal to the background
3398    ///
3399    /// id: `&str` -> Resource ID
3400    ///
3401    /// Q: `i32` -> Q factor
3402    ///
3403    /// keep: [`ForeignKeep`] -> Which metadata to retain
3404    ///
3405    /// background: `&[f64]` -> Background value
3406    ///
3407    /// page_height: `i32` -> Set page height for multipage save
3408    ///
3409    /// profile: `&str` -> Filename of ICC profile to embed
3410    pub fn dzsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
3411        let vips_op_response = call(
3412            "dzsave_target",
3413            option
3414                .set("in", self)
3415                .set(
3416                    "target",
3417                    target,
3418                ),
3419        )?;
3420        utils::result(
3421            vips_op_response,
3422            (),
3423            Error::OperationError("DzsaveTarget (vips_dzsave_target) failed".to_string()),
3424        )
3425    }
3426
3427    /// VipsEmbed (embed), embed an image in a larger image
3428    /// returns `VipsImage` - Output image
3429    ///
3430    /// x: `i32` -> Left edge of input in output
3431    ///
3432    /// y: `i32` -> Top edge of input in output
3433    ///
3434    /// width: `i32` -> Image width in pixels
3435    ///
3436    /// height: `i32` -> Image height in pixels
3437    pub fn embed(&self, x: i32, y: i32, width: i32, height: i32) -> Result<VipsImage> {
3438        let mut out_out = VipsImage::from(null_mut());
3439        let vips_op_response = call(
3440            "embed",
3441            VOption::new()
3442                .set("in", self)
3443                .set(
3444                    "out",
3445                    &mut out_out,
3446                )
3447                .set("x", x)
3448                .set("y", y)
3449                .set(
3450                    "width",
3451                    width,
3452                )
3453                .set(
3454                    "height",
3455                    height,
3456                ),
3457        )?;
3458        utils::result(
3459            vips_op_response,
3460            out_out,
3461            Error::OperationError("Embed (vips_embed) failed".to_string()),
3462        )
3463    }
3464
3465    /// VipsEmbed (embed), embed an image in a larger image
3466    /// returns `VipsImage` - Output image
3467    ///
3468    /// x: `i32` -> Left edge of input in output
3469    ///
3470    /// y: `i32` -> Top edge of input in output
3471    ///
3472    /// width: `i32` -> Image width in pixels
3473    ///
3474    /// height: `i32` -> Image height in pixels
3475    ///
3476    /// <ins>Optional arguments</ins>
3477    ///
3478    /// extend: [`Extend`] -> How to generate the extra pixels
3479    ///
3480    /// background: `&[f64]` -> Color for background pixels
3481    pub fn embed_with_opts(
3482        &self,
3483        x: i32,
3484        y: i32,
3485        width: i32,
3486        height: i32,
3487        option: VOption,
3488    ) -> Result<VipsImage> {
3489        let mut out_out = VipsImage::from(null_mut());
3490        let vips_op_response = call(
3491            "embed",
3492            option
3493                .set("in", self)
3494                .set(
3495                    "out",
3496                    &mut out_out,
3497                )
3498                .set("x", x)
3499                .set("y", y)
3500                .set(
3501                    "width",
3502                    width,
3503                )
3504                .set(
3505                    "height",
3506                    height,
3507                ),
3508        )?;
3509        utils::result(
3510            vips_op_response,
3511            out_out,
3512            Error::OperationError("Embed (vips_embed) failed".to_string()),
3513        )
3514    }
3515
3516    /// VipsExtractArea (extract_area), extract an area from an image
3517    /// returns `VipsImage` - Output image
3518    ///
3519    /// left: `i32` -> Left edge of extract area
3520    ///
3521    /// top: `i32` -> Top edge of extract area
3522    ///
3523    /// width: `i32` -> Width of extract area
3524    ///
3525    /// height: `i32` -> Height of extract area
3526    pub fn extract_area(&self, left: i32, top: i32, width: i32, height: i32) -> Result<VipsImage> {
3527        let mut out_out = VipsImage::from(null_mut());
3528        let vips_op_response = call(
3529            "extract_area",
3530            VOption::new()
3531                .set(
3532                    "input",
3533                    self,
3534                )
3535                .set(
3536                    "out",
3537                    &mut out_out,
3538                )
3539                .set(
3540                    "left",
3541                    left,
3542                )
3543                .set("top", top)
3544                .set(
3545                    "width",
3546                    width,
3547                )
3548                .set(
3549                    "height",
3550                    height,
3551                ),
3552        )?;
3553        utils::result(
3554            vips_op_response,
3555            out_out,
3556            Error::OperationError("ExtractArea (vips_extract_area) failed".to_string()),
3557        )
3558    }
3559
3560    /// crop (extract_area), extract an area from an image
3561    /// returns `VipsImage` - Output image
3562    ///
3563    /// left: `i32` -> Left edge of extract area
3564    ///
3565    /// top: `i32` -> Top edge of extract area
3566    ///
3567    /// width: `i32` -> Width of extract area
3568    ///
3569    /// height: `i32` -> Height of extract area
3570    pub fn crop(&self, left: i32, top: i32, width: i32, height: i32) -> Result<VipsImage> {
3571        let mut out_out = VipsImage::from(null_mut());
3572        let vips_op_response = call(
3573            "crop",
3574            VOption::new()
3575                .set(
3576                    "input",
3577                    self,
3578                )
3579                .set(
3580                    "out",
3581                    &mut out_out,
3582                )
3583                .set(
3584                    "left",
3585                    left,
3586                )
3587                .set("top", top)
3588                .set(
3589                    "width",
3590                    width,
3591                )
3592                .set(
3593                    "height",
3594                    height,
3595                ),
3596        )?;
3597        utils::result(
3598            vips_op_response,
3599            out_out,
3600            Error::OperationError("Crop (vips_crop) failed".to_string()),
3601        )
3602    }
3603
3604    /// VipsExtractBand (extract_band), extract band from an image
3605    /// returns `VipsImage` - Output image
3606    ///
3607    /// band: `i32` -> Band to extract
3608    pub fn extract_band(&self, band: i32) -> Result<VipsImage> {
3609        let mut out_out = VipsImage::from(null_mut());
3610        let vips_op_response = call(
3611            "extract_band",
3612            VOption::new()
3613                .set("in", self)
3614                .set(
3615                    "out",
3616                    &mut out_out,
3617                )
3618                .set(
3619                    "band",
3620                    band,
3621                ),
3622        )?;
3623        utils::result(
3624            vips_op_response,
3625            out_out,
3626            Error::OperationError("ExtractBand (vips_extract_band) failed".to_string()),
3627        )
3628    }
3629
3630    /// VipsExtractBand (extract_band), extract band from an image
3631    /// returns `VipsImage` - Output image
3632    ///
3633    /// band: `i32` -> Band to extract
3634    ///
3635    /// <ins>Optional arguments</ins>
3636    ///
3637    /// n: `i32` -> Number of bands to extract
3638    pub fn extract_band_with_opts(&self, band: i32, option: VOption) -> Result<VipsImage> {
3639        let mut out_out = VipsImage::from(null_mut());
3640        let vips_op_response = call(
3641            "extract_band",
3642            option
3643                .set("in", self)
3644                .set(
3645                    "out",
3646                    &mut out_out,
3647                )
3648                .set(
3649                    "band",
3650                    band,
3651                ),
3652        )?;
3653        utils::result(
3654            vips_op_response,
3655            out_out,
3656            Error::OperationError("ExtractBand (vips_extract_band) failed".to_string()),
3657        )
3658    }
3659
3660    /// VipsEye (eye), make an image showing the eye's spatial response
3661    /// returns `VipsImage` - Output image
3662    ///
3663    /// width: `i32` -> Image width in pixels
3664    ///
3665    /// height: `i32` -> Image height in pixels
3666    pub fn eye(width: i32, height: i32) -> Result<VipsImage> {
3667        let mut out_out = VipsImage::from(null_mut());
3668        let vips_op_response = call(
3669            "eye",
3670            VOption::new()
3671                .set(
3672                    "out",
3673                    &mut out_out,
3674                )
3675                .set(
3676                    "width",
3677                    width,
3678                )
3679                .set(
3680                    "height",
3681                    height,
3682                ),
3683        )?;
3684        utils::result(
3685            vips_op_response,
3686            out_out,
3687            Error::OperationError("Eye (vips_eye) failed".to_string()),
3688        )
3689    }
3690
3691    /// VipsEye (eye), make an image showing the eye's spatial response
3692    /// returns `VipsImage` - Output image
3693    ///
3694    /// width: `i32` -> Image width in pixels
3695    ///
3696    /// height: `i32` -> Image height in pixels
3697    ///
3698    /// <ins>Optional arguments</ins>
3699    ///
3700    /// uchar: `bool` -> Output an unsigned char image
3701    ///
3702    /// factor: `f64` -> Maximum spatial frequency
3703    pub fn eye_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
3704        let mut out_out = VipsImage::from(null_mut());
3705        let vips_op_response = call(
3706            "eye",
3707            option
3708                .set(
3709                    "out",
3710                    &mut out_out,
3711                )
3712                .set(
3713                    "width",
3714                    width,
3715                )
3716                .set(
3717                    "height",
3718                    height,
3719                ),
3720        )?;
3721        utils::result(
3722            vips_op_response,
3723            out_out,
3724            Error::OperationError("Eye (vips_eye) failed".to_string()),
3725        )
3726    }
3727
3728    /// VipsFalsecolour (falsecolour), false-color an image
3729    /// returns `VipsImage` - Output image
3730    pub fn falsecolour(&self) -> Result<VipsImage> {
3731        let mut out_out = VipsImage::from(null_mut());
3732        let vips_op_response = call(
3733            "falsecolour",
3734            VOption::new()
3735                .set("in", self)
3736                .set(
3737                    "out",
3738                    &mut out_out,
3739                ),
3740        )?;
3741        utils::result(
3742            vips_op_response,
3743            out_out,
3744            Error::OperationError("Falsecolour (vips_falsecolour) failed".to_string()),
3745        )
3746    }
3747
3748    /// VipsFastcor (fastcor), fast correlation
3749    /// returns `VipsImage` - Output image
3750    ///
3751    /// refp: `&VipsImage` -> Input reference image
3752    pub fn fastcor(&self, refp: &VipsImage) -> Result<VipsImage> {
3753        let mut out_out = VipsImage::from(null_mut());
3754        let vips_op_response = call(
3755            "fastcor",
3756            VOption::new()
3757                .set("in", self)
3758                .set(
3759                    "ref", refp,
3760                )
3761                .set(
3762                    "out",
3763                    &mut out_out,
3764                ),
3765        )?;
3766        utils::result(
3767            vips_op_response,
3768            out_out,
3769            Error::OperationError("Fastcor (vips_fastcor) failed".to_string()),
3770        )
3771    }
3772
3773    /// VipsFillNearest (fill_nearest), fill image zeros with nearest non-zero pixel
3774    /// returns `VipsImage` - Value of nearest non-zero pixel
3775    pub fn fill_nearest(&self) -> Result<VipsImage> {
3776        let mut out_out = VipsImage::from(null_mut());
3777        let vips_op_response = call(
3778            "fill_nearest",
3779            VOption::new()
3780                .set("in", self)
3781                .set(
3782                    "out",
3783                    &mut out_out,
3784                ),
3785        )?;
3786        utils::result(
3787            vips_op_response,
3788            out_out,
3789            Error::OperationError("FillNearest (vips_fill_nearest) failed".to_string()),
3790        )
3791    }
3792
3793    /// VipsFillNearest (fill_nearest), fill image zeros with nearest non-zero pixel
3794    /// returns `VipsImage` - Value of nearest non-zero pixel
3795    ///
3796    /// <ins>Optional arguments</ins>
3797    ///
3798    /// distance: `&mut VipsImage` -> Distance to nearest non-zero pixel
3799    pub fn fill_nearest_with_opts(&self, option: VOption) -> Result<VipsImage> {
3800        let mut out_out = VipsImage::from(null_mut());
3801        let vips_op_response = call(
3802            "fill_nearest",
3803            option
3804                .set("in", self)
3805                .set(
3806                    "out",
3807                    &mut out_out,
3808                ),
3809        )?;
3810        utils::result(
3811            vips_op_response,
3812            out_out,
3813            Error::OperationError("FillNearest (vips_fill_nearest) failed".to_string()),
3814        )
3815    }
3816
3817    /// VipsFindTrim (find_trim), search an image for non-edge areas
3818    /// Tuple (
3819    /// i32 - Left edge of image
3820    /// i32 - Top edge of extract area
3821    /// i32 - Width of extract area
3822    /// i32 - Height of extract area
3823    ///)
3824    pub fn find_trim(
3825        &self,
3826    ) -> Result<(
3827        i32,
3828        i32,
3829        i32,
3830        i32,
3831    )> {
3832        let mut left_out: i32 = 1;
3833        let mut top_out: i32 = 0;
3834        let mut width_out: i32 = 1;
3835        let mut height_out: i32 = 1;
3836        let vips_op_response = call(
3837            "find_trim",
3838            VOption::new()
3839                .set("in", self)
3840                .set(
3841                    "left",
3842                    &mut left_out,
3843                )
3844                .set(
3845                    "top",
3846                    &mut top_out,
3847                )
3848                .set(
3849                    "width",
3850                    &mut width_out,
3851                )
3852                .set(
3853                    "height",
3854                    &mut height_out,
3855                ),
3856        )?;
3857        utils::result(
3858            vips_op_response,
3859            (
3860                left_out,
3861                top_out,
3862                width_out,
3863                height_out,
3864            ),
3865            Error::OperationError("FindTrim (vips_find_trim) failed".to_string()),
3866        )
3867    }
3868
3869    /// VipsFindTrim (find_trim), search an image for non-edge areas
3870    /// Tuple (
3871    /// i32 - Left edge of image
3872    /// i32 - Top edge of extract area
3873    /// i32 - Width of extract area
3874    /// i32 - Height of extract area
3875    ///)
3876    ///
3877    /// <ins>Optional arguments</ins>
3878    ///
3879    /// threshold: `f64` -> Object threshold
3880    ///
3881    /// background: `&[f64]` -> Color for background pixels
3882    ///
3883    /// line_art: `bool` -> Enable line art mode
3884    pub fn find_trim_with_opts(
3885        &self,
3886        option: VOption,
3887    ) -> Result<(
3888        i32,
3889        i32,
3890        i32,
3891        i32,
3892    )> {
3893        let mut left_out: i32 = 1;
3894        let mut top_out: i32 = 0;
3895        let mut width_out: i32 = 1;
3896        let mut height_out: i32 = 1;
3897        let vips_op_response = call(
3898            "find_trim",
3899            option
3900                .set("in", self)
3901                .set(
3902                    "left",
3903                    &mut left_out,
3904                )
3905                .set(
3906                    "top",
3907                    &mut top_out,
3908                )
3909                .set(
3910                    "width",
3911                    &mut width_out,
3912                )
3913                .set(
3914                    "height",
3915                    &mut height_out,
3916                ),
3917        )?;
3918        utils::result(
3919            vips_op_response,
3920            (
3921                left_out,
3922                top_out,
3923                width_out,
3924                height_out,
3925            ),
3926            Error::OperationError("FindTrim (vips_find_trim) failed".to_string()),
3927        )
3928    }
3929
3930    /// VipsForeignLoadFitsFile (fitsload), load a FITS image (.fits, .fit, .fts), priority=-50, untrusted, is_a, get_flags, get_flags_filename, header, load
3931    /// returns `VipsImage` - Output image
3932    ///
3933    /// filename: `&str` -> Filename to load from
3934    pub fn fitsload(filename: &str) -> Result<VipsImage> {
3935        let mut out_out = VipsImage::from(null_mut());
3936        let vips_op_response = call(
3937            "fitsload",
3938            VOption::new()
3939                .set(
3940                    "filename",
3941                    filename,
3942                )
3943                .set(
3944                    "out",
3945                    &mut out_out,
3946                ),
3947        )?;
3948        utils::result(
3949            vips_op_response,
3950            out_out,
3951            Error::OperationError("Fitsload (vips_fitsload) failed".to_string()),
3952        )
3953    }
3954
3955    /// VipsForeignLoadFitsFile (fitsload), load a FITS image (.fits, .fit, .fts), priority=-50, untrusted, is_a, get_flags, get_flags_filename, header, load
3956    /// returns `VipsImage` - Output image
3957    ///
3958    /// filename: `&str` -> Filename to load from
3959    ///
3960    /// <ins>Optional arguments</ins>
3961    ///
3962    /// flags: [`ForeignFlags`] -> Flags for this file
3963    ///
3964    /// memory: `bool` -> Force open via memory
3965    ///
3966    /// access: [`Access`] -> Required access pattern for this file
3967    ///
3968    /// fail_on: [`FailOn`] -> Error level to fail on
3969    ///
3970    /// revalidate: `bool` -> Don't use a cached result for this operation
3971    pub fn fitsload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
3972        let mut out_out = VipsImage::from(null_mut());
3973        let vips_op_response = call(
3974            "fitsload",
3975            option
3976                .set(
3977                    "filename",
3978                    filename,
3979                )
3980                .set(
3981                    "out",
3982                    &mut out_out,
3983                ),
3984        )?;
3985        utils::result(
3986            vips_op_response,
3987            out_out,
3988            Error::OperationError("Fitsload (vips_fitsload) failed".to_string()),
3989        )
3990    }
3991
3992    /// VipsForeignLoadFitsSource (fitsload_source), load FITS from a source, nocache, priority=-50, untrusted, is_a, is_a_source, get_flags, get_flags_filename, header, load
3993    /// returns `VipsImage` - Output image
3994    ///
3995    /// source: `&VipsSource` -> Source to load from
3996    pub fn fitsload_source(source: &VipsSource) -> Result<VipsImage> {
3997        let mut out_out = VipsImage::from(null_mut());
3998        let vips_op_response = call(
3999            "fitsload_source",
4000            VOption::new()
4001                .set(
4002                    "source",
4003                    source,
4004                )
4005                .set(
4006                    "out",
4007                    &mut out_out,
4008                ),
4009        )?;
4010        utils::result(
4011            vips_op_response,
4012            out_out,
4013            Error::OperationError("FitsloadSource (vips_fitsload_source) failed".to_string()),
4014        )
4015    }
4016
4017    /// VipsForeignLoadFitsSource (fitsload_source), load FITS from a source, nocache, priority=-50, untrusted, is_a, is_a_source, get_flags, get_flags_filename, header, load
4018    /// returns `VipsImage` - Output image
4019    ///
4020    /// source: `&VipsSource` -> Source to load from
4021    ///
4022    /// <ins>Optional arguments</ins>
4023    ///
4024    /// flags: [`ForeignFlags`] -> Flags for this file
4025    ///
4026    /// memory: `bool` -> Force open via memory
4027    ///
4028    /// access: [`Access`] -> Required access pattern for this file
4029    ///
4030    /// fail_on: [`FailOn`] -> Error level to fail on
4031    ///
4032    /// revalidate: `bool` -> Don't use a cached result for this operation
4033    pub fn fitsload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
4034        let mut out_out = VipsImage::from(null_mut());
4035        let vips_op_response = call(
4036            "fitsload_source",
4037            option
4038                .set(
4039                    "source",
4040                    source,
4041                )
4042                .set(
4043                    "out",
4044                    &mut out_out,
4045                ),
4046        )?;
4047        utils::result(
4048            vips_op_response,
4049            out_out,
4050            Error::OperationError("FitsloadSource (vips_fitsload_source) failed".to_string()),
4051        )
4052    }
4053
4054    /// VipsForeignSaveFits (fitssave), save image to fits file, nocache (.fits, .fit, .fts), priority=0, untrusted,
4055    ///
4056    /// filename: `&str` -> Filename to save to
4057    pub fn fitssave(&self, filename: &str) -> Result<()> {
4058        let vips_op_response = call(
4059            "fitssave",
4060            VOption::new()
4061                .set("in", self)
4062                .set(
4063                    "filename",
4064                    filename,
4065                ),
4066        )?;
4067        utils::result(
4068            vips_op_response,
4069            (),
4070            Error::OperationError("Fitssave (vips_fitssave) failed".to_string()),
4071        )
4072    }
4073
4074    /// VipsForeignSaveFits (fitssave), save image to fits file, nocache (.fits, .fit, .fts), priority=0, untrusted,
4075    ///
4076    /// filename: `&str` -> Filename to save to
4077    ///
4078    /// <ins>Optional arguments</ins>
4079    ///
4080    /// keep: [`ForeignKeep`] -> Which metadata to retain
4081    ///
4082    /// background: `&[f64]` -> Background value
4083    ///
4084    /// page_height: `i32` -> Set page height for multipage save
4085    ///
4086    /// profile: `&str` -> Filename of ICC profile to embed
4087    pub fn fitssave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
4088        let vips_op_response = call(
4089            "fitssave",
4090            option
4091                .set("in", self)
4092                .set(
4093                    "filename",
4094                    filename,
4095                ),
4096        )?;
4097        utils::result(
4098            vips_op_response,
4099            (),
4100            Error::OperationError("Fitssave (vips_fitssave) failed".to_string()),
4101        )
4102    }
4103
4104    /// VipsFlatten (flatten), flatten alpha out of an image
4105    /// returns `VipsImage` - Output image
4106    pub fn flatten(&self) -> Result<VipsImage> {
4107        let mut out_out = VipsImage::from(null_mut());
4108        let vips_op_response = call(
4109            "flatten",
4110            VOption::new()
4111                .set("in", self)
4112                .set(
4113                    "out",
4114                    &mut out_out,
4115                ),
4116        )?;
4117        utils::result(
4118            vips_op_response,
4119            out_out,
4120            Error::OperationError("Flatten (vips_flatten) failed".to_string()),
4121        )
4122    }
4123
4124    /// VipsFlatten (flatten), flatten alpha out of an image
4125    /// returns `VipsImage` - Output image
4126    ///
4127    /// <ins>Optional arguments</ins>
4128    ///
4129    /// background: `&[f64]` -> Background value
4130    ///
4131    /// max_alpha: `f64` -> Maximum value of alpha channel
4132    pub fn flatten_with_opts(&self, option: VOption) -> Result<VipsImage> {
4133        let mut out_out = VipsImage::from(null_mut());
4134        let vips_op_response = call(
4135            "flatten",
4136            option
4137                .set("in", self)
4138                .set(
4139                    "out",
4140                    &mut out_out,
4141                ),
4142        )?;
4143        utils::result(
4144            vips_op_response,
4145            out_out,
4146            Error::OperationError("Flatten (vips_flatten) failed".to_string()),
4147        )
4148    }
4149
4150    /// VipsFlip (flip), flip an image
4151    /// returns `VipsImage` - Output image
4152    ///
4153    /// direction: `Direction` -> Direction to flip image
4154    pub fn flip(&self, direction: Direction) -> Result<VipsImage> {
4155        let mut out_out = VipsImage::from(null_mut());
4156        let vips_op_response = call(
4157            "flip",
4158            VOption::new()
4159                .set("in", self)
4160                .set(
4161                    "out",
4162                    &mut out_out,
4163                )
4164                .set(
4165                    "direction",
4166                    direction as i32,
4167                ),
4168        )?;
4169        utils::result(
4170            vips_op_response,
4171            out_out,
4172            Error::OperationError("Flip (vips_flip) failed".to_string()),
4173        )
4174    }
4175
4176    /// VipsFloat2rad (float2rad), transform float RGB to Radiance coding
4177    /// returns `VipsImage` - Output image
4178    pub fn float2rad(&self) -> Result<VipsImage> {
4179        let mut out_out = VipsImage::from(null_mut());
4180        let vips_op_response = call(
4181            "float2rad",
4182            VOption::new()
4183                .set("in", self)
4184                .set(
4185                    "out",
4186                    &mut out_out,
4187                ),
4188        )?;
4189        utils::result(
4190            vips_op_response,
4191            out_out,
4192            Error::OperationError("Float2Rad (vips_float2rad) failed".to_string()),
4193        )
4194    }
4195
4196    /// VipsFractsurf (fractsurf), make a fractal surface
4197    /// returns `VipsImage` - Output image
4198    ///
4199    /// width: `i32` -> Image width in pixels
4200    ///
4201    /// height: `i32` -> Image height in pixels
4202    ///
4203    /// fractal_dimension: `f64` -> Fractal dimension
4204    pub fn fractsurf(width: i32, height: i32, fractal_dimension: f64) -> Result<VipsImage> {
4205        let mut out_out = VipsImage::from(null_mut());
4206        let vips_op_response = call(
4207            "fractsurf",
4208            VOption::new()
4209                .set(
4210                    "out",
4211                    &mut out_out,
4212                )
4213                .set(
4214                    "width",
4215                    width,
4216                )
4217                .set(
4218                    "height",
4219                    height,
4220                )
4221                .set(
4222                    "fractal_dimension",
4223                    fractal_dimension,
4224                ),
4225        )?;
4226        utils::result(
4227            vips_op_response,
4228            out_out,
4229            Error::OperationError("Fractsurf (vips_fractsurf) failed".to_string()),
4230        )
4231    }
4232
4233    /// VipsFreqmult (freqmult), frequency-domain filtering
4234    /// returns `VipsImage` - Output image
4235    ///
4236    /// mask: `&VipsImage` -> Input mask image
4237    pub fn freqmult(&self, mask: &VipsImage) -> Result<VipsImage> {
4238        let mut out_out = VipsImage::from(null_mut());
4239        let vips_op_response = call(
4240            "freqmult",
4241            VOption::new()
4242                .set("in", self)
4243                .set(
4244                    "mask",
4245                    mask,
4246                )
4247                .set(
4248                    "out",
4249                    &mut out_out,
4250                ),
4251        )?;
4252        utils::result(
4253            vips_op_response,
4254            out_out,
4255            Error::OperationError("Freqmult (vips_freqmult) failed".to_string()),
4256        )
4257    }
4258
4259    /// VipsFwfft (fwfft), forward FFT
4260    /// returns `VipsImage` - Output image
4261    pub fn fwfft(&self) -> Result<VipsImage> {
4262        let mut out_out = VipsImage::from(null_mut());
4263        let vips_op_response = call(
4264            "fwfft",
4265            VOption::new()
4266                .set("in", self)
4267                .set(
4268                    "out",
4269                    &mut out_out,
4270                ),
4271        )?;
4272        utils::result(
4273            vips_op_response,
4274            out_out,
4275            Error::OperationError("Fwfft (vips_fwfft) failed".to_string()),
4276        )
4277    }
4278
4279    /// VipsGamma (gamma), gamma an image
4280    /// returns `VipsImage` - Output image
4281    pub fn gamma(&self) -> Result<VipsImage> {
4282        let mut out_out = VipsImage::from(null_mut());
4283        let vips_op_response = call(
4284            "gamma",
4285            VOption::new()
4286                .set("in", self)
4287                .set(
4288                    "out",
4289                    &mut out_out,
4290                ),
4291        )?;
4292        utils::result(
4293            vips_op_response,
4294            out_out,
4295            Error::OperationError("Gamma (vips_gamma) failed".to_string()),
4296        )
4297    }
4298
4299    /// VipsGamma (gamma), gamma an image
4300    /// returns `VipsImage` - Output image
4301    ///
4302    /// <ins>Optional arguments</ins>
4303    ///
4304    /// exponent: `f64` -> Gamma factor
4305    pub fn gamma_with_opts(&self, option: VOption) -> Result<VipsImage> {
4306        let mut out_out = VipsImage::from(null_mut());
4307        let vips_op_response = call(
4308            "gamma",
4309            option
4310                .set("in", self)
4311                .set(
4312                    "out",
4313                    &mut out_out,
4314                ),
4315        )?;
4316        utils::result(
4317            vips_op_response,
4318            out_out,
4319            Error::OperationError("Gamma (vips_gamma) failed".to_string()),
4320        )
4321    }
4322
4323    /// VipsGaussblur (gaussblur), gaussian blur
4324    /// returns `VipsImage` - Output image
4325    ///
4326    /// sigma: `f64` -> Sigma of Gaussian
4327    pub fn gaussblur(&self, sigma: f64) -> Result<VipsImage> {
4328        let mut out_out = VipsImage::from(null_mut());
4329        let vips_op_response = call(
4330            "gaussblur",
4331            VOption::new()
4332                .set("in", self)
4333                .set(
4334                    "out",
4335                    &mut out_out,
4336                )
4337                .set(
4338                    "sigma",
4339                    sigma,
4340                ),
4341        )?;
4342        utils::result(
4343            vips_op_response,
4344            out_out,
4345            Error::OperationError("Gaussblur (vips_gaussblur) failed".to_string()),
4346        )
4347    }
4348
4349    /// VipsGaussblur (gaussblur), gaussian blur
4350    /// returns `VipsImage` - Output image
4351    ///
4352    /// sigma: `f64` -> Sigma of Gaussian
4353    ///
4354    /// <ins>Optional arguments</ins>
4355    ///
4356    /// min_ampl: `f64` -> Minimum amplitude of Gaussian
4357    ///
4358    /// precision: [`Precision`] -> Convolve with this precision
4359    pub fn gaussblur_with_opts(&self, sigma: f64, option: VOption) -> Result<VipsImage> {
4360        let mut out_out = VipsImage::from(null_mut());
4361        let vips_op_response = call(
4362            "gaussblur",
4363            option
4364                .set("in", self)
4365                .set(
4366                    "out",
4367                    &mut out_out,
4368                )
4369                .set(
4370                    "sigma",
4371                    sigma,
4372                ),
4373        )?;
4374        utils::result(
4375            vips_op_response,
4376            out_out,
4377            Error::OperationError("Gaussblur (vips_gaussblur) failed".to_string()),
4378        )
4379    }
4380
4381    /// VipsGaussmat (gaussmat), make a gaussian image
4382    /// returns `VipsImage` - Output image
4383    ///
4384    /// sigma: `f64` -> Sigma of Gaussian
4385    ///
4386    /// min_ampl: `f64` -> Minimum amplitude of Gaussian
4387    pub fn gaussmat(sigma: f64, min_ampl: f64) -> Result<VipsImage> {
4388        let mut out_out = VipsImage::from(null_mut());
4389        let vips_op_response = call(
4390            "gaussmat",
4391            VOption::new()
4392                .set(
4393                    "out",
4394                    &mut out_out,
4395                )
4396                .set(
4397                    "sigma",
4398                    sigma,
4399                )
4400                .set(
4401                    "min_ampl",
4402                    min_ampl,
4403                ),
4404        )?;
4405        utils::result(
4406            vips_op_response,
4407            out_out,
4408            Error::OperationError("Gaussmat (vips_gaussmat) failed".to_string()),
4409        )
4410    }
4411
4412    /// VipsGaussmat (gaussmat), make a gaussian image
4413    /// returns `VipsImage` - Output image
4414    ///
4415    /// sigma: `f64` -> Sigma of Gaussian
4416    ///
4417    /// min_ampl: `f64` -> Minimum amplitude of Gaussian
4418    ///
4419    /// <ins>Optional arguments</ins>
4420    ///
4421    /// separable: `bool` -> Generate separable Gaussian
4422    ///
4423    /// precision: [`Precision`] -> Generate with this precision
4424    pub fn gaussmat_with_opts(sigma: f64, min_ampl: f64, option: VOption) -> Result<VipsImage> {
4425        let mut out_out = VipsImage::from(null_mut());
4426        let vips_op_response = call(
4427            "gaussmat",
4428            option
4429                .set(
4430                    "out",
4431                    &mut out_out,
4432                )
4433                .set(
4434                    "sigma",
4435                    sigma,
4436                )
4437                .set(
4438                    "min_ampl",
4439                    min_ampl,
4440                ),
4441        )?;
4442        utils::result(
4443            vips_op_response,
4444            out_out,
4445            Error::OperationError("Gaussmat (vips_gaussmat) failed".to_string()),
4446        )
4447    }
4448
4449    /// VipsGaussnoise (gaussnoise), make a gaussnoise image, nocache
4450    /// returns `VipsImage` - Output image
4451    ///
4452    /// width: `i32` -> Image width in pixels
4453    ///
4454    /// height: `i32` -> Image height in pixels
4455    pub fn gaussnoise(width: i32, height: i32) -> Result<VipsImage> {
4456        let mut out_out = VipsImage::from(null_mut());
4457        let vips_op_response = call(
4458            "gaussnoise",
4459            VOption::new()
4460                .set(
4461                    "out",
4462                    &mut out_out,
4463                )
4464                .set(
4465                    "width",
4466                    width,
4467                )
4468                .set(
4469                    "height",
4470                    height,
4471                ),
4472        )?;
4473        utils::result(
4474            vips_op_response,
4475            out_out,
4476            Error::OperationError("Gaussnoise (vips_gaussnoise) failed".to_string()),
4477        )
4478    }
4479
4480    /// VipsGaussnoise (gaussnoise), make a gaussnoise image, nocache
4481    /// returns `VipsImage` - Output image
4482    ///
4483    /// width: `i32` -> Image width in pixels
4484    ///
4485    /// height: `i32` -> Image height in pixels
4486    ///
4487    /// <ins>Optional arguments</ins>
4488    ///
4489    /// sigma: `f64` -> Standard deviation of pixels in generated image
4490    ///
4491    /// mean: `f64` -> Mean of pixels in generated image
4492    ///
4493    /// seed: `i32` -> Random number seed
4494    pub fn gaussnoise_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
4495        let mut out_out = VipsImage::from(null_mut());
4496        let vips_op_response = call(
4497            "gaussnoise",
4498            option
4499                .set(
4500                    "out",
4501                    &mut out_out,
4502                )
4503                .set(
4504                    "width",
4505                    width,
4506                )
4507                .set(
4508                    "height",
4509                    height,
4510                ),
4511        )?;
4512        utils::result(
4513            vips_op_response,
4514            out_out,
4515            Error::OperationError("Gaussnoise (vips_gaussnoise) failed".to_string()),
4516        )
4517    }
4518
4519    /// VipsGetpoint (getpoint), read a point from an image
4520    /// returns `Vec<f64>` - Array of output values
4521    ///
4522    /// x: `i32` -> Point to read
4523    ///
4524    /// y: `i32` -> Point to read
4525    pub fn getpoint(&self, x: i32, y: i32) -> Result<Vec<f64>> {
4526        let mut out_array_out: Vec<f64> = Vec::new();
4527        let vips_op_response = call(
4528            "getpoint",
4529            VOption::new()
4530                .set("in", self)
4531                .set(
4532                    "out_array",
4533                    &mut out_array_out,
4534                )
4535                .set("x", x)
4536                .set("y", y),
4537        )?;
4538        utils::result(
4539            vips_op_response,
4540            out_array_out,
4541            Error::OperationError("Getpoint (vips_getpoint) failed".to_string()),
4542        )
4543    }
4544
4545    /// VipsGetpoint (getpoint), read a point from an image
4546    /// returns `Vec<f64>` - Array of output values
4547    ///
4548    /// x: `i32` -> Point to read
4549    ///
4550    /// y: `i32` -> Point to read
4551    ///
4552    /// <ins>Optional arguments</ins>
4553    ///
4554    /// unpack_complex: `bool` -> Complex pixels should be unpacked
4555    pub fn getpoint_with_opts(&self, x: i32, y: i32, option: VOption) -> Result<Vec<f64>> {
4556        let mut out_array_out: Vec<f64> = Vec::new();
4557        let vips_op_response = call(
4558            "getpoint",
4559            option
4560                .set("in", self)
4561                .set(
4562                    "out_array",
4563                    &mut out_array_out,
4564                )
4565                .set("x", x)
4566                .set("y", y),
4567        )?;
4568        utils::result(
4569            vips_op_response,
4570            out_array_out,
4571            Error::OperationError("Getpoint (vips_getpoint) failed".to_string()),
4572        )
4573    }
4574
4575    /// VipsForeignLoadNsgifFile (gifload), load GIF with libnsgif (.gif), priority=50, is_a, get_flags, get_flags_filename, header, load
4576    /// returns `VipsImage` - Output image
4577    ///
4578    /// filename: `&str` -> Filename to load from
4579    pub fn gifload(filename: &str) -> Result<VipsImage> {
4580        let mut out_out = VipsImage::from(null_mut());
4581        let vips_op_response = call(
4582            "gifload",
4583            VOption::new()
4584                .set(
4585                    "filename",
4586                    filename,
4587                )
4588                .set(
4589                    "out",
4590                    &mut out_out,
4591                ),
4592        )?;
4593        utils::result(
4594            vips_op_response,
4595            out_out,
4596            Error::OperationError("Gifload (vips_gifload) failed".to_string()),
4597        )
4598    }
4599
4600    /// VipsForeignLoadNsgifFile (gifload), load GIF with libnsgif (.gif), priority=50, is_a, get_flags, get_flags_filename, header, load
4601    /// returns `VipsImage` - Output image
4602    ///
4603    /// filename: `&str` -> Filename to load from
4604    ///
4605    /// <ins>Optional arguments</ins>
4606    ///
4607    /// n: `i32` -> Number of pages to load, -1 for all
4608    ///
4609    /// page: `i32` -> First page to load
4610    ///
4611    /// flags: [`ForeignFlags`] -> Flags for this file
4612    ///
4613    /// memory: `bool` -> Force open via memory
4614    ///
4615    /// access: [`Access`] -> Required access pattern for this file
4616    ///
4617    /// fail_on: [`FailOn`] -> Error level to fail on
4618    ///
4619    /// revalidate: `bool` -> Don't use a cached result for this operation
4620    pub fn gifload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
4621        let mut out_out = VipsImage::from(null_mut());
4622        let vips_op_response = call(
4623            "gifload",
4624            option
4625                .set(
4626                    "filename",
4627                    filename,
4628                )
4629                .set(
4630                    "out",
4631                    &mut out_out,
4632                ),
4633        )?;
4634        utils::result(
4635            vips_op_response,
4636            out_out,
4637            Error::OperationError("Gifload (vips_gifload) failed".to_string()),
4638        )
4639    }
4640
4641    /// VipsForeignLoadNsgifBuffer (gifload_buffer), load GIF with libnsgif, priority=50, is_a_buffer, get_flags, get_flags_filename, header, load
4642    /// returns `VipsImage` - Output image
4643    ///
4644    /// buffer: `&[u8]` -> Buffer to load from
4645    pub fn gifload_buffer(buffer: &[u8]) -> Result<VipsImage> {
4646        let mut out_out = VipsImage::from(null_mut());
4647        let vips_op_response = call(
4648            "gifload_buffer",
4649            VOption::new()
4650                .set(
4651                    "buffer",
4652                    buffer,
4653                )
4654                .set(
4655                    "out",
4656                    &mut out_out,
4657                ),
4658        )?;
4659        utils::result(
4660            vips_op_response,
4661            out_out,
4662            Error::OperationError("GifloadBuffer (vips_gifload_buffer) failed".to_string()),
4663        )
4664    }
4665
4666    /// VipsForeignLoadNsgifBuffer (gifload_buffer), load GIF with libnsgif, priority=50, is_a_buffer, get_flags, get_flags_filename, header, load
4667    /// returns `VipsImage` - Output image
4668    ///
4669    /// buffer: `&[u8]` -> Buffer to load from
4670    ///
4671    /// <ins>Optional arguments</ins>
4672    ///
4673    /// n: `i32` -> Number of pages to load, -1 for all
4674    ///
4675    /// page: `i32` -> First page to load
4676    ///
4677    /// flags: [`ForeignFlags`] -> Flags for this file
4678    ///
4679    /// memory: `bool` -> Force open via memory
4680    ///
4681    /// access: [`Access`] -> Required access pattern for this file
4682    ///
4683    /// fail_on: [`FailOn`] -> Error level to fail on
4684    ///
4685    /// revalidate: `bool` -> Don't use a cached result for this operation
4686    pub fn gifload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
4687        let mut out_out = VipsImage::from(null_mut());
4688        let vips_op_response = call(
4689            "gifload_buffer",
4690            option
4691                .set(
4692                    "buffer",
4693                    buffer,
4694                )
4695                .set(
4696                    "out",
4697                    &mut out_out,
4698                ),
4699        )?;
4700        utils::result(
4701            vips_op_response,
4702            out_out,
4703            Error::OperationError("GifloadBuffer (vips_gifload_buffer) failed".to_string()),
4704        )
4705    }
4706
4707    /// VipsForeignLoadNsgifSource (gifload_source), load gif from source, nocache, priority=50, is_a_source, get_flags, get_flags_filename, header, load
4708    /// returns `VipsImage` - Output image
4709    ///
4710    /// source: `&VipsSource` -> Source to load from
4711    pub fn gifload_source(source: &VipsSource) -> Result<VipsImage> {
4712        let mut out_out = VipsImage::from(null_mut());
4713        let vips_op_response = call(
4714            "gifload_source",
4715            VOption::new()
4716                .set(
4717                    "source",
4718                    source,
4719                )
4720                .set(
4721                    "out",
4722                    &mut out_out,
4723                ),
4724        )?;
4725        utils::result(
4726            vips_op_response,
4727            out_out,
4728            Error::OperationError("GifloadSource (vips_gifload_source) failed".to_string()),
4729        )
4730    }
4731
4732    /// VipsForeignLoadNsgifSource (gifload_source), load gif from source, nocache, priority=50, is_a_source, get_flags, get_flags_filename, header, load
4733    /// returns `VipsImage` - Output image
4734    ///
4735    /// source: `&VipsSource` -> Source to load from
4736    ///
4737    /// <ins>Optional arguments</ins>
4738    ///
4739    /// n: `i32` -> Number of pages to load, -1 for all
4740    ///
4741    /// page: `i32` -> First page to load
4742    ///
4743    /// flags: [`ForeignFlags`] -> Flags for this file
4744    ///
4745    /// memory: `bool` -> Force open via memory
4746    ///
4747    /// access: [`Access`] -> Required access pattern for this file
4748    ///
4749    /// fail_on: [`FailOn`] -> Error level to fail on
4750    ///
4751    /// revalidate: `bool` -> Don't use a cached result for this operation
4752    pub fn gifload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
4753        let mut out_out = VipsImage::from(null_mut());
4754        let vips_op_response = call(
4755            "gifload_source",
4756            option
4757                .set(
4758                    "source",
4759                    source,
4760                )
4761                .set(
4762                    "out",
4763                    &mut out_out,
4764                ),
4765        )?;
4766        utils::result(
4767            vips_op_response,
4768            out_out,
4769            Error::OperationError("GifloadSource (vips_gifload_source) failed".to_string()),
4770        )
4771    }
4772
4773    /// VipsForeignSaveCgifFile (gifsave), save as gif, nocache (.gif), priority=0, rgb alpha
4774    ///
4775    /// filename: `&str` -> Filename to save to
4776    pub fn gifsave(&self, filename: &str) -> Result<()> {
4777        let vips_op_response = call(
4778            "gifsave",
4779            VOption::new()
4780                .set("in", self)
4781                .set(
4782                    "filename",
4783                    filename,
4784                ),
4785        )?;
4786        utils::result(
4787            vips_op_response,
4788            (),
4789            Error::OperationError("Gifsave (vips_gifsave) failed".to_string()),
4790        )
4791    }
4792
4793    /// VipsForeignSaveCgifFile (gifsave), save as gif, nocache (.gif), priority=0, rgb alpha
4794    ///
4795    /// filename: `&str` -> Filename to save to
4796    ///
4797    /// <ins>Optional arguments</ins>
4798    ///
4799    /// dither: `f64` -> Amount of dithering
4800    ///
4801    /// effort: `i32` -> Quantisation effort
4802    ///
4803    /// bitdepth: `i32` -> Number of bits per pixel
4804    ///
4805    /// interframe_maxerror: `f64` -> Maximum inter-frame error for transparency
4806    ///
4807    /// reuse: `bool` -> Reuse palette from input
4808    ///
4809    /// interpalette_maxerror: `f64` -> Maximum inter-palette error for palette reusage
4810    ///
4811    /// interlace: `bool` -> Generate an interlaced (progressive) GIF
4812    ///
4813    /// keep_duplicate_frames: `bool` -> Keep duplicate frames in the output instead of combining them
4814    ///
4815    /// keep: [`ForeignKeep`] -> Which metadata to retain
4816    ///
4817    /// background: `&[f64]` -> Background value
4818    ///
4819    /// page_height: `i32` -> Set page height for multipage save
4820    ///
4821    /// profile: `&str` -> Filename of ICC profile to embed
4822    pub fn gifsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
4823        let vips_op_response = call(
4824            "gifsave",
4825            option
4826                .set("in", self)
4827                .set(
4828                    "filename",
4829                    filename,
4830                ),
4831        )?;
4832        utils::result(
4833            vips_op_response,
4834            (),
4835            Error::OperationError("Gifsave (vips_gifsave) failed".to_string()),
4836        )
4837    }
4838
4839    /// VipsForeignSaveCgifBuffer (gifsave_buffer), save as gif, nocache (.gif), priority=0, rgb alpha
4840    /// returns `Vec<u8>` - Buffer to save to
4841    pub fn gifsave_buffer(&self) -> Result<Vec<u8>> {
4842        let mut buffer_out = Vec::new();
4843        let vips_op_response = call(
4844            "gifsave_buffer",
4845            VOption::new()
4846                .set("in", self)
4847                .set(
4848                    "buffer",
4849                    &mut buffer_out,
4850                ),
4851        )?;
4852        utils::result(
4853            vips_op_response,
4854            buffer_out,
4855            Error::OperationError("GifsaveBuffer (vips_gifsave_buffer) failed".to_string()),
4856        )
4857    }
4858
4859    /// VipsForeignSaveCgifBuffer (gifsave_buffer), save as gif, nocache (.gif), priority=0, rgb alpha
4860    /// returns `Vec<u8>` - Buffer to save to
4861    ///
4862    /// <ins>Optional arguments</ins>
4863    ///
4864    /// dither: `f64` -> Amount of dithering
4865    ///
4866    /// effort: `i32` -> Quantisation effort
4867    ///
4868    /// bitdepth: `i32` -> Number of bits per pixel
4869    ///
4870    /// interframe_maxerror: `f64` -> Maximum inter-frame error for transparency
4871    ///
4872    /// reuse: `bool` -> Reuse palette from input
4873    ///
4874    /// interpalette_maxerror: `f64` -> Maximum inter-palette error for palette reusage
4875    ///
4876    /// interlace: `bool` -> Generate an interlaced (progressive) GIF
4877    ///
4878    /// keep_duplicate_frames: `bool` -> Keep duplicate frames in the output instead of combining them
4879    ///
4880    /// keep: [`ForeignKeep`] -> Which metadata to retain
4881    ///
4882    /// background: `&[f64]` -> Background value
4883    ///
4884    /// page_height: `i32` -> Set page height for multipage save
4885    ///
4886    /// profile: `&str` -> Filename of ICC profile to embed
4887    pub fn gifsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
4888        let mut buffer_out = Vec::new();
4889        let vips_op_response = call(
4890            "gifsave_buffer",
4891            option
4892                .set("in", self)
4893                .set(
4894                    "buffer",
4895                    &mut buffer_out,
4896                ),
4897        )?;
4898        utils::result(
4899            vips_op_response,
4900            buffer_out,
4901            Error::OperationError("GifsaveBuffer (vips_gifsave_buffer) failed".to_string()),
4902        )
4903    }
4904
4905    /// VipsForeignSaveCgifTarget (gifsave_target), save as gif, nocache (.gif), priority=0, rgb alpha
4906    ///
4907    /// target: `&VipsTarget` -> Target to save to
4908    pub fn gifsave_target(&self, target: &VipsTarget) -> Result<()> {
4909        let vips_op_response = call(
4910            "gifsave_target",
4911            VOption::new()
4912                .set("in", self)
4913                .set(
4914                    "target",
4915                    target,
4916                ),
4917        )?;
4918        utils::result(
4919            vips_op_response,
4920            (),
4921            Error::OperationError("GifsaveTarget (vips_gifsave_target) failed".to_string()),
4922        )
4923    }
4924
4925    /// VipsForeignSaveCgifTarget (gifsave_target), save as gif, nocache (.gif), priority=0, rgb alpha
4926    ///
4927    /// target: `&VipsTarget` -> Target to save to
4928    ///
4929    /// <ins>Optional arguments</ins>
4930    ///
4931    /// dither: `f64` -> Amount of dithering
4932    ///
4933    /// effort: `i32` -> Quantisation effort
4934    ///
4935    /// bitdepth: `i32` -> Number of bits per pixel
4936    ///
4937    /// interframe_maxerror: `f64` -> Maximum inter-frame error for transparency
4938    ///
4939    /// reuse: `bool` -> Reuse palette from input
4940    ///
4941    /// interpalette_maxerror: `f64` -> Maximum inter-palette error for palette reusage
4942    ///
4943    /// interlace: `bool` -> Generate an interlaced (progressive) GIF
4944    ///
4945    /// keep_duplicate_frames: `bool` -> Keep duplicate frames in the output instead of combining them
4946    ///
4947    /// keep: [`ForeignKeep`] -> Which metadata to retain
4948    ///
4949    /// background: `&[f64]` -> Background value
4950    ///
4951    /// page_height: `i32` -> Set page height for multipage save
4952    ///
4953    /// profile: `&str` -> Filename of ICC profile to embed
4954    pub fn gifsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
4955        let vips_op_response = call(
4956            "gifsave_target",
4957            option
4958                .set("in", self)
4959                .set(
4960                    "target",
4961                    target,
4962                ),
4963        )?;
4964        utils::result(
4965            vips_op_response,
4966            (),
4967            Error::OperationError("GifsaveTarget (vips_gifsave_target) failed".to_string()),
4968        )
4969    }
4970
4971    /// VipsGlobalbalance (globalbalance), global balance an image mosaic
4972    /// returns `VipsImage` - Output image
4973    pub fn globalbalance(&self) -> Result<VipsImage> {
4974        let mut out_out = VipsImage::from(null_mut());
4975        let vips_op_response = call(
4976            "globalbalance",
4977            VOption::new()
4978                .set("in", self)
4979                .set(
4980                    "out",
4981                    &mut out_out,
4982                ),
4983        )?;
4984        utils::result(
4985            vips_op_response,
4986            out_out,
4987            Error::OperationError("Globalbalance (vips_globalbalance) failed".to_string()),
4988        )
4989    }
4990
4991    /// VipsGlobalbalance (globalbalance), global balance an image mosaic
4992    /// returns `VipsImage` - Output image
4993    ///
4994    /// <ins>Optional arguments</ins>
4995    ///
4996    /// gamma: `f64` -> Image gamma
4997    ///
4998    /// int_output: `bool` -> Integer output
4999    pub fn globalbalance_with_opts(&self, option: VOption) -> Result<VipsImage> {
5000        let mut out_out = VipsImage::from(null_mut());
5001        let vips_op_response = call(
5002            "globalbalance",
5003            option
5004                .set("in", self)
5005                .set(
5006                    "out",
5007                    &mut out_out,
5008                ),
5009        )?;
5010        utils::result(
5011            vips_op_response,
5012            out_out,
5013            Error::OperationError("Globalbalance (vips_globalbalance) failed".to_string()),
5014        )
5015    }
5016
5017    /// VipsGravity (gravity), place an image within a larger image with a certain gravity
5018    /// returns `VipsImage` - Output image
5019    ///
5020    /// direction: `CompassDirection` -> Direction to place image within width/height
5021    ///
5022    /// width: `i32` -> Image width in pixels
5023    ///
5024    /// height: `i32` -> Image height in pixels
5025    pub fn gravity(
5026        &self,
5027        direction: CompassDirection,
5028        width: i32,
5029        height: i32,
5030    ) -> Result<VipsImage> {
5031        let mut out_out = VipsImage::from(null_mut());
5032        let vips_op_response = call(
5033            "gravity",
5034            VOption::new()
5035                .set("in", self)
5036                .set(
5037                    "out",
5038                    &mut out_out,
5039                )
5040                .set(
5041                    "direction",
5042                    direction as i32,
5043                )
5044                .set(
5045                    "width",
5046                    width,
5047                )
5048                .set(
5049                    "height",
5050                    height,
5051                ),
5052        )?;
5053        utils::result(
5054            vips_op_response,
5055            out_out,
5056            Error::OperationError("Gravity (vips_gravity) failed".to_string()),
5057        )
5058    }
5059
5060    /// VipsGravity (gravity), place an image within a larger image with a certain gravity
5061    /// returns `VipsImage` - Output image
5062    ///
5063    /// direction: `CompassDirection` -> Direction to place image within width/height
5064    ///
5065    /// width: `i32` -> Image width in pixels
5066    ///
5067    /// height: `i32` -> Image height in pixels
5068    ///
5069    /// <ins>Optional arguments</ins>
5070    ///
5071    /// extend: [`Extend`] -> How to generate the extra pixels
5072    ///
5073    /// background: `&[f64]` -> Color for background pixels
5074    pub fn gravity_with_opts(
5075        &self,
5076        direction: CompassDirection,
5077        width: i32,
5078        height: i32,
5079        option: VOption,
5080    ) -> Result<VipsImage> {
5081        let mut out_out = VipsImage::from(null_mut());
5082        let vips_op_response = call(
5083            "gravity",
5084            option
5085                .set("in", self)
5086                .set(
5087                    "out",
5088                    &mut out_out,
5089                )
5090                .set(
5091                    "direction",
5092                    direction as i32,
5093                )
5094                .set(
5095                    "width",
5096                    width,
5097                )
5098                .set(
5099                    "height",
5100                    height,
5101                ),
5102        )?;
5103        utils::result(
5104            vips_op_response,
5105            out_out,
5106            Error::OperationError("Gravity (vips_gravity) failed".to_string()),
5107        )
5108    }
5109
5110    /// VipsGrey (grey), make a grey ramp image
5111    /// returns `VipsImage` - Output image
5112    ///
5113    /// width: `i32` -> Image width in pixels
5114    ///
5115    /// height: `i32` -> Image height in pixels
5116    pub fn grey(width: i32, height: i32) -> Result<VipsImage> {
5117        let mut out_out = VipsImage::from(null_mut());
5118        let vips_op_response = call(
5119            "grey",
5120            VOption::new()
5121                .set(
5122                    "out",
5123                    &mut out_out,
5124                )
5125                .set(
5126                    "width",
5127                    width,
5128                )
5129                .set(
5130                    "height",
5131                    height,
5132                ),
5133        )?;
5134        utils::result(
5135            vips_op_response,
5136            out_out,
5137            Error::OperationError("Grey (vips_grey) failed".to_string()),
5138        )
5139    }
5140
5141    /// VipsGrey (grey), make a grey ramp image
5142    /// returns `VipsImage` - Output image
5143    ///
5144    /// width: `i32` -> Image width in pixels
5145    ///
5146    /// height: `i32` -> Image height in pixels
5147    ///
5148    /// <ins>Optional arguments</ins>
5149    ///
5150    /// uchar: `bool` -> Output an unsigned char image
5151    pub fn grey_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
5152        let mut out_out = VipsImage::from(null_mut());
5153        let vips_op_response = call(
5154            "grey",
5155            option
5156                .set(
5157                    "out",
5158                    &mut out_out,
5159                )
5160                .set(
5161                    "width",
5162                    width,
5163                )
5164                .set(
5165                    "height",
5166                    height,
5167                ),
5168        )?;
5169        utils::result(
5170            vips_op_response,
5171            out_out,
5172            Error::OperationError("Grey (vips_grey) failed".to_string()),
5173        )
5174    }
5175
5176    /// VipsGrid (grid), grid an image
5177    /// returns `VipsImage` - Output image
5178    ///
5179    /// tile_height: `i32` -> Chop into tiles this high
5180    ///
5181    /// across: `i32` -> Number of tiles across
5182    ///
5183    /// down: `i32` -> Number of tiles down
5184    pub fn grid(&self, tile_height: i32, across: i32, down: i32) -> Result<VipsImage> {
5185        let mut out_out = VipsImage::from(null_mut());
5186        let vips_op_response = call(
5187            "grid",
5188            VOption::new()
5189                .set("in", self)
5190                .set(
5191                    "out",
5192                    &mut out_out,
5193                )
5194                .set(
5195                    "tile_height",
5196                    tile_height,
5197                )
5198                .set(
5199                    "across",
5200                    across,
5201                )
5202                .set(
5203                    "down",
5204                    down,
5205                ),
5206        )?;
5207        utils::result(
5208            vips_op_response,
5209            out_out,
5210            Error::OperationError("Grid (vips_grid) failed".to_string()),
5211        )
5212    }
5213
5214    /// VipsForeignLoadHeifFile (heifload), load a HEIF image (.heic, .heif, .avif), priority=0, is_a, get_flags, header, load
5215    /// returns `VipsImage` - Output image
5216    ///
5217    /// filename: `&str` -> Filename to load from
5218    pub fn heifload(filename: &str) -> Result<VipsImage> {
5219        let mut out_out = VipsImage::from(null_mut());
5220        let vips_op_response = call(
5221            "heifload",
5222            VOption::new()
5223                .set(
5224                    "filename",
5225                    filename,
5226                )
5227                .set(
5228                    "out",
5229                    &mut out_out,
5230                ),
5231        )?;
5232        utils::result(
5233            vips_op_response,
5234            out_out,
5235            Error::OperationError("Heifload (vips_heifload) failed".to_string()),
5236        )
5237    }
5238
5239    /// VipsForeignLoadHeifFile (heifload), load a HEIF image (.heic, .heif, .avif), priority=0, is_a, get_flags, header, load
5240    /// returns `VipsImage` - Output image
5241    ///
5242    /// filename: `&str` -> Filename to load from
5243    ///
5244    /// <ins>Optional arguments</ins>
5245    ///
5246    /// page: `i32` -> First page to load
5247    ///
5248    /// n: `i32` -> Number of pages to load, -1 for all
5249    ///
5250    /// thumbnail: `bool` -> Fetch thumbnail image
5251    ///
5252    /// unlimited: `bool` -> Remove all denial of service limits
5253    ///
5254    /// flags: [`ForeignFlags`] -> Flags for this file
5255    ///
5256    /// memory: `bool` -> Force open via memory
5257    ///
5258    /// access: [`Access`] -> Required access pattern for this file
5259    ///
5260    /// fail_on: [`FailOn`] -> Error level to fail on
5261    ///
5262    /// revalidate: `bool` -> Don't use a cached result for this operation
5263    pub fn heifload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
5264        let mut out_out = VipsImage::from(null_mut());
5265        let vips_op_response = call(
5266            "heifload",
5267            option
5268                .set(
5269                    "filename",
5270                    filename,
5271                )
5272                .set(
5273                    "out",
5274                    &mut out_out,
5275                ),
5276        )?;
5277        utils::result(
5278            vips_op_response,
5279            out_out,
5280            Error::OperationError("Heifload (vips_heifload) failed".to_string()),
5281        )
5282    }
5283
5284    /// VipsForeignLoadHeifBuffer (heifload_buffer), load a HEIF image, priority=0, is_a_buffer, get_flags, header, load
5285    /// returns `VipsImage` - Output image
5286    ///
5287    /// buffer: `&[u8]` -> Buffer to load from
5288    pub fn heifload_buffer(buffer: &[u8]) -> Result<VipsImage> {
5289        let mut out_out = VipsImage::from(null_mut());
5290        let vips_op_response = call(
5291            "heifload_buffer",
5292            VOption::new()
5293                .set(
5294                    "buffer",
5295                    buffer,
5296                )
5297                .set(
5298                    "out",
5299                    &mut out_out,
5300                ),
5301        )?;
5302        utils::result(
5303            vips_op_response,
5304            out_out,
5305            Error::OperationError("HeifloadBuffer (vips_heifload_buffer) failed".to_string()),
5306        )
5307    }
5308
5309    /// VipsForeignLoadHeifBuffer (heifload_buffer), load a HEIF image, priority=0, is_a_buffer, get_flags, header, load
5310    /// returns `VipsImage` - Output image
5311    ///
5312    /// buffer: `&[u8]` -> Buffer to load from
5313    ///
5314    /// <ins>Optional arguments</ins>
5315    ///
5316    /// page: `i32` -> First page to load
5317    ///
5318    /// n: `i32` -> Number of pages to load, -1 for all
5319    ///
5320    /// thumbnail: `bool` -> Fetch thumbnail image
5321    ///
5322    /// unlimited: `bool` -> Remove all denial of service limits
5323    ///
5324    /// flags: [`ForeignFlags`] -> Flags for this file
5325    ///
5326    /// memory: `bool` -> Force open via memory
5327    ///
5328    /// access: [`Access`] -> Required access pattern for this file
5329    ///
5330    /// fail_on: [`FailOn`] -> Error level to fail on
5331    ///
5332    /// revalidate: `bool` -> Don't use a cached result for this operation
5333    pub fn heifload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
5334        let mut out_out = VipsImage::from(null_mut());
5335        let vips_op_response = call(
5336            "heifload_buffer",
5337            option
5338                .set(
5339                    "buffer",
5340                    buffer,
5341                )
5342                .set(
5343                    "out",
5344                    &mut out_out,
5345                ),
5346        )?;
5347        utils::result(
5348            vips_op_response,
5349            out_out,
5350            Error::OperationError("HeifloadBuffer (vips_heifload_buffer) failed".to_string()),
5351        )
5352    }
5353
5354    /// VipsForeignLoadHeifSource (heifload_source), load a HEIF image, nocache, priority=0, is_a_source, get_flags, header, load
5355    /// returns `VipsImage` - Output image
5356    ///
5357    /// source: `&VipsSource` -> Source to load from
5358    pub fn heifload_source(source: &VipsSource) -> Result<VipsImage> {
5359        let mut out_out = VipsImage::from(null_mut());
5360        let vips_op_response = call(
5361            "heifload_source",
5362            VOption::new()
5363                .set(
5364                    "source",
5365                    source,
5366                )
5367                .set(
5368                    "out",
5369                    &mut out_out,
5370                ),
5371        )?;
5372        utils::result(
5373            vips_op_response,
5374            out_out,
5375            Error::OperationError("HeifloadSource (vips_heifload_source) failed".to_string()),
5376        )
5377    }
5378
5379    /// VipsForeignLoadHeifSource (heifload_source), load a HEIF image, nocache, priority=0, is_a_source, get_flags, header, load
5380    /// returns `VipsImage` - Output image
5381    ///
5382    /// source: `&VipsSource` -> Source to load from
5383    ///
5384    /// <ins>Optional arguments</ins>
5385    ///
5386    /// page: `i32` -> First page to load
5387    ///
5388    /// n: `i32` -> Number of pages to load, -1 for all
5389    ///
5390    /// thumbnail: `bool` -> Fetch thumbnail image
5391    ///
5392    /// unlimited: `bool` -> Remove all denial of service limits
5393    ///
5394    /// flags: [`ForeignFlags`] -> Flags for this file
5395    ///
5396    /// memory: `bool` -> Force open via memory
5397    ///
5398    /// access: [`Access`] -> Required access pattern for this file
5399    ///
5400    /// fail_on: [`FailOn`] -> Error level to fail on
5401    ///
5402    /// revalidate: `bool` -> Don't use a cached result for this operation
5403    pub fn heifload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
5404        let mut out_out = VipsImage::from(null_mut());
5405        let vips_op_response = call(
5406            "heifload_source",
5407            option
5408                .set(
5409                    "source",
5410                    source,
5411                )
5412                .set(
5413                    "out",
5414                    &mut out_out,
5415                ),
5416        )?;
5417        utils::result(
5418            vips_op_response,
5419            out_out,
5420            Error::OperationError("HeifloadSource (vips_heifload_source) failed".to_string()),
5421        )
5422    }
5423
5424    /// VipsForeignSaveHeifFile (heifsave), save image in HEIF format, nocache (.heic, .heif, .avif), priority=0, rgb alpha
5425    ///
5426    /// filename: `&str` -> Filename to save to
5427    pub fn heifsave(&self, filename: &str) -> Result<()> {
5428        let vips_op_response = call(
5429            "heifsave",
5430            VOption::new()
5431                .set("in", self)
5432                .set(
5433                    "filename",
5434                    filename,
5435                ),
5436        )?;
5437        utils::result(
5438            vips_op_response,
5439            (),
5440            Error::OperationError("Heifsave (vips_heifsave) failed".to_string()),
5441        )
5442    }
5443
5444    /// VipsForeignSaveHeifFile (heifsave), save image in HEIF format, nocache (.heic, .heif, .avif), priority=0, rgb alpha
5445    ///
5446    /// filename: `&str` -> Filename to save to
5447    ///
5448    /// <ins>Optional arguments</ins>
5449    ///
5450    /// Q: `i32` -> Q factor
5451    ///
5452    /// bitdepth: `i32` -> Number of bits per pixel
5453    ///
5454    /// lossless: `bool` -> Enable lossless compression
5455    ///
5456    /// compression: [`ForeignHeifCompression`] -> Compression format
5457    ///
5458    /// effort: `i32` -> CPU effort
5459    ///
5460    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
5461    ///
5462    /// encoder: [`ForeignHeifEncoder`] -> Select encoder to use
5463    ///
5464    /// tune: `&str` -> Tuning parameters
5465    ///
5466    /// keep: [`ForeignKeep`] -> Which metadata to retain
5467    ///
5468    /// background: `&[f64]` -> Background value
5469    ///
5470    /// page_height: `i32` -> Set page height for multipage save
5471    ///
5472    /// profile: `&str` -> Filename of ICC profile to embed
5473    pub fn heifsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
5474        let vips_op_response = call(
5475            "heifsave",
5476            option
5477                .set("in", self)
5478                .set(
5479                    "filename",
5480                    filename,
5481                ),
5482        )?;
5483        utils::result(
5484            vips_op_response,
5485            (),
5486            Error::OperationError("Heifsave (vips_heifsave) failed".to_string()),
5487        )
5488    }
5489
5490    /// VipsForeignSaveHeifBuffer (heifsave_buffer), save image in HEIF format, nocache (.heic, .heif), priority=0, rgb alpha
5491    /// returns `Vec<u8>` - Buffer to save to
5492    pub fn heifsave_buffer(&self) -> Result<Vec<u8>> {
5493        let mut buffer_out = Vec::new();
5494        let vips_op_response = call(
5495            "heifsave_buffer",
5496            VOption::new()
5497                .set("in", self)
5498                .set(
5499                    "buffer",
5500                    &mut buffer_out,
5501                ),
5502        )?;
5503        utils::result(
5504            vips_op_response,
5505            buffer_out,
5506            Error::OperationError("HeifsaveBuffer (vips_heifsave_buffer) failed".to_string()),
5507        )
5508    }
5509
5510    /// VipsForeignSaveHeifBuffer (heifsave_buffer), save image in HEIF format, nocache (.heic, .heif), priority=0, rgb alpha
5511    /// returns `Vec<u8>` - Buffer to save to
5512    ///
5513    /// <ins>Optional arguments</ins>
5514    ///
5515    /// Q: `i32` -> Q factor
5516    ///
5517    /// bitdepth: `i32` -> Number of bits per pixel
5518    ///
5519    /// lossless: `bool` -> Enable lossless compression
5520    ///
5521    /// compression: [`ForeignHeifCompression`] -> Compression format
5522    ///
5523    /// effort: `i32` -> CPU effort
5524    ///
5525    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
5526    ///
5527    /// encoder: [`ForeignHeifEncoder`] -> Select encoder to use
5528    ///
5529    /// tune: `&str` -> Tuning parameters
5530    ///
5531    /// keep: [`ForeignKeep`] -> Which metadata to retain
5532    ///
5533    /// background: `&[f64]` -> Background value
5534    ///
5535    /// page_height: `i32` -> Set page height for multipage save
5536    ///
5537    /// profile: `&str` -> Filename of ICC profile to embed
5538    pub fn heifsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
5539        let mut buffer_out = Vec::new();
5540        let vips_op_response = call(
5541            "heifsave_buffer",
5542            option
5543                .set("in", self)
5544                .set(
5545                    "buffer",
5546                    &mut buffer_out,
5547                ),
5548        )?;
5549        utils::result(
5550            vips_op_response,
5551            buffer_out,
5552            Error::OperationError("HeifsaveBuffer (vips_heifsave_buffer) failed".to_string()),
5553        )
5554    }
5555
5556    /// VipsForeignSaveHeifTarget (heifsave_target), save image in HEIF format, nocache (.heic, .heif), priority=0, rgb alpha
5557    ///
5558    /// target: `&VipsTarget` -> Target to save to
5559    pub fn heifsave_target(&self, target: &VipsTarget) -> Result<()> {
5560        let vips_op_response = call(
5561            "heifsave_target",
5562            VOption::new()
5563                .set("in", self)
5564                .set(
5565                    "target",
5566                    target,
5567                ),
5568        )?;
5569        utils::result(
5570            vips_op_response,
5571            (),
5572            Error::OperationError("HeifsaveTarget (vips_heifsave_target) failed".to_string()),
5573        )
5574    }
5575
5576    /// VipsForeignSaveHeifTarget (heifsave_target), save image in HEIF format, nocache (.heic, .heif), priority=0, rgb alpha
5577    ///
5578    /// target: `&VipsTarget` -> Target to save to
5579    ///
5580    /// <ins>Optional arguments</ins>
5581    ///
5582    /// Q: `i32` -> Q factor
5583    ///
5584    /// bitdepth: `i32` -> Number of bits per pixel
5585    ///
5586    /// lossless: `bool` -> Enable lossless compression
5587    ///
5588    /// compression: [`ForeignHeifCompression`] -> Compression format
5589    ///
5590    /// effort: `i32` -> CPU effort
5591    ///
5592    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
5593    ///
5594    /// encoder: [`ForeignHeifEncoder`] -> Select encoder to use
5595    ///
5596    /// tune: `&str` -> Tuning parameters
5597    ///
5598    /// keep: [`ForeignKeep`] -> Which metadata to retain
5599    ///
5600    /// background: `&[f64]` -> Background value
5601    ///
5602    /// page_height: `i32` -> Set page height for multipage save
5603    ///
5604    /// profile: `&str` -> Filename of ICC profile to embed
5605    pub fn heifsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
5606        let vips_op_response = call(
5607            "heifsave_target",
5608            option
5609                .set("in", self)
5610                .set(
5611                    "target",
5612                    target,
5613                ),
5614        )?;
5615        utils::result(
5616            vips_op_response,
5617            (),
5618            Error::OperationError("HeifsaveTarget (vips_heifsave_target) failed".to_string()),
5619        )
5620    }
5621
5622    /// VipsHistCum (hist_cum), form cumulative histogram
5623    /// returns `VipsImage` - Output image
5624    pub fn hist_cum(&self) -> Result<VipsImage> {
5625        let mut out_out = VipsImage::from(null_mut());
5626        let vips_op_response = call(
5627            "hist_cum",
5628            VOption::new()
5629                .set("in", self)
5630                .set(
5631                    "out",
5632                    &mut out_out,
5633                ),
5634        )?;
5635        utils::result(
5636            vips_op_response,
5637            out_out,
5638            Error::OperationError("HistCum (vips_hist_cum) failed".to_string()),
5639        )
5640    }
5641
5642    /// VipsHistEntropy (hist_entropy), estimate image entropy
5643    /// returns `f64` - Output value
5644    pub fn hist_entropy(&self) -> Result<f64> {
5645        let mut out_out: f64 = 0.0;
5646        let vips_op_response = call(
5647            "hist_entropy",
5648            VOption::new()
5649                .set("in", self)
5650                .set(
5651                    "out",
5652                    &mut out_out,
5653                ),
5654        )?;
5655        utils::result(
5656            vips_op_response,
5657            out_out,
5658            Error::OperationError("HistEntropy (vips_hist_entropy) failed".to_string()),
5659        )
5660    }
5661
5662    /// VipsHistEqual (hist_equal), histogram equalisation
5663    /// returns `VipsImage` - Output image
5664    pub fn hist_equal(&self) -> Result<VipsImage> {
5665        let mut out_out = VipsImage::from(null_mut());
5666        let vips_op_response = call(
5667            "hist_equal",
5668            VOption::new()
5669                .set("in", self)
5670                .set(
5671                    "out",
5672                    &mut out_out,
5673                ),
5674        )?;
5675        utils::result(
5676            vips_op_response,
5677            out_out,
5678            Error::OperationError("HistEqual (vips_hist_equal) failed".to_string()),
5679        )
5680    }
5681
5682    /// VipsHistEqual (hist_equal), histogram equalisation
5683    /// returns `VipsImage` - Output image
5684    ///
5685    /// <ins>Optional arguments</ins>
5686    ///
5687    /// band: `i32` -> Equalise with this band
5688    pub fn hist_equal_with_opts(&self, option: VOption) -> Result<VipsImage> {
5689        let mut out_out = VipsImage::from(null_mut());
5690        let vips_op_response = call(
5691            "hist_equal",
5692            option
5693                .set("in", self)
5694                .set(
5695                    "out",
5696                    &mut out_out,
5697                ),
5698        )?;
5699        utils::result(
5700            vips_op_response,
5701            out_out,
5702            Error::OperationError("HistEqual (vips_hist_equal) failed".to_string()),
5703        )
5704    }
5705
5706    /// VipsHistFind (hist_find), find image histogram
5707    /// returns `VipsImage` - Output histogram
5708    pub fn hist_find(&self) -> Result<VipsImage> {
5709        let mut out_out = VipsImage::from(null_mut());
5710        let vips_op_response = call(
5711            "hist_find",
5712            VOption::new()
5713                .set("in", self)
5714                .set(
5715                    "out",
5716                    &mut out_out,
5717                ),
5718        )?;
5719        utils::result(
5720            vips_op_response,
5721            out_out,
5722            Error::OperationError("HistFind (vips_hist_find) failed".to_string()),
5723        )
5724    }
5725
5726    /// VipsHistFind (hist_find), find image histogram
5727    /// returns `VipsImage` - Output histogram
5728    ///
5729    /// <ins>Optional arguments</ins>
5730    ///
5731    /// band: `i32` -> Find histogram of band
5732    pub fn hist_find_with_opts(&self, option: VOption) -> Result<VipsImage> {
5733        let mut out_out = VipsImage::from(null_mut());
5734        let vips_op_response = call(
5735            "hist_find",
5736            option
5737                .set("in", self)
5738                .set(
5739                    "out",
5740                    &mut out_out,
5741                ),
5742        )?;
5743        utils::result(
5744            vips_op_response,
5745            out_out,
5746            Error::OperationError("HistFind (vips_hist_find) failed".to_string()),
5747        )
5748    }
5749
5750    /// VipsHistFindIndexed (hist_find_indexed), find indexed image histogram
5751    /// returns `VipsImage` - Output histogram
5752    ///
5753    /// index: `&VipsImage` -> Index image
5754    pub fn hist_find_indexed(&self, index: &VipsImage) -> Result<VipsImage> {
5755        let mut out_out = VipsImage::from(null_mut());
5756        let vips_op_response = call(
5757            "hist_find_indexed",
5758            VOption::new()
5759                .set("in", self)
5760                .set(
5761                    "index",
5762                    index,
5763                )
5764                .set(
5765                    "out",
5766                    &mut out_out,
5767                ),
5768        )?;
5769        utils::result(
5770            vips_op_response,
5771            out_out,
5772            Error::OperationError("HistFindIndexed (vips_hist_find_indexed) failed".to_string()),
5773        )
5774    }
5775
5776    /// VipsHistFindIndexed (hist_find_indexed), find indexed image histogram
5777    /// returns `VipsImage` - Output histogram
5778    ///
5779    /// index: `&VipsImage` -> Index image
5780    ///
5781    /// <ins>Optional arguments</ins>
5782    ///
5783    /// combine: [`Combine`] -> Combine bins like this
5784    pub fn hist_find_indexed_with_opts(
5785        &self,
5786        index: &VipsImage,
5787        option: VOption,
5788    ) -> Result<VipsImage> {
5789        let mut out_out = VipsImage::from(null_mut());
5790        let vips_op_response = call(
5791            "hist_find_indexed",
5792            option
5793                .set("in", self)
5794                .set(
5795                    "index",
5796                    index,
5797                )
5798                .set(
5799                    "out",
5800                    &mut out_out,
5801                ),
5802        )?;
5803        utils::result(
5804            vips_op_response,
5805            out_out,
5806            Error::OperationError("HistFindIndexed (vips_hist_find_indexed) failed".to_string()),
5807        )
5808    }
5809
5810    /// VipsHistFindNDim (hist_find_ndim), find n-dimensional image histogram
5811    /// returns `VipsImage` - Output histogram
5812    pub fn hist_find_ndim(&self) -> Result<VipsImage> {
5813        let mut out_out = VipsImage::from(null_mut());
5814        let vips_op_response = call(
5815            "hist_find_ndim",
5816            VOption::new()
5817                .set("in", self)
5818                .set(
5819                    "out",
5820                    &mut out_out,
5821                ),
5822        )?;
5823        utils::result(
5824            vips_op_response,
5825            out_out,
5826            Error::OperationError("HistFindNdim (vips_hist_find_ndim) failed".to_string()),
5827        )
5828    }
5829
5830    /// VipsHistFindNDim (hist_find_ndim), find n-dimensional image histogram
5831    /// returns `VipsImage` - Output histogram
5832    ///
5833    /// <ins>Optional arguments</ins>
5834    ///
5835    /// bins: `i32` -> Number of bins in each dimension
5836    pub fn hist_find_ndim_with_opts(&self, option: VOption) -> Result<VipsImage> {
5837        let mut out_out = VipsImage::from(null_mut());
5838        let vips_op_response = call(
5839            "hist_find_ndim",
5840            option
5841                .set("in", self)
5842                .set(
5843                    "out",
5844                    &mut out_out,
5845                ),
5846        )?;
5847        utils::result(
5848            vips_op_response,
5849            out_out,
5850            Error::OperationError("HistFindNdim (vips_hist_find_ndim) failed".to_string()),
5851        )
5852    }
5853
5854    /// VipsHistIsmonotonic (hist_ismonotonic), test for monotonicity
5855    /// returns `bool` - true if in is monotonic
5856    pub fn hist_ismonotonic(&self) -> Result<bool> {
5857        let mut monotonic_out: bool = false;
5858        let vips_op_response = call(
5859            "hist_ismonotonic",
5860            VOption::new()
5861                .set("in", self)
5862                .set(
5863                    "monotonic",
5864                    &mut monotonic_out,
5865                ),
5866        )?;
5867        utils::result(
5868            vips_op_response,
5869            monotonic_out,
5870            Error::OperationError("HistIsmonotonic (vips_hist_ismonotonic) failed".to_string()),
5871        )
5872    }
5873
5874    /// VipsHistLocal (hist_local), local histogram equalisation
5875    /// returns `VipsImage` - Output image
5876    ///
5877    /// width: `i32` -> Window width in pixels
5878    ///
5879    /// height: `i32` -> Window height in pixels
5880    pub fn hist_local(&self, width: i32, height: i32) -> Result<VipsImage> {
5881        let mut out_out = VipsImage::from(null_mut());
5882        let vips_op_response = call(
5883            "hist_local",
5884            VOption::new()
5885                .set("in", self)
5886                .set(
5887                    "out",
5888                    &mut out_out,
5889                )
5890                .set(
5891                    "width",
5892                    width,
5893                )
5894                .set(
5895                    "height",
5896                    height,
5897                ),
5898        )?;
5899        utils::result(
5900            vips_op_response,
5901            out_out,
5902            Error::OperationError("HistLocal (vips_hist_local) failed".to_string()),
5903        )
5904    }
5905
5906    /// VipsHistLocal (hist_local), local histogram equalisation
5907    /// returns `VipsImage` - Output image
5908    ///
5909    /// width: `i32` -> Window width in pixels
5910    ///
5911    /// height: `i32` -> Window height in pixels
5912    ///
5913    /// <ins>Optional arguments</ins>
5914    ///
5915    /// max_slope: `i32` -> Maximum slope (CLAHE)
5916    pub fn hist_local_with_opts(
5917        &self,
5918        width: i32,
5919        height: i32,
5920        option: VOption,
5921    ) -> Result<VipsImage> {
5922        let mut out_out = VipsImage::from(null_mut());
5923        let vips_op_response = call(
5924            "hist_local",
5925            option
5926                .set("in", self)
5927                .set(
5928                    "out",
5929                    &mut out_out,
5930                )
5931                .set(
5932                    "width",
5933                    width,
5934                )
5935                .set(
5936                    "height",
5937                    height,
5938                ),
5939        )?;
5940        utils::result(
5941            vips_op_response,
5942            out_out,
5943            Error::OperationError("HistLocal (vips_hist_local) failed".to_string()),
5944        )
5945    }
5946
5947    /// VipsHistMatch (hist_match), match two histograms
5948    /// returns `VipsImage` - Output image
5949    ///
5950    /// refp: `&VipsImage` -> Reference histogram
5951    pub fn hist_match(&self, refp: &VipsImage) -> Result<VipsImage> {
5952        let mut out_out = VipsImage::from(null_mut());
5953        let vips_op_response = call(
5954            "hist_match",
5955            VOption::new()
5956                .set("in", self)
5957                .set(
5958                    "ref", refp,
5959                )
5960                .set(
5961                    "out",
5962                    &mut out_out,
5963                ),
5964        )?;
5965        utils::result(
5966            vips_op_response,
5967            out_out,
5968            Error::OperationError("HistMatch (vips_hist_match) failed".to_string()),
5969        )
5970    }
5971
5972    /// VipsHistNorm (hist_norm), normalise histogram
5973    /// returns `VipsImage` - Output image
5974    pub fn hist_norm(&self) -> Result<VipsImage> {
5975        let mut out_out = VipsImage::from(null_mut());
5976        let vips_op_response = call(
5977            "hist_norm",
5978            VOption::new()
5979                .set("in", self)
5980                .set(
5981                    "out",
5982                    &mut out_out,
5983                ),
5984        )?;
5985        utils::result(
5986            vips_op_response,
5987            out_out,
5988            Error::OperationError("HistNorm (vips_hist_norm) failed".to_string()),
5989        )
5990    }
5991
5992    /// VipsHistPlot (hist_plot), plot histogram
5993    /// returns `VipsImage` - Output image
5994    pub fn hist_plot(&self) -> Result<VipsImage> {
5995        let mut out_out = VipsImage::from(null_mut());
5996        let vips_op_response = call(
5997            "hist_plot",
5998            VOption::new()
5999                .set("in", self)
6000                .set(
6001                    "out",
6002                    &mut out_out,
6003                ),
6004        )?;
6005        utils::result(
6006            vips_op_response,
6007            out_out,
6008            Error::OperationError("HistPlot (vips_hist_plot) failed".to_string()),
6009        )
6010    }
6011
6012    /// VipsHoughCircle (hough_circle), find hough circle transform
6013    /// returns `VipsImage` - Output image
6014    pub fn hough_circle(&self) -> Result<VipsImage> {
6015        let mut out_out = VipsImage::from(null_mut());
6016        let vips_op_response = call(
6017            "hough_circle",
6018            VOption::new()
6019                .set("in", self)
6020                .set(
6021                    "out",
6022                    &mut out_out,
6023                ),
6024        )?;
6025        utils::result(
6026            vips_op_response,
6027            out_out,
6028            Error::OperationError("HoughCircle (vips_hough_circle) failed".to_string()),
6029        )
6030    }
6031
6032    /// VipsHoughCircle (hough_circle), find hough circle transform
6033    /// returns `VipsImage` - Output image
6034    ///
6035    /// <ins>Optional arguments</ins>
6036    ///
6037    /// scale: `i32` -> Scale down dimensions by this factor
6038    ///
6039    /// min_radius: `i32` -> Smallest radius to search for
6040    ///
6041    /// max_radius: `i32` -> Largest radius to search for
6042    pub fn hough_circle_with_opts(&self, option: VOption) -> Result<VipsImage> {
6043        let mut out_out = VipsImage::from(null_mut());
6044        let vips_op_response = call(
6045            "hough_circle",
6046            option
6047                .set("in", self)
6048                .set(
6049                    "out",
6050                    &mut out_out,
6051                ),
6052        )?;
6053        utils::result(
6054            vips_op_response,
6055            out_out,
6056            Error::OperationError("HoughCircle (vips_hough_circle) failed".to_string()),
6057        )
6058    }
6059
6060    /// VipsHoughLine (hough_line), find hough line transform
6061    /// returns `VipsImage` - Output image
6062    pub fn hough_line(&self) -> Result<VipsImage> {
6063        let mut out_out = VipsImage::from(null_mut());
6064        let vips_op_response = call(
6065            "hough_line",
6066            VOption::new()
6067                .set("in", self)
6068                .set(
6069                    "out",
6070                    &mut out_out,
6071                ),
6072        )?;
6073        utils::result(
6074            vips_op_response,
6075            out_out,
6076            Error::OperationError("HoughLine (vips_hough_line) failed".to_string()),
6077        )
6078    }
6079
6080    /// VipsHoughLine (hough_line), find hough line transform
6081    /// returns `VipsImage` - Output image
6082    ///
6083    /// <ins>Optional arguments</ins>
6084    ///
6085    /// width: `i32` -> Horizontal size of parameter space
6086    ///
6087    /// height: `i32` -> Vertical size of parameter space
6088    pub fn hough_line_with_opts(&self, option: VOption) -> Result<VipsImage> {
6089        let mut out_out = VipsImage::from(null_mut());
6090        let vips_op_response = call(
6091            "hough_line",
6092            option
6093                .set("in", self)
6094                .set(
6095                    "out",
6096                    &mut out_out,
6097                ),
6098        )?;
6099        utils::result(
6100            vips_op_response,
6101            out_out,
6102            Error::OperationError("HoughLine (vips_hough_line) failed".to_string()),
6103        )
6104    }
6105
6106    /// VipsIccExport (icc_export), output to device with ICC profile
6107    /// returns `VipsImage` - Output image
6108    pub fn icc_export(&self) -> Result<VipsImage> {
6109        let mut out_out = VipsImage::from(null_mut());
6110        let vips_op_response = call(
6111            "icc_export",
6112            VOption::new()
6113                .set("in", self)
6114                .set(
6115                    "out",
6116                    &mut out_out,
6117                ),
6118        )?;
6119        utils::result(
6120            vips_op_response,
6121            out_out,
6122            Error::OperationError("IccExport (vips_icc_export) failed".to_string()),
6123        )
6124    }
6125
6126    /// VipsIccExport (icc_export), output to device with ICC profile
6127    /// returns `VipsImage` - Output image
6128    ///
6129    /// <ins>Optional arguments</ins>
6130    ///
6131    /// pcs: [`PCS`] -> Set Profile Connection Space
6132    ///
6133    /// intent: [`Intent`] -> Rendering intent
6134    ///
6135    /// black_point_compensation: `bool` -> Enable black point compensation
6136    ///
6137    /// output_profile: `&str` -> Filename to load output profile from
6138    ///
6139    /// depth: `i32` -> Output device space depth in bits
6140    pub fn icc_export_with_opts(&self, option: VOption) -> Result<VipsImage> {
6141        let mut out_out = VipsImage::from(null_mut());
6142        let vips_op_response = call(
6143            "icc_export",
6144            option
6145                .set("in", self)
6146                .set(
6147                    "out",
6148                    &mut out_out,
6149                ),
6150        )?;
6151        utils::result(
6152            vips_op_response,
6153            out_out,
6154            Error::OperationError("IccExport (vips_icc_export) failed".to_string()),
6155        )
6156    }
6157
6158    /// VipsIccImport (icc_import), import from device with ICC profile
6159    /// returns `VipsImage` - Output image
6160    pub fn icc_import(&self) -> Result<VipsImage> {
6161        let mut out_out = VipsImage::from(null_mut());
6162        let vips_op_response = call(
6163            "icc_import",
6164            VOption::new()
6165                .set("in", self)
6166                .set(
6167                    "out",
6168                    &mut out_out,
6169                ),
6170        )?;
6171        utils::result(
6172            vips_op_response,
6173            out_out,
6174            Error::OperationError("IccImport (vips_icc_import) failed".to_string()),
6175        )
6176    }
6177
6178    /// VipsIccImport (icc_import), import from device with ICC profile
6179    /// returns `VipsImage` - Output image
6180    ///
6181    /// <ins>Optional arguments</ins>
6182    ///
6183    /// pcs: [`PCS`] -> Set Profile Connection Space
6184    ///
6185    /// intent: [`Intent`] -> Rendering intent
6186    ///
6187    /// black_point_compensation: `bool` -> Enable black point compensation
6188    ///
6189    /// embedded: `bool` -> Use embedded input profile, if available
6190    ///
6191    /// input_profile: `&str` -> Filename to load input profile from
6192    pub fn icc_import_with_opts(&self, option: VOption) -> Result<VipsImage> {
6193        let mut out_out = VipsImage::from(null_mut());
6194        let vips_op_response = call(
6195            "icc_import",
6196            option
6197                .set("in", self)
6198                .set(
6199                    "out",
6200                    &mut out_out,
6201                ),
6202        )?;
6203        utils::result(
6204            vips_op_response,
6205            out_out,
6206            Error::OperationError("IccImport (vips_icc_import) failed".to_string()),
6207        )
6208    }
6209
6210    /// VipsIccTransform (icc_transform), transform between devices with ICC profiles
6211    /// returns `VipsImage` - Output image
6212    ///
6213    /// output_profile: `&str` -> Filename to load output profile from
6214    pub fn icc_transform(&self, output_profile: &str) -> Result<VipsImage> {
6215        let mut out_out = VipsImage::from(null_mut());
6216        let vips_op_response = call(
6217            "icc_transform",
6218            VOption::new()
6219                .set("in", self)
6220                .set(
6221                    "out",
6222                    &mut out_out,
6223                )
6224                .set(
6225                    "output_profile",
6226                    output_profile,
6227                ),
6228        )?;
6229        utils::result(
6230            vips_op_response,
6231            out_out,
6232            Error::OperationError("IccTransform (vips_icc_transform) failed".to_string()),
6233        )
6234    }
6235
6236    /// VipsIccTransform (icc_transform), transform between devices with ICC profiles
6237    /// returns `VipsImage` - Output image
6238    ///
6239    /// output_profile: `&str` -> Filename to load output profile from
6240    ///
6241    /// <ins>Optional arguments</ins>
6242    ///
6243    /// pcs: [`PCS`] -> Set Profile Connection Space
6244    ///
6245    /// intent: [`Intent`] -> Rendering intent
6246    ///
6247    /// black_point_compensation: `bool` -> Enable black point compensation
6248    ///
6249    /// embedded: `bool` -> Use embedded input profile, if available
6250    ///
6251    /// input_profile: `&str` -> Filename to load input profile from
6252    ///
6253    /// depth: `i32` -> Output device space depth in bits
6254    pub fn icc_transform_with_opts(
6255        &self,
6256        output_profile: &str,
6257        option: VOption,
6258    ) -> Result<VipsImage> {
6259        let mut out_out = VipsImage::from(null_mut());
6260        let vips_op_response = call(
6261            "icc_transform",
6262            option
6263                .set("in", self)
6264                .set(
6265                    "out",
6266                    &mut out_out,
6267                )
6268                .set(
6269                    "output_profile",
6270                    output_profile,
6271                ),
6272        )?;
6273        utils::result(
6274            vips_op_response,
6275            out_out,
6276            Error::OperationError("IccTransform (vips_icc_transform) failed".to_string()),
6277        )
6278    }
6279
6280    /// VipsIdentity (identity), make a 1D image where pixel values are indexes
6281    /// returns `VipsImage` - Output image
6282    pub fn identity() -> Result<VipsImage> {
6283        let mut out_out = VipsImage::from(null_mut());
6284        let vips_op_response = call(
6285            "identity",
6286            VOption::new().set(
6287                "out",
6288                &mut out_out,
6289            ),
6290        )?;
6291        utils::result(
6292            vips_op_response,
6293            out_out,
6294            Error::OperationError("Identity (vips_identity) failed".to_string()),
6295        )
6296    }
6297
6298    /// VipsIdentity (identity), make a 1D image where pixel values are indexes
6299    /// returns `VipsImage` - Output image
6300    ///
6301    /// <ins>Optional arguments</ins>
6302    ///
6303    /// bands: `i32` -> Number of bands in LUT
6304    ///
6305    /// ushort: `bool` -> Create a 16-bit LUT
6306    ///
6307    /// size: `i32` -> Size of 16-bit LUT
6308    pub fn identity_with_opts(option: VOption) -> Result<VipsImage> {
6309        let mut out_out = VipsImage::from(null_mut());
6310        let vips_op_response = call(
6311            "identity",
6312            option.set(
6313                "out",
6314                &mut out_out,
6315            ),
6316        )?;
6317        utils::result(
6318            vips_op_response,
6319            out_out,
6320            Error::OperationError("Identity (vips_identity) failed".to_string()),
6321        )
6322    }
6323
6324    /// VipsIfthenelse (ifthenelse), ifthenelse an image
6325    /// returns `VipsImage` - Output image
6326    ///
6327    /// in1: `&VipsImage` -> Source for TRUE pixels
6328    ///
6329    /// in2: `&VipsImage` -> Source for FALSE pixels
6330    pub fn ifthenelse(&self, in1: &VipsImage, in2: &VipsImage) -> Result<VipsImage> {
6331        let mut out_out = VipsImage::from(null_mut());
6332        let vips_op_response = call(
6333            "ifthenelse",
6334            VOption::new()
6335                .set(
6336                    "cond",
6337                    self,
6338                )
6339                .set("in1", in1)
6340                .set("in2", in2)
6341                .set(
6342                    "out",
6343                    &mut out_out,
6344                ),
6345        )?;
6346        utils::result(
6347            vips_op_response,
6348            out_out,
6349            Error::OperationError("Ifthenelse (vips_ifthenelse) failed".to_string()),
6350        )
6351    }
6352
6353    /// VipsIfthenelse (ifthenelse), ifthenelse an image
6354    /// returns `VipsImage` - Output image
6355    ///
6356    /// in1: `&VipsImage` -> Source for TRUE pixels
6357    ///
6358    /// in2: `&VipsImage` -> Source for FALSE pixels
6359    ///
6360    /// <ins>Optional arguments</ins>
6361    ///
6362    /// blend: `bool` -> Blend smoothly between then and else parts
6363    pub fn ifthenelse_with_opts(
6364        &self,
6365        in1: &VipsImage,
6366        in2: &VipsImage,
6367        option: VOption,
6368    ) -> Result<VipsImage> {
6369        let mut out_out = VipsImage::from(null_mut());
6370        let vips_op_response = call(
6371            "ifthenelse",
6372            option
6373                .set(
6374                    "cond",
6375                    self,
6376                )
6377                .set("in1", in1)
6378                .set("in2", in2)
6379                .set(
6380                    "out",
6381                    &mut out_out,
6382                ),
6383        )?;
6384        utils::result(
6385            vips_op_response,
6386            out_out,
6387            Error::OperationError("Ifthenelse (vips_ifthenelse) failed".to_string()),
6388        )
6389    }
6390
6391    /// VipsInsert (insert), insert image @sub into @main at @x, @y
6392    /// returns `VipsImage` - Output image
6393    ///
6394    /// sub: `&VipsImage` -> Sub-image to insert into main image
6395    ///
6396    /// x: `i32` -> Left edge of sub in main
6397    ///
6398    /// y: `i32` -> Top edge of sub in main
6399    pub fn insert(&self, sub: &VipsImage, x: i32, y: i32) -> Result<VipsImage> {
6400        let mut out_out = VipsImage::from(null_mut());
6401        let vips_op_response = call(
6402            "insert",
6403            VOption::new()
6404                .set(
6405                    "main",
6406                    self,
6407                )
6408                .set("sub", sub)
6409                .set(
6410                    "out",
6411                    &mut out_out,
6412                )
6413                .set("x", x)
6414                .set("y", y),
6415        )?;
6416        utils::result(
6417            vips_op_response,
6418            out_out,
6419            Error::OperationError("Insert (vips_insert) failed".to_string()),
6420        )
6421    }
6422
6423    /// VipsInsert (insert), insert image @sub into @main at @x, @y
6424    /// returns `VipsImage` - Output image
6425    ///
6426    /// sub: `&VipsImage` -> Sub-image to insert into main image
6427    ///
6428    /// x: `i32` -> Left edge of sub in main
6429    ///
6430    /// y: `i32` -> Top edge of sub in main
6431    ///
6432    /// <ins>Optional arguments</ins>
6433    ///
6434    /// expand: `bool` -> Expand output to hold all of both inputs
6435    ///
6436    /// background: `&[f64]` -> Color for new pixels
6437    pub fn insert_with_opts(
6438        &self,
6439        sub: &VipsImage,
6440        x: i32,
6441        y: i32,
6442        option: VOption,
6443    ) -> Result<VipsImage> {
6444        let mut out_out = VipsImage::from(null_mut());
6445        let vips_op_response = call(
6446            "insert",
6447            option
6448                .set(
6449                    "main",
6450                    self,
6451                )
6452                .set("sub", sub)
6453                .set(
6454                    "out",
6455                    &mut out_out,
6456                )
6457                .set("x", x)
6458                .set("y", y),
6459        )?;
6460        utils::result(
6461            vips_op_response,
6462            out_out,
6463            Error::OperationError("Insert (vips_insert) failed".to_string()),
6464        )
6465    }
6466
6467    /// VipsInvert (invert), invert an image
6468    /// returns `VipsImage` - Output image
6469    pub fn invert(&self) -> Result<VipsImage> {
6470        let mut out_out = VipsImage::from(null_mut());
6471        let vips_op_response = call(
6472            "invert",
6473            VOption::new()
6474                .set("in", self)
6475                .set(
6476                    "out",
6477                    &mut out_out,
6478                ),
6479        )?;
6480        utils::result(
6481            vips_op_response,
6482            out_out,
6483            Error::OperationError("Invert (vips_invert) failed".to_string()),
6484        )
6485    }
6486
6487    /// VipsInvertlut (invertlut), build an inverted look-up table
6488    /// returns `VipsImage` - Output image
6489    pub fn invertlut(&self) -> Result<VipsImage> {
6490        let mut out_out = VipsImage::from(null_mut());
6491        let vips_op_response = call(
6492            "invertlut",
6493            VOption::new()
6494                .set("in", self)
6495                .set(
6496                    "out",
6497                    &mut out_out,
6498                ),
6499        )?;
6500        utils::result(
6501            vips_op_response,
6502            out_out,
6503            Error::OperationError("Invertlut (vips_invertlut) failed".to_string()),
6504        )
6505    }
6506
6507    /// VipsInvertlut (invertlut), build an inverted look-up table
6508    /// returns `VipsImage` - Output image
6509    ///
6510    /// <ins>Optional arguments</ins>
6511    ///
6512    /// size: `i32` -> LUT size to generate
6513    pub fn invertlut_with_opts(&self, option: VOption) -> Result<VipsImage> {
6514        let mut out_out = VipsImage::from(null_mut());
6515        let vips_op_response = call(
6516            "invertlut",
6517            option
6518                .set("in", self)
6519                .set(
6520                    "out",
6521                    &mut out_out,
6522                ),
6523        )?;
6524        utils::result(
6525            vips_op_response,
6526            out_out,
6527            Error::OperationError("Invertlut (vips_invertlut) failed".to_string()),
6528        )
6529    }
6530
6531    /// VipsInvfft (invfft), inverse FFT
6532    /// returns `VipsImage` - Output image
6533    pub fn invfft(&self) -> Result<VipsImage> {
6534        let mut out_out = VipsImage::from(null_mut());
6535        let vips_op_response = call(
6536            "invfft",
6537            VOption::new()
6538                .set("in", self)
6539                .set(
6540                    "out",
6541                    &mut out_out,
6542                ),
6543        )?;
6544        utils::result(
6545            vips_op_response,
6546            out_out,
6547            Error::OperationError("Invfft (vips_invfft) failed".to_string()),
6548        )
6549    }
6550
6551    /// VipsInvfft (invfft), inverse FFT
6552    /// returns `VipsImage` - Output image
6553    ///
6554    /// <ins>Optional arguments</ins>
6555    ///
6556    /// real: `bool` -> Output only the real part of the transform
6557    pub fn invfft_with_opts(&self, option: VOption) -> Result<VipsImage> {
6558        let mut out_out = VipsImage::from(null_mut());
6559        let vips_op_response = call(
6560            "invfft",
6561            option
6562                .set("in", self)
6563                .set(
6564                    "out",
6565                    &mut out_out,
6566                ),
6567        )?;
6568        utils::result(
6569            vips_op_response,
6570            out_out,
6571            Error::OperationError("Invfft (vips_invfft) failed".to_string()),
6572        )
6573    }
6574
6575    /// VipsJoin (join), join a pair of images
6576    /// returns `VipsImage` - Output image
6577    ///
6578    /// in2: `&VipsImage` -> Second input image
6579    ///
6580    /// direction: `Direction` -> Join left-right or up-down
6581    pub fn join(&self, in2: &VipsImage, direction: Direction) -> Result<VipsImage> {
6582        let mut out_out = VipsImage::from(null_mut());
6583        let vips_op_response = call(
6584            "join",
6585            VOption::new()
6586                .set(
6587                    "in1", self,
6588                )
6589                .set("in2", in2)
6590                .set(
6591                    "out",
6592                    &mut out_out,
6593                )
6594                .set(
6595                    "direction",
6596                    direction as i32,
6597                ),
6598        )?;
6599        utils::result(
6600            vips_op_response,
6601            out_out,
6602            Error::OperationError("Join (vips_join) failed".to_string()),
6603        )
6604    }
6605
6606    /// VipsJoin (join), join a pair of images
6607    /// returns `VipsImage` - Output image
6608    ///
6609    /// in2: `&VipsImage` -> Second input image
6610    ///
6611    /// direction: `Direction` -> Join left-right or up-down
6612    ///
6613    /// <ins>Optional arguments</ins>
6614    ///
6615    /// expand: `bool` -> Expand output to hold all of both inputs
6616    ///
6617    /// shim: `i32` -> Pixels between images
6618    ///
6619    /// background: `&[f64]` -> Colour for new pixels
6620    ///
6621    /// align: [`Align`] -> Align on the low, centre or high coordinate edge
6622    pub fn join_with_opts(
6623        &self,
6624        in2: &VipsImage,
6625        direction: Direction,
6626        option: VOption,
6627    ) -> Result<VipsImage> {
6628        let mut out_out = VipsImage::from(null_mut());
6629        let vips_op_response = call(
6630            "join",
6631            option
6632                .set(
6633                    "in1", self,
6634                )
6635                .set("in2", in2)
6636                .set(
6637                    "out",
6638                    &mut out_out,
6639                )
6640                .set(
6641                    "direction",
6642                    direction as i32,
6643                ),
6644        )?;
6645        utils::result(
6646            vips_op_response,
6647            out_out,
6648            Error::OperationError("Join (vips_join) failed".to_string()),
6649        )
6650    }
6651
6652    /// VipsForeignLoadJp2kFile (jp2kload), load JPEG2000 image (.j2k, .jp2, .jpt, .j2c, .jpc), priority=0, untrusted, is_a, get_flags, header, load
6653    /// returns `VipsImage` - Output image
6654    ///
6655    /// filename: `&str` -> Filename to load from
6656    pub fn jp2kload(filename: &str) -> Result<VipsImage> {
6657        let mut out_out = VipsImage::from(null_mut());
6658        let vips_op_response = call(
6659            "jp2kload",
6660            VOption::new()
6661                .set(
6662                    "filename",
6663                    filename,
6664                )
6665                .set(
6666                    "out",
6667                    &mut out_out,
6668                ),
6669        )?;
6670        utils::result(
6671            vips_op_response,
6672            out_out,
6673            Error::OperationError("Jp2Kload (vips_jp2kload) failed".to_string()),
6674        )
6675    }
6676
6677    /// VipsForeignLoadJp2kFile (jp2kload), load JPEG2000 image (.j2k, .jp2, .jpt, .j2c, .jpc), priority=0, untrusted, is_a, get_flags, header, load
6678    /// returns `VipsImage` - Output image
6679    ///
6680    /// filename: `&str` -> Filename to load from
6681    ///
6682    /// <ins>Optional arguments</ins>
6683    ///
6684    /// page: `i32` -> Load this page from the image
6685    ///
6686    /// oneshot: `bool` -> Load images a frame at a time
6687    ///
6688    /// flags: [`ForeignFlags`] -> Flags for this file
6689    ///
6690    /// memory: `bool` -> Force open via memory
6691    ///
6692    /// access: [`Access`] -> Required access pattern for this file
6693    ///
6694    /// fail_on: [`FailOn`] -> Error level to fail on
6695    ///
6696    /// revalidate: `bool` -> Don't use a cached result for this operation
6697    pub fn jp2kload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
6698        let mut out_out = VipsImage::from(null_mut());
6699        let vips_op_response = call(
6700            "jp2kload",
6701            option
6702                .set(
6703                    "filename",
6704                    filename,
6705                )
6706                .set(
6707                    "out",
6708                    &mut out_out,
6709                ),
6710        )?;
6711        utils::result(
6712            vips_op_response,
6713            out_out,
6714            Error::OperationError("Jp2Kload (vips_jp2kload) failed".to_string()),
6715        )
6716    }
6717
6718    /// VipsForeignLoadJp2kBuffer (jp2kload_buffer), load JPEG2000 image, priority=0, untrusted, is_a_buffer, get_flags, header, load
6719    /// returns `VipsImage` - Output image
6720    ///
6721    /// buffer: `&[u8]` -> Buffer to load from
6722    pub fn jp2kload_buffer(buffer: &[u8]) -> Result<VipsImage> {
6723        let mut out_out = VipsImage::from(null_mut());
6724        let vips_op_response = call(
6725            "jp2kload_buffer",
6726            VOption::new()
6727                .set(
6728                    "buffer",
6729                    buffer,
6730                )
6731                .set(
6732                    "out",
6733                    &mut out_out,
6734                ),
6735        )?;
6736        utils::result(
6737            vips_op_response,
6738            out_out,
6739            Error::OperationError("Jp2KloadBuffer (vips_jp2kload_buffer) failed".to_string()),
6740        )
6741    }
6742
6743    /// VipsForeignLoadJp2kBuffer (jp2kload_buffer), load JPEG2000 image, priority=0, untrusted, is_a_buffer, get_flags, header, load
6744    /// returns `VipsImage` - Output image
6745    ///
6746    /// buffer: `&[u8]` -> Buffer to load from
6747    ///
6748    /// <ins>Optional arguments</ins>
6749    ///
6750    /// page: `i32` -> Load this page from the image
6751    ///
6752    /// oneshot: `bool` -> Load images a frame at a time
6753    ///
6754    /// flags: [`ForeignFlags`] -> Flags for this file
6755    ///
6756    /// memory: `bool` -> Force open via memory
6757    ///
6758    /// access: [`Access`] -> Required access pattern for this file
6759    ///
6760    /// fail_on: [`FailOn`] -> Error level to fail on
6761    ///
6762    /// revalidate: `bool` -> Don't use a cached result for this operation
6763    pub fn jp2kload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
6764        let mut out_out = VipsImage::from(null_mut());
6765        let vips_op_response = call(
6766            "jp2kload_buffer",
6767            option
6768                .set(
6769                    "buffer",
6770                    buffer,
6771                )
6772                .set(
6773                    "out",
6774                    &mut out_out,
6775                ),
6776        )?;
6777        utils::result(
6778            vips_op_response,
6779            out_out,
6780            Error::OperationError("Jp2KloadBuffer (vips_jp2kload_buffer) failed".to_string()),
6781        )
6782    }
6783
6784    /// VipsForeignLoadJp2kSource (jp2kload_source), load JPEG2000 image, nocache, priority=0, untrusted, is_a_source, get_flags, header, load
6785    /// returns `VipsImage` - Output image
6786    ///
6787    /// source: `&VipsSource` -> Source to load from
6788    pub fn jp2kload_source(source: &VipsSource) -> Result<VipsImage> {
6789        let mut out_out = VipsImage::from(null_mut());
6790        let vips_op_response = call(
6791            "jp2kload_source",
6792            VOption::new()
6793                .set(
6794                    "source",
6795                    source,
6796                )
6797                .set(
6798                    "out",
6799                    &mut out_out,
6800                ),
6801        )?;
6802        utils::result(
6803            vips_op_response,
6804            out_out,
6805            Error::OperationError("Jp2KloadSource (vips_jp2kload_source) failed".to_string()),
6806        )
6807    }
6808
6809    /// VipsForeignLoadJp2kSource (jp2kload_source), load JPEG2000 image, nocache, priority=0, untrusted, is_a_source, get_flags, header, load
6810    /// returns `VipsImage` - Output image
6811    ///
6812    /// source: `&VipsSource` -> Source to load from
6813    ///
6814    /// <ins>Optional arguments</ins>
6815    ///
6816    /// page: `i32` -> Load this page from the image
6817    ///
6818    /// oneshot: `bool` -> Load images a frame at a time
6819    ///
6820    /// flags: [`ForeignFlags`] -> Flags for this file
6821    ///
6822    /// memory: `bool` -> Force open via memory
6823    ///
6824    /// access: [`Access`] -> Required access pattern for this file
6825    ///
6826    /// fail_on: [`FailOn`] -> Error level to fail on
6827    ///
6828    /// revalidate: `bool` -> Don't use a cached result for this operation
6829    pub fn jp2kload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
6830        let mut out_out = VipsImage::from(null_mut());
6831        let vips_op_response = call(
6832            "jp2kload_source",
6833            option
6834                .set(
6835                    "source",
6836                    source,
6837                )
6838                .set(
6839                    "out",
6840                    &mut out_out,
6841                ),
6842        )?;
6843        utils::result(
6844            vips_op_response,
6845            out_out,
6846            Error::OperationError("Jp2KloadSource (vips_jp2kload_source) failed".to_string()),
6847        )
6848    }
6849
6850    /// VipsForeignSaveJp2kFile (jp2ksave), save image in JPEG2000 format, nocache (.j2k, .jp2, .jpt, .j2c, .jpc), priority=0,
6851    ///
6852    /// filename: `&str` -> Filename to save to
6853    pub fn jp2ksave(&self, filename: &str) -> Result<()> {
6854        let vips_op_response = call(
6855            "jp2ksave",
6856            VOption::new()
6857                .set("in", self)
6858                .set(
6859                    "filename",
6860                    filename,
6861                ),
6862        )?;
6863        utils::result(
6864            vips_op_response,
6865            (),
6866            Error::OperationError("Jp2Ksave (vips_jp2ksave) failed".to_string()),
6867        )
6868    }
6869
6870    /// VipsForeignSaveJp2kFile (jp2ksave), save image in JPEG2000 format, nocache (.j2k, .jp2, .jpt, .j2c, .jpc), priority=0,
6871    ///
6872    /// filename: `&str` -> Filename to save to
6873    ///
6874    /// <ins>Optional arguments</ins>
6875    ///
6876    /// tile_width: `i32` -> Tile width in pixels
6877    ///
6878    /// tile_height: `i32` -> Tile height in pixels
6879    ///
6880    /// lossless: `bool` -> Enable lossless compression
6881    ///
6882    /// Q: `i32` -> Q factor
6883    ///
6884    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
6885    ///
6886    /// keep: [`ForeignKeep`] -> Which metadata to retain
6887    ///
6888    /// background: `&[f64]` -> Background value
6889    ///
6890    /// page_height: `i32` -> Set page height for multipage save
6891    ///
6892    /// profile: `&str` -> Filename of ICC profile to embed
6893    pub fn jp2ksave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
6894        let vips_op_response = call(
6895            "jp2ksave",
6896            option
6897                .set("in", self)
6898                .set(
6899                    "filename",
6900                    filename,
6901                ),
6902        )?;
6903        utils::result(
6904            vips_op_response,
6905            (),
6906            Error::OperationError("Jp2Ksave (vips_jp2ksave) failed".to_string()),
6907        )
6908    }
6909
6910    /// VipsForeignSaveJp2kBuffer (jp2ksave_buffer), save image in JPEG2000 format, nocache (.j2k, .jp2, .jpt, .j2c, .jpc), priority=0,
6911    /// returns `Vec<u8>` - Buffer to save to
6912    pub fn jp2ksave_buffer(&self) -> Result<Vec<u8>> {
6913        let mut buffer_out = Vec::new();
6914        let vips_op_response = call(
6915            "jp2ksave_buffer",
6916            VOption::new()
6917                .set("in", self)
6918                .set(
6919                    "buffer",
6920                    &mut buffer_out,
6921                ),
6922        )?;
6923        utils::result(
6924            vips_op_response,
6925            buffer_out,
6926            Error::OperationError("Jp2KsaveBuffer (vips_jp2ksave_buffer) failed".to_string()),
6927        )
6928    }
6929
6930    /// VipsForeignSaveJp2kBuffer (jp2ksave_buffer), save image in JPEG2000 format, nocache (.j2k, .jp2, .jpt, .j2c, .jpc), priority=0,
6931    /// returns `Vec<u8>` - Buffer to save to
6932    ///
6933    /// <ins>Optional arguments</ins>
6934    ///
6935    /// tile_width: `i32` -> Tile width in pixels
6936    ///
6937    /// tile_height: `i32` -> Tile height in pixels
6938    ///
6939    /// lossless: `bool` -> Enable lossless compression
6940    ///
6941    /// Q: `i32` -> Q factor
6942    ///
6943    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
6944    ///
6945    /// keep: [`ForeignKeep`] -> Which metadata to retain
6946    ///
6947    /// background: `&[f64]` -> Background value
6948    ///
6949    /// page_height: `i32` -> Set page height for multipage save
6950    ///
6951    /// profile: `&str` -> Filename of ICC profile to embed
6952    pub fn jp2ksave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
6953        let mut buffer_out = Vec::new();
6954        let vips_op_response = call(
6955            "jp2ksave_buffer",
6956            option
6957                .set("in", self)
6958                .set(
6959                    "buffer",
6960                    &mut buffer_out,
6961                ),
6962        )?;
6963        utils::result(
6964            vips_op_response,
6965            buffer_out,
6966            Error::OperationError("Jp2KsaveBuffer (vips_jp2ksave_buffer) failed".to_string()),
6967        )
6968    }
6969
6970    /// VipsForeignSaveJp2kTarget (jp2ksave_target), save image in JPEG2000 format, nocache (.j2k, .jp2, .jpt, .j2c, .jpc), priority=0,
6971    ///
6972    /// target: `&VipsTarget` -> Target to save to
6973    pub fn jp2ksave_target(&self, target: &VipsTarget) -> Result<()> {
6974        let vips_op_response = call(
6975            "jp2ksave_target",
6976            VOption::new()
6977                .set("in", self)
6978                .set(
6979                    "target",
6980                    target,
6981                ),
6982        )?;
6983        utils::result(
6984            vips_op_response,
6985            (),
6986            Error::OperationError("Jp2KsaveTarget (vips_jp2ksave_target) failed".to_string()),
6987        )
6988    }
6989
6990    /// VipsForeignSaveJp2kTarget (jp2ksave_target), save image in JPEG2000 format, nocache (.j2k, .jp2, .jpt, .j2c, .jpc), priority=0,
6991    ///
6992    /// target: `&VipsTarget` -> Target to save to
6993    ///
6994    /// <ins>Optional arguments</ins>
6995    ///
6996    /// tile_width: `i32` -> Tile width in pixels
6997    ///
6998    /// tile_height: `i32` -> Tile height in pixels
6999    ///
7000    /// lossless: `bool` -> Enable lossless compression
7001    ///
7002    /// Q: `i32` -> Q factor
7003    ///
7004    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
7005    ///
7006    /// keep: [`ForeignKeep`] -> Which metadata to retain
7007    ///
7008    /// background: `&[f64]` -> Background value
7009    ///
7010    /// page_height: `i32` -> Set page height for multipage save
7011    ///
7012    /// profile: `&str` -> Filename of ICC profile to embed
7013    pub fn jp2ksave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
7014        let vips_op_response = call(
7015            "jp2ksave_target",
7016            option
7017                .set("in", self)
7018                .set(
7019                    "target",
7020                    target,
7021                ),
7022        )?;
7023        utils::result(
7024            vips_op_response,
7025            (),
7026            Error::OperationError("Jp2KsaveTarget (vips_jp2ksave_target) failed".to_string()),
7027        )
7028    }
7029
7030    /// VipsForeignLoadJpegFile (jpegload), load jpeg from file (.jpg, .jpeg, .jpe, .jfif), priority=50, is_a, get_flags, get_flags_filename, header, load
7031    /// returns `VipsImage` - Output image
7032    ///
7033    /// filename: `&str` -> Filename to load from
7034    pub fn jpegload(filename: &str) -> Result<VipsImage> {
7035        let mut out_out = VipsImage::from(null_mut());
7036        let vips_op_response = call(
7037            "jpegload",
7038            VOption::new()
7039                .set(
7040                    "filename",
7041                    filename,
7042                )
7043                .set(
7044                    "out",
7045                    &mut out_out,
7046                ),
7047        )?;
7048        utils::result(
7049            vips_op_response,
7050            out_out,
7051            Error::OperationError("Jpegload (vips_jpegload) failed".to_string()),
7052        )
7053    }
7054
7055    /// VipsForeignLoadJpegFile (jpegload), load jpeg from file (.jpg, .jpeg, .jpe, .jfif), priority=50, is_a, get_flags, get_flags_filename, header, load
7056    /// returns `VipsImage` - Output image
7057    ///
7058    /// filename: `&str` -> Filename to load from
7059    ///
7060    /// <ins>Optional arguments</ins>
7061    ///
7062    /// shrink: `i32` -> Shrink factor on load
7063    ///
7064    /// autorotate: `bool` -> Rotate image using exif orientation
7065    ///
7066    /// unlimited: `bool` -> Remove all denial of service limits
7067    ///
7068    /// flags: [`ForeignFlags`] -> Flags for this file
7069    ///
7070    /// memory: `bool` -> Force open via memory
7071    ///
7072    /// access: [`Access`] -> Required access pattern for this file
7073    ///
7074    /// fail_on: [`FailOn`] -> Error level to fail on
7075    ///
7076    /// revalidate: `bool` -> Don't use a cached result for this operation
7077    pub fn jpegload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
7078        let mut out_out = VipsImage::from(null_mut());
7079        let vips_op_response = call(
7080            "jpegload",
7081            option
7082                .set(
7083                    "filename",
7084                    filename,
7085                )
7086                .set(
7087                    "out",
7088                    &mut out_out,
7089                ),
7090        )?;
7091        utils::result(
7092            vips_op_response,
7093            out_out,
7094            Error::OperationError("Jpegload (vips_jpegload) failed".to_string()),
7095        )
7096    }
7097
7098    /// VipsForeignLoadJpegBuffer (jpegload_buffer), load jpeg from buffer, priority=50, is_a_buffer, get_flags, get_flags_filename, header, load
7099    /// returns `VipsImage` - Output image
7100    ///
7101    /// buffer: `&[u8]` -> Buffer to load from
7102    pub fn jpegload_buffer(buffer: &[u8]) -> Result<VipsImage> {
7103        let mut out_out = VipsImage::from(null_mut());
7104        let vips_op_response = call(
7105            "jpegload_buffer",
7106            VOption::new()
7107                .set(
7108                    "buffer",
7109                    buffer,
7110                )
7111                .set(
7112                    "out",
7113                    &mut out_out,
7114                ),
7115        )?;
7116        utils::result(
7117            vips_op_response,
7118            out_out,
7119            Error::OperationError("JpegloadBuffer (vips_jpegload_buffer) failed".to_string()),
7120        )
7121    }
7122
7123    /// VipsForeignLoadJpegBuffer (jpegload_buffer), load jpeg from buffer, priority=50, is_a_buffer, get_flags, get_flags_filename, header, load
7124    /// returns `VipsImage` - Output image
7125    ///
7126    /// buffer: `&[u8]` -> Buffer to load from
7127    ///
7128    /// <ins>Optional arguments</ins>
7129    ///
7130    /// shrink: `i32` -> Shrink factor on load
7131    ///
7132    /// autorotate: `bool` -> Rotate image using exif orientation
7133    ///
7134    /// unlimited: `bool` -> Remove all denial of service limits
7135    ///
7136    /// flags: [`ForeignFlags`] -> Flags for this file
7137    ///
7138    /// memory: `bool` -> Force open via memory
7139    ///
7140    /// access: [`Access`] -> Required access pattern for this file
7141    ///
7142    /// fail_on: [`FailOn`] -> Error level to fail on
7143    ///
7144    /// revalidate: `bool` -> Don't use a cached result for this operation
7145    pub fn jpegload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
7146        let mut out_out = VipsImage::from(null_mut());
7147        let vips_op_response = call(
7148            "jpegload_buffer",
7149            option
7150                .set(
7151                    "buffer",
7152                    buffer,
7153                )
7154                .set(
7155                    "out",
7156                    &mut out_out,
7157                ),
7158        )?;
7159        utils::result(
7160            vips_op_response,
7161            out_out,
7162            Error::OperationError("JpegloadBuffer (vips_jpegload_buffer) failed".to_string()),
7163        )
7164    }
7165
7166    /// VipsForeignLoadJpegSource (jpegload_source), load image from jpeg source, nocache, priority=50, is_a_source, get_flags, get_flags_filename, header, load
7167    /// returns `VipsImage` - Output image
7168    ///
7169    /// source: `&VipsSource` -> Source to load from
7170    pub fn jpegload_source(source: &VipsSource) -> Result<VipsImage> {
7171        let mut out_out = VipsImage::from(null_mut());
7172        let vips_op_response = call(
7173            "jpegload_source",
7174            VOption::new()
7175                .set(
7176                    "source",
7177                    source,
7178                )
7179                .set(
7180                    "out",
7181                    &mut out_out,
7182                ),
7183        )?;
7184        utils::result(
7185            vips_op_response,
7186            out_out,
7187            Error::OperationError("JpegloadSource (vips_jpegload_source) failed".to_string()),
7188        )
7189    }
7190
7191    /// VipsForeignLoadJpegSource (jpegload_source), load image from jpeg source, nocache, priority=50, is_a_source, get_flags, get_flags_filename, header, load
7192    /// returns `VipsImage` - Output image
7193    ///
7194    /// source: `&VipsSource` -> Source to load from
7195    ///
7196    /// <ins>Optional arguments</ins>
7197    ///
7198    /// shrink: `i32` -> Shrink factor on load
7199    ///
7200    /// autorotate: `bool` -> Rotate image using exif orientation
7201    ///
7202    /// unlimited: `bool` -> Remove all denial of service limits
7203    ///
7204    /// flags: [`ForeignFlags`] -> Flags for this file
7205    ///
7206    /// memory: `bool` -> Force open via memory
7207    ///
7208    /// access: [`Access`] -> Required access pattern for this file
7209    ///
7210    /// fail_on: [`FailOn`] -> Error level to fail on
7211    ///
7212    /// revalidate: `bool` -> Don't use a cached result for this operation
7213    pub fn jpegload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
7214        let mut out_out = VipsImage::from(null_mut());
7215        let vips_op_response = call(
7216            "jpegload_source",
7217            option
7218                .set(
7219                    "source",
7220                    source,
7221                )
7222                .set(
7223                    "out",
7224                    &mut out_out,
7225                ),
7226        )?;
7227        utils::result(
7228            vips_op_response,
7229            out_out,
7230            Error::OperationError("JpegloadSource (vips_jpegload_source) failed".to_string()),
7231        )
7232    }
7233
7234    /// VipsForeignSaveJpegFile (jpegsave), save as jpeg, nocache (.jpg, .jpeg, .jpe, .jfif), priority=0,
7235    ///
7236    /// filename: `&str` -> Filename to save to
7237    pub fn jpegsave(&self, filename: &str) -> Result<()> {
7238        let vips_op_response = call(
7239            "jpegsave",
7240            VOption::new()
7241                .set("in", self)
7242                .set(
7243                    "filename",
7244                    filename,
7245                ),
7246        )?;
7247        utils::result(
7248            vips_op_response,
7249            (),
7250            Error::OperationError("Jpegsave (vips_jpegsave) failed".to_string()),
7251        )
7252    }
7253
7254    /// VipsForeignSaveJpegFile (jpegsave), save as jpeg, nocache (.jpg, .jpeg, .jpe, .jfif), priority=0,
7255    ///
7256    /// filename: `&str` -> Filename to save to
7257    ///
7258    /// <ins>Optional arguments</ins>
7259    ///
7260    /// Q: `i32` -> Q factor
7261    ///
7262    /// optimize_coding: `bool` -> Compute optimal Huffman coding tables
7263    ///
7264    /// interlace: `bool` -> Generate an interlaced (progressive) jpeg
7265    ///
7266    /// trellis_quant: `bool` -> Apply trellis quantisation to each 8x8 block
7267    ///
7268    /// overshoot_deringing: `bool` -> Apply overshooting to samples with extreme values
7269    ///
7270    /// optimize_scans: `bool` -> Split spectrum of DCT coefficients into separate scans
7271    ///
7272    /// quant_table: `i32` -> Use predefined quantization table with given index
7273    ///
7274    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
7275    ///
7276    /// restart_interval: `i32` -> Add restart markers every specified number of mcu
7277    ///
7278    /// keep: [`ForeignKeep`] -> Which metadata to retain
7279    ///
7280    /// background: `&[f64]` -> Background value
7281    ///
7282    /// page_height: `i32` -> Set page height for multipage save
7283    ///
7284    /// profile: `&str` -> Filename of ICC profile to embed
7285    pub fn jpegsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
7286        let vips_op_response = call(
7287            "jpegsave",
7288            option
7289                .set("in", self)
7290                .set(
7291                    "filename",
7292                    filename,
7293                ),
7294        )?;
7295        utils::result(
7296            vips_op_response,
7297            (),
7298            Error::OperationError("Jpegsave (vips_jpegsave) failed".to_string()),
7299        )
7300    }
7301
7302    /// VipsForeignSaveJpegBuffer (jpegsave_buffer), save as jpeg, nocache (.jpg, .jpeg, .jpe, .jfif), priority=0,
7303    /// returns `Vec<u8>` - Buffer to save to
7304    pub fn jpegsave_buffer(&self) -> Result<Vec<u8>> {
7305        let mut buffer_out = Vec::new();
7306        let vips_op_response = call(
7307            "jpegsave_buffer",
7308            VOption::new()
7309                .set("in", self)
7310                .set(
7311                    "buffer",
7312                    &mut buffer_out,
7313                ),
7314        )?;
7315        utils::result(
7316            vips_op_response,
7317            buffer_out,
7318            Error::OperationError("JpegsaveBuffer (vips_jpegsave_buffer) failed".to_string()),
7319        )
7320    }
7321
7322    /// VipsForeignSaveJpegBuffer (jpegsave_buffer), save as jpeg, nocache (.jpg, .jpeg, .jpe, .jfif), priority=0,
7323    /// returns `Vec<u8>` - Buffer to save to
7324    ///
7325    /// <ins>Optional arguments</ins>
7326    ///
7327    /// Q: `i32` -> Q factor
7328    ///
7329    /// optimize_coding: `bool` -> Compute optimal Huffman coding tables
7330    ///
7331    /// interlace: `bool` -> Generate an interlaced (progressive) jpeg
7332    ///
7333    /// trellis_quant: `bool` -> Apply trellis quantisation to each 8x8 block
7334    ///
7335    /// overshoot_deringing: `bool` -> Apply overshooting to samples with extreme values
7336    ///
7337    /// optimize_scans: `bool` -> Split spectrum of DCT coefficients into separate scans
7338    ///
7339    /// quant_table: `i32` -> Use predefined quantization table with given index
7340    ///
7341    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
7342    ///
7343    /// restart_interval: `i32` -> Add restart markers every specified number of mcu
7344    ///
7345    /// keep: [`ForeignKeep`] -> Which metadata to retain
7346    ///
7347    /// background: `&[f64]` -> Background value
7348    ///
7349    /// page_height: `i32` -> Set page height for multipage save
7350    ///
7351    /// profile: `&str` -> Filename of ICC profile to embed
7352    pub fn jpegsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
7353        let mut buffer_out = Vec::new();
7354        let vips_op_response = call(
7355            "jpegsave_buffer",
7356            option
7357                .set("in", self)
7358                .set(
7359                    "buffer",
7360                    &mut buffer_out,
7361                ),
7362        )?;
7363        utils::result(
7364            vips_op_response,
7365            buffer_out,
7366            Error::OperationError("JpegsaveBuffer (vips_jpegsave_buffer) failed".to_string()),
7367        )
7368    }
7369
7370    /// VipsForeignSaveJpegMime (jpegsave_mime), save image to jpeg mime, nocache (.jpg, .jpeg, .jpe, .jfif), priority=0,
7371    pub fn jpegsave_mime(&self) -> Result<()> {
7372        let vips_op_response = call(
7373            "jpegsave_mime",
7374            VOption::new().set("in", self),
7375        )?;
7376        utils::result(
7377            vips_op_response,
7378            (),
7379            Error::OperationError("JpegsaveMime (vips_jpegsave_mime) failed".to_string()),
7380        )
7381    }
7382
7383    /// VipsForeignSaveJpegMime (jpegsave_mime), save image to jpeg mime, nocache (.jpg, .jpeg, .jpe, .jfif), priority=0,
7384    ///
7385    /// <ins>Optional arguments</ins>
7386    ///
7387    /// Q: `i32` -> Q factor
7388    ///
7389    /// optimize_coding: `bool` -> Compute optimal Huffman coding tables
7390    ///
7391    /// interlace: `bool` -> Generate an interlaced (progressive) jpeg
7392    ///
7393    /// trellis_quant: `bool` -> Apply trellis quantisation to each 8x8 block
7394    ///
7395    /// overshoot_deringing: `bool` -> Apply overshooting to samples with extreme values
7396    ///
7397    /// optimize_scans: `bool` -> Split spectrum of DCT coefficients into separate scans
7398    ///
7399    /// quant_table: `i32` -> Use predefined quantization table with given index
7400    ///
7401    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
7402    ///
7403    /// restart_interval: `i32` -> Add restart markers every specified number of mcu
7404    ///
7405    /// keep: [`ForeignKeep`] -> Which metadata to retain
7406    ///
7407    /// background: `&[f64]` -> Background value
7408    ///
7409    /// page_height: `i32` -> Set page height for multipage save
7410    ///
7411    /// profile: `&str` -> Filename of ICC profile to embed
7412    pub fn jpegsave_mime_with_opts(&self, option: VOption) -> Result<()> {
7413        let vips_op_response = call(
7414            "jpegsave_mime",
7415            option.set("in", self),
7416        )?;
7417        utils::result(
7418            vips_op_response,
7419            (),
7420            Error::OperationError("JpegsaveMime (vips_jpegsave_mime) failed".to_string()),
7421        )
7422    }
7423
7424    /// VipsForeignSaveJpegTarget (jpegsave_target), save as jpeg, nocache (.jpg, .jpeg, .jpe, .jfif), priority=0,
7425    ///
7426    /// target: `&VipsTarget` -> Target to save to
7427    pub fn jpegsave_target(&self, target: &VipsTarget) -> Result<()> {
7428        let vips_op_response = call(
7429            "jpegsave_target",
7430            VOption::new()
7431                .set("in", self)
7432                .set(
7433                    "target",
7434                    target,
7435                ),
7436        )?;
7437        utils::result(
7438            vips_op_response,
7439            (),
7440            Error::OperationError("JpegsaveTarget (vips_jpegsave_target) failed".to_string()),
7441        )
7442    }
7443
7444    /// VipsForeignSaveJpegTarget (jpegsave_target), save as jpeg, nocache (.jpg, .jpeg, .jpe, .jfif), priority=0,
7445    ///
7446    /// target: `&VipsTarget` -> Target to save to
7447    ///
7448    /// <ins>Optional arguments</ins>
7449    ///
7450    /// Q: `i32` -> Q factor
7451    ///
7452    /// optimize_coding: `bool` -> Compute optimal Huffman coding tables
7453    ///
7454    /// interlace: `bool` -> Generate an interlaced (progressive) jpeg
7455    ///
7456    /// trellis_quant: `bool` -> Apply trellis quantisation to each 8x8 block
7457    ///
7458    /// overshoot_deringing: `bool` -> Apply overshooting to samples with extreme values
7459    ///
7460    /// optimize_scans: `bool` -> Split spectrum of DCT coefficients into separate scans
7461    ///
7462    /// quant_table: `i32` -> Use predefined quantization table with given index
7463    ///
7464    /// subsample_mode: [`ForeignSubsample`] -> Select chroma subsample operation mode
7465    ///
7466    /// restart_interval: `i32` -> Add restart markers every specified number of mcu
7467    ///
7468    /// keep: [`ForeignKeep`] -> Which metadata to retain
7469    ///
7470    /// background: `&[f64]` -> Background value
7471    ///
7472    /// page_height: `i32` -> Set page height for multipage save
7473    ///
7474    /// profile: `&str` -> Filename of ICC profile to embed
7475    pub fn jpegsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
7476        let vips_op_response = call(
7477            "jpegsave_target",
7478            option
7479                .set("in", self)
7480                .set(
7481                    "target",
7482                    target,
7483                ),
7484        )?;
7485        utils::result(
7486            vips_op_response,
7487            (),
7488            Error::OperationError("JpegsaveTarget (vips_jpegsave_target) failed".to_string()),
7489        )
7490    }
7491
7492    /// VipsForeignLoadJxlFile (jxlload), load JPEG-XL image (.jxl), priority=0, untrusted, is_a, get_flags, header, load
7493    /// returns `VipsImage` - Output image
7494    ///
7495    /// filename: `&str` -> Filename to load from
7496    pub fn jxlload(filename: &str) -> Result<VipsImage> {
7497        let mut out_out = VipsImage::from(null_mut());
7498        let vips_op_response = call(
7499            "jxlload",
7500            VOption::new()
7501                .set(
7502                    "filename",
7503                    filename,
7504                )
7505                .set(
7506                    "out",
7507                    &mut out_out,
7508                ),
7509        )?;
7510        utils::result(
7511            vips_op_response,
7512            out_out,
7513            Error::OperationError("Jxlload (vips_jxlload) failed".to_string()),
7514        )
7515    }
7516
7517    /// VipsForeignLoadJxlFile (jxlload), load JPEG-XL image (.jxl), priority=0, untrusted, is_a, get_flags, header, load
7518    /// returns `VipsImage` - Output image
7519    ///
7520    /// filename: `&str` -> Filename to load from
7521    ///
7522    /// <ins>Optional arguments</ins>
7523    ///
7524    /// page: `i32` -> First page to load
7525    ///
7526    /// n: `i32` -> Number of pages to load, -1 for all
7527    ///
7528    /// flags: [`ForeignFlags`] -> Flags for this file
7529    ///
7530    /// memory: `bool` -> Force open via memory
7531    ///
7532    /// access: [`Access`] -> Required access pattern for this file
7533    ///
7534    /// fail_on: [`FailOn`] -> Error level to fail on
7535    ///
7536    /// revalidate: `bool` -> Don't use a cached result for this operation
7537    pub fn jxlload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
7538        let mut out_out = VipsImage::from(null_mut());
7539        let vips_op_response = call(
7540            "jxlload",
7541            option
7542                .set(
7543                    "filename",
7544                    filename,
7545                )
7546                .set(
7547                    "out",
7548                    &mut out_out,
7549                ),
7550        )?;
7551        utils::result(
7552            vips_op_response,
7553            out_out,
7554            Error::OperationError("Jxlload (vips_jxlload) failed".to_string()),
7555        )
7556    }
7557
7558    /// VipsForeignLoadJxlBuffer (jxlload_buffer), load JPEG-XL image, priority=0, untrusted, is_a_buffer, get_flags, header, load
7559    /// returns `VipsImage` - Output image
7560    ///
7561    /// buffer: `&[u8]` -> Buffer to load from
7562    pub fn jxlload_buffer(buffer: &[u8]) -> Result<VipsImage> {
7563        let mut out_out = VipsImage::from(null_mut());
7564        let vips_op_response = call(
7565            "jxlload_buffer",
7566            VOption::new()
7567                .set(
7568                    "buffer",
7569                    buffer,
7570                )
7571                .set(
7572                    "out",
7573                    &mut out_out,
7574                ),
7575        )?;
7576        utils::result(
7577            vips_op_response,
7578            out_out,
7579            Error::OperationError("JxlloadBuffer (vips_jxlload_buffer) failed".to_string()),
7580        )
7581    }
7582
7583    /// VipsForeignLoadJxlBuffer (jxlload_buffer), load JPEG-XL image, priority=0, untrusted, is_a_buffer, get_flags, header, load
7584    /// returns `VipsImage` - Output image
7585    ///
7586    /// buffer: `&[u8]` -> Buffer to load from
7587    ///
7588    /// <ins>Optional arguments</ins>
7589    ///
7590    /// page: `i32` -> First page to load
7591    ///
7592    /// n: `i32` -> Number of pages to load, -1 for all
7593    ///
7594    /// flags: [`ForeignFlags`] -> Flags for this file
7595    ///
7596    /// memory: `bool` -> Force open via memory
7597    ///
7598    /// access: [`Access`] -> Required access pattern for this file
7599    ///
7600    /// fail_on: [`FailOn`] -> Error level to fail on
7601    ///
7602    /// revalidate: `bool` -> Don't use a cached result for this operation
7603    pub fn jxlload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
7604        let mut out_out = VipsImage::from(null_mut());
7605        let vips_op_response = call(
7606            "jxlload_buffer",
7607            option
7608                .set(
7609                    "buffer",
7610                    buffer,
7611                )
7612                .set(
7613                    "out",
7614                    &mut out_out,
7615                ),
7616        )?;
7617        utils::result(
7618            vips_op_response,
7619            out_out,
7620            Error::OperationError("JxlloadBuffer (vips_jxlload_buffer) failed".to_string()),
7621        )
7622    }
7623
7624    /// VipsForeignLoadJxlSource (jxlload_source), load JPEG-XL image, nocache, priority=0, untrusted, is_a_source, get_flags, header, load
7625    /// returns `VipsImage` - Output image
7626    ///
7627    /// source: `&VipsSource` -> Source to load from
7628    pub fn jxlload_source(source: &VipsSource) -> Result<VipsImage> {
7629        let mut out_out = VipsImage::from(null_mut());
7630        let vips_op_response = call(
7631            "jxlload_source",
7632            VOption::new()
7633                .set(
7634                    "source",
7635                    source,
7636                )
7637                .set(
7638                    "out",
7639                    &mut out_out,
7640                ),
7641        )?;
7642        utils::result(
7643            vips_op_response,
7644            out_out,
7645            Error::OperationError("JxlloadSource (vips_jxlload_source) failed".to_string()),
7646        )
7647    }
7648
7649    /// VipsForeignLoadJxlSource (jxlload_source), load JPEG-XL image, nocache, priority=0, untrusted, is_a_source, get_flags, header, load
7650    /// returns `VipsImage` - Output image
7651    ///
7652    /// source: `&VipsSource` -> Source to load from
7653    ///
7654    /// <ins>Optional arguments</ins>
7655    ///
7656    /// page: `i32` -> First page to load
7657    ///
7658    /// n: `i32` -> Number of pages to load, -1 for all
7659    ///
7660    /// flags: [`ForeignFlags`] -> Flags for this file
7661    ///
7662    /// memory: `bool` -> Force open via memory
7663    ///
7664    /// access: [`Access`] -> Required access pattern for this file
7665    ///
7666    /// fail_on: [`FailOn`] -> Error level to fail on
7667    ///
7668    /// revalidate: `bool` -> Don't use a cached result for this operation
7669    pub fn jxlload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
7670        let mut out_out = VipsImage::from(null_mut());
7671        let vips_op_response = call(
7672            "jxlload_source",
7673            option
7674                .set(
7675                    "source",
7676                    source,
7677                )
7678                .set(
7679                    "out",
7680                    &mut out_out,
7681                ),
7682        )?;
7683        utils::result(
7684            vips_op_response,
7685            out_out,
7686            Error::OperationError("JxlloadSource (vips_jxlload_source) failed".to_string()),
7687        )
7688    }
7689
7690    /// VipsForeignSaveJxlFile (jxlsave), save image in JPEG-XL format, nocache (.jxl), priority=0, untrusted,
7691    ///
7692    /// filename: `&str` -> Filename to save to
7693    pub fn jxlsave(&self, filename: &str) -> Result<()> {
7694        let vips_op_response = call(
7695            "jxlsave",
7696            VOption::new()
7697                .set("in", self)
7698                .set(
7699                    "filename",
7700                    filename,
7701                ),
7702        )?;
7703        utils::result(
7704            vips_op_response,
7705            (),
7706            Error::OperationError("Jxlsave (vips_jxlsave) failed".to_string()),
7707        )
7708    }
7709
7710    /// VipsForeignSaveJxlFile (jxlsave), save image in JPEG-XL format, nocache (.jxl), priority=0, untrusted,
7711    ///
7712    /// filename: `&str` -> Filename to save to
7713    ///
7714    /// <ins>Optional arguments</ins>
7715    ///
7716    /// tier: `i32` -> Decode speed tier
7717    ///
7718    /// distance: `f64` -> Target butteraugli distance
7719    ///
7720    /// effort: `i32` -> Encoding effort
7721    ///
7722    /// lossless: `bool` -> Enable lossless compression
7723    ///
7724    /// Q: `i32` -> Quality factor
7725    ///
7726    /// bitdepth: `i32` -> Bit depth
7727    ///
7728    /// keep: [`ForeignKeep`] -> Which metadata to retain
7729    ///
7730    /// background: `&[f64]` -> Background value
7731    ///
7732    /// page_height: `i32` -> Set page height for multipage save
7733    ///
7734    /// profile: `&str` -> Filename of ICC profile to embed
7735    pub fn jxlsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
7736        let vips_op_response = call(
7737            "jxlsave",
7738            option
7739                .set("in", self)
7740                .set(
7741                    "filename",
7742                    filename,
7743                ),
7744        )?;
7745        utils::result(
7746            vips_op_response,
7747            (),
7748            Error::OperationError("Jxlsave (vips_jxlsave) failed".to_string()),
7749        )
7750    }
7751
7752    /// VipsForeignSaveJxlBuffer (jxlsave_buffer), save image in JPEG-XL format, nocache (.jxl), priority=0, untrusted,
7753    /// returns `Vec<u8>` - Buffer to save to
7754    pub fn jxlsave_buffer(&self) -> Result<Vec<u8>> {
7755        let mut buffer_out = Vec::new();
7756        let vips_op_response = call(
7757            "jxlsave_buffer",
7758            VOption::new()
7759                .set("in", self)
7760                .set(
7761                    "buffer",
7762                    &mut buffer_out,
7763                ),
7764        )?;
7765        utils::result(
7766            vips_op_response,
7767            buffer_out,
7768            Error::OperationError("JxlsaveBuffer (vips_jxlsave_buffer) failed".to_string()),
7769        )
7770    }
7771
7772    /// VipsForeignSaveJxlBuffer (jxlsave_buffer), save image in JPEG-XL format, nocache (.jxl), priority=0, untrusted,
7773    /// returns `Vec<u8>` - Buffer to save to
7774    ///
7775    /// <ins>Optional arguments</ins>
7776    ///
7777    /// tier: `i32` -> Decode speed tier
7778    ///
7779    /// distance: `f64` -> Target butteraugli distance
7780    ///
7781    /// effort: `i32` -> Encoding effort
7782    ///
7783    /// lossless: `bool` -> Enable lossless compression
7784    ///
7785    /// Q: `i32` -> Quality factor
7786    ///
7787    /// bitdepth: `i32` -> Bit depth
7788    ///
7789    /// keep: [`ForeignKeep`] -> Which metadata to retain
7790    ///
7791    /// background: `&[f64]` -> Background value
7792    ///
7793    /// page_height: `i32` -> Set page height for multipage save
7794    ///
7795    /// profile: `&str` -> Filename of ICC profile to embed
7796    pub fn jxlsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
7797        let mut buffer_out = Vec::new();
7798        let vips_op_response = call(
7799            "jxlsave_buffer",
7800            option
7801                .set("in", self)
7802                .set(
7803                    "buffer",
7804                    &mut buffer_out,
7805                ),
7806        )?;
7807        utils::result(
7808            vips_op_response,
7809            buffer_out,
7810            Error::OperationError("JxlsaveBuffer (vips_jxlsave_buffer) failed".to_string()),
7811        )
7812    }
7813
7814    /// VipsForeignSaveJxlTarget (jxlsave_target), save image in JPEG-XL format, nocache (.jxl), priority=0, untrusted,
7815    ///
7816    /// target: `&VipsTarget` -> Target to save to
7817    pub fn jxlsave_target(&self, target: &VipsTarget) -> Result<()> {
7818        let vips_op_response = call(
7819            "jxlsave_target",
7820            VOption::new()
7821                .set("in", self)
7822                .set(
7823                    "target",
7824                    target,
7825                ),
7826        )?;
7827        utils::result(
7828            vips_op_response,
7829            (),
7830            Error::OperationError("JxlsaveTarget (vips_jxlsave_target) failed".to_string()),
7831        )
7832    }
7833
7834    /// VipsForeignSaveJxlTarget (jxlsave_target), save image in JPEG-XL format, nocache (.jxl), priority=0, untrusted,
7835    ///
7836    /// target: `&VipsTarget` -> Target to save to
7837    ///
7838    /// <ins>Optional arguments</ins>
7839    ///
7840    /// tier: `i32` -> Decode speed tier
7841    ///
7842    /// distance: `f64` -> Target butteraugli distance
7843    ///
7844    /// effort: `i32` -> Encoding effort
7845    ///
7846    /// lossless: `bool` -> Enable lossless compression
7847    ///
7848    /// Q: `i32` -> Quality factor
7849    ///
7850    /// bitdepth: `i32` -> Bit depth
7851    ///
7852    /// keep: [`ForeignKeep`] -> Which metadata to retain
7853    ///
7854    /// background: `&[f64]` -> Background value
7855    ///
7856    /// page_height: `i32` -> Set page height for multipage save
7857    ///
7858    /// profile: `&str` -> Filename of ICC profile to embed
7859    pub fn jxlsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
7860        let vips_op_response = call(
7861            "jxlsave_target",
7862            option
7863                .set("in", self)
7864                .set(
7865                    "target",
7866                    target,
7867                ),
7868        )?;
7869        utils::result(
7870            vips_op_response,
7871            (),
7872            Error::OperationError("JxlsaveTarget (vips_jxlsave_target) failed".to_string()),
7873        )
7874    }
7875
7876    /// VipsLabelregions (labelregions), label regions in an image
7877    /// returns `VipsImage` - Mask of region labels
7878    pub fn labelregions(&self) -> Result<VipsImage> {
7879        let mut mask_out = VipsImage::from(null_mut());
7880        let vips_op_response = call(
7881            "labelregions",
7882            VOption::new()
7883                .set("in", self)
7884                .set(
7885                    "mask",
7886                    &mut mask_out,
7887                ),
7888        )?;
7889        utils::result(
7890            vips_op_response,
7891            mask_out,
7892            Error::OperationError("Labelregions (vips_labelregions) failed".to_string()),
7893        )
7894    }
7895
7896    /// VipsLabelregions (labelregions), label regions in an image
7897    /// returns `VipsImage` - Mask of region labels
7898    ///
7899    /// <ins>Optional arguments</ins>
7900    ///
7901    /// segments: `&mut i32` -> Number of discrete contiguous regions
7902    pub fn labelregions_with_opts(&self, option: VOption) -> Result<VipsImage> {
7903        let mut mask_out = VipsImage::from(null_mut());
7904        let vips_op_response = call(
7905            "labelregions",
7906            option
7907                .set("in", self)
7908                .set(
7909                    "mask",
7910                    &mut mask_out,
7911                ),
7912        )?;
7913        utils::result(
7914            vips_op_response,
7915            mask_out,
7916            Error::OperationError("Labelregions (vips_labelregions) failed".to_string()),
7917        )
7918    }
7919
7920    /// VipsLinear (linear), calculate (a * in + b)
7921    /// returns `VipsImage` - Output image
7922    ///
7923    /// a: `&[f64]` -> Multiply by this
7924    ///
7925    /// b: `&[f64]` -> Add this
7926    pub fn linear(&self, a: &[f64], b: &[f64]) -> Result<VipsImage> {
7927        let mut out_out = VipsImage::from(null_mut());
7928        let vips_op_response = call(
7929            "linear",
7930            VOption::new()
7931                .set("in", self)
7932                .set(
7933                    "out",
7934                    &mut out_out,
7935                )
7936                .set("a", a)
7937                .set("b", b),
7938        )?;
7939        utils::result(
7940            vips_op_response,
7941            out_out,
7942            Error::OperationError("Linear (vips_linear) failed".to_string()),
7943        )
7944    }
7945
7946    /// VipsLinear (linear), calculate (a * in + b)
7947    /// returns `VipsImage` - Output image
7948    ///
7949    /// a: `&[f64]` -> Multiply by this
7950    ///
7951    /// b: `&[f64]` -> Add this
7952    ///
7953    /// <ins>Optional arguments</ins>
7954    ///
7955    /// uchar: `bool` -> Output should be uchar
7956    pub fn linear_with_opts(&self, a: &[f64], b: &[f64], option: VOption) -> Result<VipsImage> {
7957        let mut out_out = VipsImage::from(null_mut());
7958        let vips_op_response = call(
7959            "linear",
7960            option
7961                .set("in", self)
7962                .set(
7963                    "out",
7964                    &mut out_out,
7965                )
7966                .set("a", a)
7967                .set("b", b),
7968        )?;
7969        utils::result(
7970            vips_op_response,
7971            out_out,
7972            Error::OperationError("Linear (vips_linear) failed".to_string()),
7973        )
7974    }
7975
7976    /// VipsLineCache (linecache), cache an image as a set of lines
7977    /// returns `VipsImage` - Output image
7978    pub fn linecache(&mut self) -> Result<VipsImage> {
7979        let mut out_out = VipsImage::from(null_mut());
7980        let vips_op_response = call(
7981            "linecache",
7982            VOption::new()
7983                .set("in", self)
7984                .set(
7985                    "out",
7986                    &mut out_out,
7987                ),
7988        )?;
7989        utils::result(
7990            vips_op_response,
7991            out_out,
7992            Error::OperationError("Linecache (vips_linecache) failed".to_string()),
7993        )
7994    }
7995
7996    /// VipsLineCache (linecache), cache an image as a set of lines
7997    /// returns `VipsImage` - Output image
7998    ///
7999    /// <ins>Optional arguments</ins>
8000    ///
8001    /// tile_height: `i32` -> Tile height in pixels
8002    ///
8003    /// access: [`Access`] -> Expected access pattern
8004    ///
8005    /// threaded: `bool` -> Allow threaded access
8006    ///
8007    /// persistent: `bool` -> Keep cache between evaluations
8008    pub fn linecache_with_opts(&mut self, option: VOption) -> Result<VipsImage> {
8009        let mut out_out = VipsImage::from(null_mut());
8010        let vips_op_response = call(
8011            "linecache",
8012            option
8013                .set("in", self)
8014                .set(
8015                    "out",
8016                    &mut out_out,
8017                ),
8018        )?;
8019        utils::result(
8020            vips_op_response,
8021            out_out,
8022            Error::OperationError("Linecache (vips_linecache) failed".to_string()),
8023        )
8024    }
8025
8026    /// VipsLogmat (logmat), make a Laplacian of Gaussian image
8027    /// returns `VipsImage` - Output image
8028    ///
8029    /// sigma: `f64` -> Radius of Gaussian
8030    ///
8031    /// min_ampl: `f64` -> Minimum amplitude of Gaussian
8032    pub fn logmat(sigma: f64, min_ampl: f64) -> Result<VipsImage> {
8033        let mut out_out = VipsImage::from(null_mut());
8034        let vips_op_response = call(
8035            "logmat",
8036            VOption::new()
8037                .set(
8038                    "out",
8039                    &mut out_out,
8040                )
8041                .set(
8042                    "sigma",
8043                    sigma,
8044                )
8045                .set(
8046                    "min_ampl",
8047                    min_ampl,
8048                ),
8049        )?;
8050        utils::result(
8051            vips_op_response,
8052            out_out,
8053            Error::OperationError("Logmat (vips_logmat) failed".to_string()),
8054        )
8055    }
8056
8057    /// VipsLogmat (logmat), make a Laplacian of Gaussian image
8058    /// returns `VipsImage` - Output image
8059    ///
8060    /// sigma: `f64` -> Radius of Gaussian
8061    ///
8062    /// min_ampl: `f64` -> Minimum amplitude of Gaussian
8063    ///
8064    /// <ins>Optional arguments</ins>
8065    ///
8066    /// separable: `bool` -> Generate separable Gaussian
8067    ///
8068    /// precision: [`Precision`] -> Generate with this precision
8069    pub fn logmat_with_opts(sigma: f64, min_ampl: f64, option: VOption) -> Result<VipsImage> {
8070        let mut out_out = VipsImage::from(null_mut());
8071        let vips_op_response = call(
8072            "logmat",
8073            option
8074                .set(
8075                    "out",
8076                    &mut out_out,
8077                )
8078                .set(
8079                    "sigma",
8080                    sigma,
8081                )
8082                .set(
8083                    "min_ampl",
8084                    min_ampl,
8085                ),
8086        )?;
8087        utils::result(
8088            vips_op_response,
8089            out_out,
8090            Error::OperationError("Logmat (vips_logmat) failed".to_string()),
8091        )
8092    }
8093
8094    /// VipsMapim (mapim), resample with a map image
8095    /// returns `VipsImage` - Output image
8096    ///
8097    /// index: `&VipsImage` -> Index pixels with this
8098    pub fn mapim(&self, index: &VipsImage) -> Result<VipsImage> {
8099        let mut out_out = VipsImage::from(null_mut());
8100        let vips_op_response = call(
8101            "mapim",
8102            VOption::new()
8103                .set("in", self)
8104                .set(
8105                    "out",
8106                    &mut out_out,
8107                )
8108                .set(
8109                    "index",
8110                    index,
8111                ),
8112        )?;
8113        utils::result(
8114            vips_op_response,
8115            out_out,
8116            Error::OperationError("Mapim (vips_mapim) failed".to_string()),
8117        )
8118    }
8119
8120    /// VipsMapim (mapim), resample with a map image
8121    /// returns `VipsImage` - Output image
8122    ///
8123    /// index: `&VipsImage` -> Index pixels with this
8124    ///
8125    /// <ins>Optional arguments</ins>
8126    ///
8127    /// interpolate: `&VipsInterpolate` -> Interpolate pixels with this
8128    ///
8129    /// background: `&[f64]` -> Background value
8130    ///
8131    /// premultiplied: `bool` -> Images have premultiplied alpha
8132    ///
8133    /// extend: [`Extend`] -> How to generate the extra pixels
8134    pub fn mapim_with_opts(&self, index: &VipsImage, option: VOption) -> Result<VipsImage> {
8135        let mut out_out = VipsImage::from(null_mut());
8136        let vips_op_response = call(
8137            "mapim",
8138            option
8139                .set("in", self)
8140                .set(
8141                    "out",
8142                    &mut out_out,
8143                )
8144                .set(
8145                    "index",
8146                    index,
8147                ),
8148        )?;
8149        utils::result(
8150            vips_op_response,
8151            out_out,
8152            Error::OperationError("Mapim (vips_mapim) failed".to_string()),
8153        )
8154    }
8155
8156    /// VipsMaplut (maplut), map an image though a lut
8157    /// returns `VipsImage` - Output image
8158    ///
8159    /// lut: `&VipsImage` -> Look-up table image
8160    pub fn maplut(&self, lut: &VipsImage) -> Result<VipsImage> {
8161        let mut out_out = VipsImage::from(null_mut());
8162        let vips_op_response = call(
8163            "maplut",
8164            VOption::new()
8165                .set("in", self)
8166                .set(
8167                    "out",
8168                    &mut out_out,
8169                )
8170                .set("lut", lut),
8171        )?;
8172        utils::result(
8173            vips_op_response,
8174            out_out,
8175            Error::OperationError("Maplut (vips_maplut) failed".to_string()),
8176        )
8177    }
8178
8179    /// VipsMaplut (maplut), map an image though a lut
8180    /// returns `VipsImage` - Output image
8181    ///
8182    /// lut: `&VipsImage` -> Look-up table image
8183    ///
8184    /// <ins>Optional arguments</ins>
8185    ///
8186    /// band: `i32` -> Apply one-band lut to this band of in
8187    pub fn maplut_with_opts(&self, lut: &VipsImage, option: VOption) -> Result<VipsImage> {
8188        let mut out_out = VipsImage::from(null_mut());
8189        let vips_op_response = call(
8190            "maplut",
8191            option
8192                .set("in", self)
8193                .set(
8194                    "out",
8195                    &mut out_out,
8196                )
8197                .set("lut", lut),
8198        )?;
8199        utils::result(
8200            vips_op_response,
8201            out_out,
8202            Error::OperationError("Maplut (vips_maplut) failed".to_string()),
8203        )
8204    }
8205
8206    /// VipsMaskButterworth (mask_butterworth), make a butterworth filter
8207    /// returns `VipsImage` - Output image
8208    ///
8209    /// width: `i32` -> Image width in pixels
8210    ///
8211    /// height: `i32` -> Image height in pixels
8212    ///
8213    /// order: `f64` -> Filter order
8214    ///
8215    /// frequency_cutoff: `f64` -> Frequency cutoff
8216    ///
8217    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8218    pub fn mask_butterworth(
8219        width: i32,
8220        height: i32,
8221        order: f64,
8222        frequency_cutoff: f64,
8223        amplitude_cutoff: f64,
8224    ) -> Result<VipsImage> {
8225        let mut out_out = VipsImage::from(null_mut());
8226        let vips_op_response = call(
8227            "mask_butterworth",
8228            VOption::new()
8229                .set(
8230                    "out",
8231                    &mut out_out,
8232                )
8233                .set(
8234                    "width",
8235                    width,
8236                )
8237                .set(
8238                    "height",
8239                    height,
8240                )
8241                .set(
8242                    "order",
8243                    order,
8244                )
8245                .set(
8246                    "frequency_cutoff",
8247                    frequency_cutoff,
8248                )
8249                .set(
8250                    "amplitude_cutoff",
8251                    amplitude_cutoff,
8252                ),
8253        )?;
8254        utils::result(
8255            vips_op_response,
8256            out_out,
8257            Error::OperationError("MaskButterworth (vips_mask_butterworth) failed".to_string()),
8258        )
8259    }
8260
8261    /// VipsMaskButterworth (mask_butterworth), make a butterworth filter
8262    /// returns `VipsImage` - Output image
8263    ///
8264    /// width: `i32` -> Image width in pixels
8265    ///
8266    /// height: `i32` -> Image height in pixels
8267    ///
8268    /// order: `f64` -> Filter order
8269    ///
8270    /// frequency_cutoff: `f64` -> Frequency cutoff
8271    ///
8272    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8273    ///
8274    /// <ins>Optional arguments</ins>
8275    ///
8276    /// uchar: `bool` -> Output an unsigned char image
8277    ///
8278    /// nodc: `bool` -> Remove DC component
8279    ///
8280    /// reject: `bool` -> Invert the sense of the filter
8281    ///
8282    /// optical: `bool` -> Rotate quadrants to optical space
8283    pub fn mask_butterworth_with_opts(
8284        width: i32,
8285        height: i32,
8286        order: f64,
8287        frequency_cutoff: f64,
8288        amplitude_cutoff: f64,
8289        option: VOption,
8290    ) -> Result<VipsImage> {
8291        let mut out_out = VipsImage::from(null_mut());
8292        let vips_op_response = call(
8293            "mask_butterworth",
8294            option
8295                .set(
8296                    "out",
8297                    &mut out_out,
8298                )
8299                .set(
8300                    "width",
8301                    width,
8302                )
8303                .set(
8304                    "height",
8305                    height,
8306                )
8307                .set(
8308                    "order",
8309                    order,
8310                )
8311                .set(
8312                    "frequency_cutoff",
8313                    frequency_cutoff,
8314                )
8315                .set(
8316                    "amplitude_cutoff",
8317                    amplitude_cutoff,
8318                ),
8319        )?;
8320        utils::result(
8321            vips_op_response,
8322            out_out,
8323            Error::OperationError("MaskButterworth (vips_mask_butterworth) failed".to_string()),
8324        )
8325    }
8326
8327    /// VipsMaskButterworthBand (mask_butterworth_band), make a butterworth_band filter
8328    /// returns `VipsImage` - Output image
8329    ///
8330    /// width: `i32` -> Image width in pixels
8331    ///
8332    /// height: `i32` -> Image height in pixels
8333    ///
8334    /// order: `f64` -> Filter order
8335    ///
8336    /// frequency_cutoff_x: `f64` -> Frequency cutoff x
8337    ///
8338    /// frequency_cutoff_y: `f64` -> Frequency cutoff y
8339    ///
8340    /// radius: `f64` -> Radius of circle
8341    ///
8342    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8343    pub fn mask_butterworth_band(
8344        width: i32,
8345        height: i32,
8346        order: f64,
8347        frequency_cutoff_x: f64,
8348        frequency_cutoff_y: f64,
8349        radius: f64,
8350        amplitude_cutoff: f64,
8351    ) -> Result<VipsImage> {
8352        let mut out_out = VipsImage::from(null_mut());
8353        let vips_op_response = call(
8354            "mask_butterworth_band",
8355            VOption::new()
8356                .set(
8357                    "out",
8358                    &mut out_out,
8359                )
8360                .set(
8361                    "width",
8362                    width,
8363                )
8364                .set(
8365                    "height",
8366                    height,
8367                )
8368                .set(
8369                    "order",
8370                    order,
8371                )
8372                .set(
8373                    "frequency_cutoff_x",
8374                    frequency_cutoff_x,
8375                )
8376                .set(
8377                    "frequency_cutoff_y",
8378                    frequency_cutoff_y,
8379                )
8380                .set(
8381                    "radius",
8382                    radius,
8383                )
8384                .set(
8385                    "amplitude_cutoff",
8386                    amplitude_cutoff,
8387                ),
8388        )?;
8389        utils::result(
8390            vips_op_response,
8391            out_out,
8392            Error::OperationError(
8393                "MaskButterworthBand (vips_mask_butterworth_band) failed".to_string(),
8394            ),
8395        )
8396    }
8397
8398    /// VipsMaskButterworthBand (mask_butterworth_band), make a butterworth_band filter
8399    /// returns `VipsImage` - Output image
8400    ///
8401    /// width: `i32` -> Image width in pixels
8402    ///
8403    /// height: `i32` -> Image height in pixels
8404    ///
8405    /// order: `f64` -> Filter order
8406    ///
8407    /// frequency_cutoff_x: `f64` -> Frequency cutoff x
8408    ///
8409    /// frequency_cutoff_y: `f64` -> Frequency cutoff y
8410    ///
8411    /// radius: `f64` -> Radius of circle
8412    ///
8413    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8414    ///
8415    /// <ins>Optional arguments</ins>
8416    ///
8417    /// uchar: `bool` -> Output an unsigned char image
8418    ///
8419    /// nodc: `bool` -> Remove DC component
8420    ///
8421    /// reject: `bool` -> Invert the sense of the filter
8422    ///
8423    /// optical: `bool` -> Rotate quadrants to optical space
8424    pub fn mask_butterworth_band_with_opts(
8425        width: i32,
8426        height: i32,
8427        order: f64,
8428        frequency_cutoff_x: f64,
8429        frequency_cutoff_y: f64,
8430        radius: f64,
8431        amplitude_cutoff: f64,
8432        option: VOption,
8433    ) -> Result<VipsImage> {
8434        let mut out_out = VipsImage::from(null_mut());
8435        let vips_op_response = call(
8436            "mask_butterworth_band",
8437            option
8438                .set(
8439                    "out",
8440                    &mut out_out,
8441                )
8442                .set(
8443                    "width",
8444                    width,
8445                )
8446                .set(
8447                    "height",
8448                    height,
8449                )
8450                .set(
8451                    "order",
8452                    order,
8453                )
8454                .set(
8455                    "frequency_cutoff_x",
8456                    frequency_cutoff_x,
8457                )
8458                .set(
8459                    "frequency_cutoff_y",
8460                    frequency_cutoff_y,
8461                )
8462                .set(
8463                    "radius",
8464                    radius,
8465                )
8466                .set(
8467                    "amplitude_cutoff",
8468                    amplitude_cutoff,
8469                ),
8470        )?;
8471        utils::result(
8472            vips_op_response,
8473            out_out,
8474            Error::OperationError(
8475                "MaskButterworthBand (vips_mask_butterworth_band) failed".to_string(),
8476            ),
8477        )
8478    }
8479
8480    /// VipsMaskButterworthRing (mask_butterworth_ring), make a butterworth ring filter
8481    /// returns `VipsImage` - Output image
8482    ///
8483    /// width: `i32` -> Image width in pixels
8484    ///
8485    /// height: `i32` -> Image height in pixels
8486    ///
8487    /// order: `f64` -> Filter order
8488    ///
8489    /// frequency_cutoff: `f64` -> Frequency cutoff
8490    ///
8491    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8492    ///
8493    /// ringwidth: `f64` -> Ringwidth
8494    pub fn mask_butterworth_ring(
8495        width: i32,
8496        height: i32,
8497        order: f64,
8498        frequency_cutoff: f64,
8499        amplitude_cutoff: f64,
8500        ringwidth: f64,
8501    ) -> Result<VipsImage> {
8502        let mut out_out = VipsImage::from(null_mut());
8503        let vips_op_response = call(
8504            "mask_butterworth_ring",
8505            VOption::new()
8506                .set(
8507                    "out",
8508                    &mut out_out,
8509                )
8510                .set(
8511                    "width",
8512                    width,
8513                )
8514                .set(
8515                    "height",
8516                    height,
8517                )
8518                .set(
8519                    "order",
8520                    order,
8521                )
8522                .set(
8523                    "frequency_cutoff",
8524                    frequency_cutoff,
8525                )
8526                .set(
8527                    "amplitude_cutoff",
8528                    amplitude_cutoff,
8529                )
8530                .set(
8531                    "ringwidth",
8532                    ringwidth,
8533                ),
8534        )?;
8535        utils::result(
8536            vips_op_response,
8537            out_out,
8538            Error::OperationError(
8539                "MaskButterworthRing (vips_mask_butterworth_ring) failed".to_string(),
8540            ),
8541        )
8542    }
8543
8544    /// VipsMaskButterworthRing (mask_butterworth_ring), make a butterworth ring filter
8545    /// returns `VipsImage` - Output image
8546    ///
8547    /// width: `i32` -> Image width in pixels
8548    ///
8549    /// height: `i32` -> Image height in pixels
8550    ///
8551    /// order: `f64` -> Filter order
8552    ///
8553    /// frequency_cutoff: `f64` -> Frequency cutoff
8554    ///
8555    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8556    ///
8557    /// ringwidth: `f64` -> Ringwidth
8558    ///
8559    /// <ins>Optional arguments</ins>
8560    ///
8561    /// uchar: `bool` -> Output an unsigned char image
8562    ///
8563    /// nodc: `bool` -> Remove DC component
8564    ///
8565    /// reject: `bool` -> Invert the sense of the filter
8566    ///
8567    /// optical: `bool` -> Rotate quadrants to optical space
8568    pub fn mask_butterworth_ring_with_opts(
8569        width: i32,
8570        height: i32,
8571        order: f64,
8572        frequency_cutoff: f64,
8573        amplitude_cutoff: f64,
8574        ringwidth: f64,
8575        option: VOption,
8576    ) -> Result<VipsImage> {
8577        let mut out_out = VipsImage::from(null_mut());
8578        let vips_op_response = call(
8579            "mask_butterworth_ring",
8580            option
8581                .set(
8582                    "out",
8583                    &mut out_out,
8584                )
8585                .set(
8586                    "width",
8587                    width,
8588                )
8589                .set(
8590                    "height",
8591                    height,
8592                )
8593                .set(
8594                    "order",
8595                    order,
8596                )
8597                .set(
8598                    "frequency_cutoff",
8599                    frequency_cutoff,
8600                )
8601                .set(
8602                    "amplitude_cutoff",
8603                    amplitude_cutoff,
8604                )
8605                .set(
8606                    "ringwidth",
8607                    ringwidth,
8608                ),
8609        )?;
8610        utils::result(
8611            vips_op_response,
8612            out_out,
8613            Error::OperationError(
8614                "MaskButterworthRing (vips_mask_butterworth_ring) failed".to_string(),
8615            ),
8616        )
8617    }
8618
8619    /// VipsMaskFractal (mask_fractal), make fractal filter
8620    /// returns `VipsImage` - Output image
8621    ///
8622    /// width: `i32` -> Image width in pixels
8623    ///
8624    /// height: `i32` -> Image height in pixels
8625    ///
8626    /// fractal_dimension: `f64` -> Fractal dimension
8627    pub fn mask_fractal(width: i32, height: i32, fractal_dimension: f64) -> Result<VipsImage> {
8628        let mut out_out = VipsImage::from(null_mut());
8629        let vips_op_response = call(
8630            "mask_fractal",
8631            VOption::new()
8632                .set(
8633                    "out",
8634                    &mut out_out,
8635                )
8636                .set(
8637                    "width",
8638                    width,
8639                )
8640                .set(
8641                    "height",
8642                    height,
8643                )
8644                .set(
8645                    "fractal_dimension",
8646                    fractal_dimension,
8647                ),
8648        )?;
8649        utils::result(
8650            vips_op_response,
8651            out_out,
8652            Error::OperationError("MaskFractal (vips_mask_fractal) failed".to_string()),
8653        )
8654    }
8655
8656    /// VipsMaskFractal (mask_fractal), make fractal filter
8657    /// returns `VipsImage` - Output image
8658    ///
8659    /// width: `i32` -> Image width in pixels
8660    ///
8661    /// height: `i32` -> Image height in pixels
8662    ///
8663    /// fractal_dimension: `f64` -> Fractal dimension
8664    ///
8665    /// <ins>Optional arguments</ins>
8666    ///
8667    /// uchar: `bool` -> Output an unsigned char image
8668    ///
8669    /// nodc: `bool` -> Remove DC component
8670    ///
8671    /// reject: `bool` -> Invert the sense of the filter
8672    ///
8673    /// optical: `bool` -> Rotate quadrants to optical space
8674    pub fn mask_fractal_with_opts(
8675        width: i32,
8676        height: i32,
8677        fractal_dimension: f64,
8678        option: VOption,
8679    ) -> Result<VipsImage> {
8680        let mut out_out = VipsImage::from(null_mut());
8681        let vips_op_response = call(
8682            "mask_fractal",
8683            option
8684                .set(
8685                    "out",
8686                    &mut out_out,
8687                )
8688                .set(
8689                    "width",
8690                    width,
8691                )
8692                .set(
8693                    "height",
8694                    height,
8695                )
8696                .set(
8697                    "fractal_dimension",
8698                    fractal_dimension,
8699                ),
8700        )?;
8701        utils::result(
8702            vips_op_response,
8703            out_out,
8704            Error::OperationError("MaskFractal (vips_mask_fractal) failed".to_string()),
8705        )
8706    }
8707
8708    /// VipsMaskGaussian (mask_gaussian), make a gaussian filter
8709    /// returns `VipsImage` - Output image
8710    ///
8711    /// width: `i32` -> Image width in pixels
8712    ///
8713    /// height: `i32` -> Image height in pixels
8714    ///
8715    /// frequency_cutoff: `f64` -> Frequency cutoff
8716    ///
8717    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8718    pub fn mask_gaussian(
8719        width: i32,
8720        height: i32,
8721        frequency_cutoff: f64,
8722        amplitude_cutoff: f64,
8723    ) -> Result<VipsImage> {
8724        let mut out_out = VipsImage::from(null_mut());
8725        let vips_op_response = call(
8726            "mask_gaussian",
8727            VOption::new()
8728                .set(
8729                    "out",
8730                    &mut out_out,
8731                )
8732                .set(
8733                    "width",
8734                    width,
8735                )
8736                .set(
8737                    "height",
8738                    height,
8739                )
8740                .set(
8741                    "frequency_cutoff",
8742                    frequency_cutoff,
8743                )
8744                .set(
8745                    "amplitude_cutoff",
8746                    amplitude_cutoff,
8747                ),
8748        )?;
8749        utils::result(
8750            vips_op_response,
8751            out_out,
8752            Error::OperationError("MaskGaussian (vips_mask_gaussian) failed".to_string()),
8753        )
8754    }
8755
8756    /// VipsMaskGaussian (mask_gaussian), make a gaussian filter
8757    /// returns `VipsImage` - Output image
8758    ///
8759    /// width: `i32` -> Image width in pixels
8760    ///
8761    /// height: `i32` -> Image height in pixels
8762    ///
8763    /// frequency_cutoff: `f64` -> Frequency cutoff
8764    ///
8765    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8766    ///
8767    /// <ins>Optional arguments</ins>
8768    ///
8769    /// uchar: `bool` -> Output an unsigned char image
8770    ///
8771    /// nodc: `bool` -> Remove DC component
8772    ///
8773    /// reject: `bool` -> Invert the sense of the filter
8774    ///
8775    /// optical: `bool` -> Rotate quadrants to optical space
8776    pub fn mask_gaussian_with_opts(
8777        width: i32,
8778        height: i32,
8779        frequency_cutoff: f64,
8780        amplitude_cutoff: f64,
8781        option: VOption,
8782    ) -> Result<VipsImage> {
8783        let mut out_out = VipsImage::from(null_mut());
8784        let vips_op_response = call(
8785            "mask_gaussian",
8786            option
8787                .set(
8788                    "out",
8789                    &mut out_out,
8790                )
8791                .set(
8792                    "width",
8793                    width,
8794                )
8795                .set(
8796                    "height",
8797                    height,
8798                )
8799                .set(
8800                    "frequency_cutoff",
8801                    frequency_cutoff,
8802                )
8803                .set(
8804                    "amplitude_cutoff",
8805                    amplitude_cutoff,
8806                ),
8807        )?;
8808        utils::result(
8809            vips_op_response,
8810            out_out,
8811            Error::OperationError("MaskGaussian (vips_mask_gaussian) failed".to_string()),
8812        )
8813    }
8814
8815    /// VipsMaskGaussianBand (mask_gaussian_band), make a gaussian filter
8816    /// returns `VipsImage` - Output image
8817    ///
8818    /// width: `i32` -> Image width in pixels
8819    ///
8820    /// height: `i32` -> Image height in pixels
8821    ///
8822    /// frequency_cutoff_x: `f64` -> Frequency cutoff x
8823    ///
8824    /// frequency_cutoff_y: `f64` -> Frequency cutoff y
8825    ///
8826    /// radius: `f64` -> Radius of circle
8827    ///
8828    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8829    pub fn mask_gaussian_band(
8830        width: i32,
8831        height: i32,
8832        frequency_cutoff_x: f64,
8833        frequency_cutoff_y: f64,
8834        radius: f64,
8835        amplitude_cutoff: f64,
8836    ) -> Result<VipsImage> {
8837        let mut out_out = VipsImage::from(null_mut());
8838        let vips_op_response = call(
8839            "mask_gaussian_band",
8840            VOption::new()
8841                .set(
8842                    "out",
8843                    &mut out_out,
8844                )
8845                .set(
8846                    "width",
8847                    width,
8848                )
8849                .set(
8850                    "height",
8851                    height,
8852                )
8853                .set(
8854                    "frequency_cutoff_x",
8855                    frequency_cutoff_x,
8856                )
8857                .set(
8858                    "frequency_cutoff_y",
8859                    frequency_cutoff_y,
8860                )
8861                .set(
8862                    "radius",
8863                    radius,
8864                )
8865                .set(
8866                    "amplitude_cutoff",
8867                    amplitude_cutoff,
8868                ),
8869        )?;
8870        utils::result(
8871            vips_op_response,
8872            out_out,
8873            Error::OperationError("MaskGaussianBand (vips_mask_gaussian_band) failed".to_string()),
8874        )
8875    }
8876
8877    /// VipsMaskGaussianBand (mask_gaussian_band), make a gaussian filter
8878    /// returns `VipsImage` - Output image
8879    ///
8880    /// width: `i32` -> Image width in pixels
8881    ///
8882    /// height: `i32` -> Image height in pixels
8883    ///
8884    /// frequency_cutoff_x: `f64` -> Frequency cutoff x
8885    ///
8886    /// frequency_cutoff_y: `f64` -> Frequency cutoff y
8887    ///
8888    /// radius: `f64` -> Radius of circle
8889    ///
8890    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8891    ///
8892    /// <ins>Optional arguments</ins>
8893    ///
8894    /// uchar: `bool` -> Output an unsigned char image
8895    ///
8896    /// nodc: `bool` -> Remove DC component
8897    ///
8898    /// reject: `bool` -> Invert the sense of the filter
8899    ///
8900    /// optical: `bool` -> Rotate quadrants to optical space
8901    pub fn mask_gaussian_band_with_opts(
8902        width: i32,
8903        height: i32,
8904        frequency_cutoff_x: f64,
8905        frequency_cutoff_y: f64,
8906        radius: f64,
8907        amplitude_cutoff: f64,
8908        option: VOption,
8909    ) -> Result<VipsImage> {
8910        let mut out_out = VipsImage::from(null_mut());
8911        let vips_op_response = call(
8912            "mask_gaussian_band",
8913            option
8914                .set(
8915                    "out",
8916                    &mut out_out,
8917                )
8918                .set(
8919                    "width",
8920                    width,
8921                )
8922                .set(
8923                    "height",
8924                    height,
8925                )
8926                .set(
8927                    "frequency_cutoff_x",
8928                    frequency_cutoff_x,
8929                )
8930                .set(
8931                    "frequency_cutoff_y",
8932                    frequency_cutoff_y,
8933                )
8934                .set(
8935                    "radius",
8936                    radius,
8937                )
8938                .set(
8939                    "amplitude_cutoff",
8940                    amplitude_cutoff,
8941                ),
8942        )?;
8943        utils::result(
8944            vips_op_response,
8945            out_out,
8946            Error::OperationError("MaskGaussianBand (vips_mask_gaussian_band) failed".to_string()),
8947        )
8948    }
8949
8950    /// VipsMaskGaussianRing (mask_gaussian_ring), make a gaussian ring filter
8951    /// returns `VipsImage` - Output image
8952    ///
8953    /// width: `i32` -> Image width in pixels
8954    ///
8955    /// height: `i32` -> Image height in pixels
8956    ///
8957    /// frequency_cutoff: `f64` -> Frequency cutoff
8958    ///
8959    /// amplitude_cutoff: `f64` -> Amplitude cutoff
8960    ///
8961    /// ringwidth: `f64` -> Ringwidth
8962    pub fn mask_gaussian_ring(
8963        width: i32,
8964        height: i32,
8965        frequency_cutoff: f64,
8966        amplitude_cutoff: f64,
8967        ringwidth: f64,
8968    ) -> Result<VipsImage> {
8969        let mut out_out = VipsImage::from(null_mut());
8970        let vips_op_response = call(
8971            "mask_gaussian_ring",
8972            VOption::new()
8973                .set(
8974                    "out",
8975                    &mut out_out,
8976                )
8977                .set(
8978                    "width",
8979                    width,
8980                )
8981                .set(
8982                    "height",
8983                    height,
8984                )
8985                .set(
8986                    "frequency_cutoff",
8987                    frequency_cutoff,
8988                )
8989                .set(
8990                    "amplitude_cutoff",
8991                    amplitude_cutoff,
8992                )
8993                .set(
8994                    "ringwidth",
8995                    ringwidth,
8996                ),
8997        )?;
8998        utils::result(
8999            vips_op_response,
9000            out_out,
9001            Error::OperationError("MaskGaussianRing (vips_mask_gaussian_ring) failed".to_string()),
9002        )
9003    }
9004
9005    /// VipsMaskGaussianRing (mask_gaussian_ring), make a gaussian ring filter
9006    /// returns `VipsImage` - Output image
9007    ///
9008    /// width: `i32` -> Image width in pixels
9009    ///
9010    /// height: `i32` -> Image height in pixels
9011    ///
9012    /// frequency_cutoff: `f64` -> Frequency cutoff
9013    ///
9014    /// amplitude_cutoff: `f64` -> Amplitude cutoff
9015    ///
9016    /// ringwidth: `f64` -> Ringwidth
9017    ///
9018    /// <ins>Optional arguments</ins>
9019    ///
9020    /// uchar: `bool` -> Output an unsigned char image
9021    ///
9022    /// nodc: `bool` -> Remove DC component
9023    ///
9024    /// reject: `bool` -> Invert the sense of the filter
9025    ///
9026    /// optical: `bool` -> Rotate quadrants to optical space
9027    pub fn mask_gaussian_ring_with_opts(
9028        width: i32,
9029        height: i32,
9030        frequency_cutoff: f64,
9031        amplitude_cutoff: f64,
9032        ringwidth: f64,
9033        option: VOption,
9034    ) -> Result<VipsImage> {
9035        let mut out_out = VipsImage::from(null_mut());
9036        let vips_op_response = call(
9037            "mask_gaussian_ring",
9038            option
9039                .set(
9040                    "out",
9041                    &mut out_out,
9042                )
9043                .set(
9044                    "width",
9045                    width,
9046                )
9047                .set(
9048                    "height",
9049                    height,
9050                )
9051                .set(
9052                    "frequency_cutoff",
9053                    frequency_cutoff,
9054                )
9055                .set(
9056                    "amplitude_cutoff",
9057                    amplitude_cutoff,
9058                )
9059                .set(
9060                    "ringwidth",
9061                    ringwidth,
9062                ),
9063        )?;
9064        utils::result(
9065            vips_op_response,
9066            out_out,
9067            Error::OperationError("MaskGaussianRing (vips_mask_gaussian_ring) failed".to_string()),
9068        )
9069    }
9070
9071    /// VipsMaskIdeal (mask_ideal), make an ideal filter
9072    /// returns `VipsImage` - Output image
9073    ///
9074    /// width: `i32` -> Image width in pixels
9075    ///
9076    /// height: `i32` -> Image height in pixels
9077    ///
9078    /// frequency_cutoff: `f64` -> Frequency cutoff
9079    pub fn mask_ideal(width: i32, height: i32, frequency_cutoff: f64) -> Result<VipsImage> {
9080        let mut out_out = VipsImage::from(null_mut());
9081        let vips_op_response = call(
9082            "mask_ideal",
9083            VOption::new()
9084                .set(
9085                    "out",
9086                    &mut out_out,
9087                )
9088                .set(
9089                    "width",
9090                    width,
9091                )
9092                .set(
9093                    "height",
9094                    height,
9095                )
9096                .set(
9097                    "frequency_cutoff",
9098                    frequency_cutoff,
9099                ),
9100        )?;
9101        utils::result(
9102            vips_op_response,
9103            out_out,
9104            Error::OperationError("MaskIdeal (vips_mask_ideal) failed".to_string()),
9105        )
9106    }
9107
9108    /// VipsMaskIdeal (mask_ideal), make an ideal filter
9109    /// returns `VipsImage` - Output image
9110    ///
9111    /// width: `i32` -> Image width in pixels
9112    ///
9113    /// height: `i32` -> Image height in pixels
9114    ///
9115    /// frequency_cutoff: `f64` -> Frequency cutoff
9116    ///
9117    /// <ins>Optional arguments</ins>
9118    ///
9119    /// uchar: `bool` -> Output an unsigned char image
9120    ///
9121    /// nodc: `bool` -> Remove DC component
9122    ///
9123    /// reject: `bool` -> Invert the sense of the filter
9124    ///
9125    /// optical: `bool` -> Rotate quadrants to optical space
9126    pub fn mask_ideal_with_opts(
9127        width: i32,
9128        height: i32,
9129        frequency_cutoff: f64,
9130        option: VOption,
9131    ) -> Result<VipsImage> {
9132        let mut out_out = VipsImage::from(null_mut());
9133        let vips_op_response = call(
9134            "mask_ideal",
9135            option
9136                .set(
9137                    "out",
9138                    &mut out_out,
9139                )
9140                .set(
9141                    "width",
9142                    width,
9143                )
9144                .set(
9145                    "height",
9146                    height,
9147                )
9148                .set(
9149                    "frequency_cutoff",
9150                    frequency_cutoff,
9151                ),
9152        )?;
9153        utils::result(
9154            vips_op_response,
9155            out_out,
9156            Error::OperationError("MaskIdeal (vips_mask_ideal) failed".to_string()),
9157        )
9158    }
9159
9160    /// VipsMaskIdealBand (mask_ideal_band), make an ideal band filter
9161    /// returns `VipsImage` - Output image
9162    ///
9163    /// width: `i32` -> Image width in pixels
9164    ///
9165    /// height: `i32` -> Image height in pixels
9166    ///
9167    /// frequency_cutoff_x: `f64` -> Frequency cutoff x
9168    ///
9169    /// frequency_cutoff_y: `f64` -> Frequency cutoff y
9170    ///
9171    /// radius: `f64` -> Radius of circle
9172    pub fn mask_ideal_band(
9173        width: i32,
9174        height: i32,
9175        frequency_cutoff_x: f64,
9176        frequency_cutoff_y: f64,
9177        radius: f64,
9178    ) -> Result<VipsImage> {
9179        let mut out_out = VipsImage::from(null_mut());
9180        let vips_op_response = call(
9181            "mask_ideal_band",
9182            VOption::new()
9183                .set(
9184                    "out",
9185                    &mut out_out,
9186                )
9187                .set(
9188                    "width",
9189                    width,
9190                )
9191                .set(
9192                    "height",
9193                    height,
9194                )
9195                .set(
9196                    "frequency_cutoff_x",
9197                    frequency_cutoff_x,
9198                )
9199                .set(
9200                    "frequency_cutoff_y",
9201                    frequency_cutoff_y,
9202                )
9203                .set(
9204                    "radius",
9205                    radius,
9206                ),
9207        )?;
9208        utils::result(
9209            vips_op_response,
9210            out_out,
9211            Error::OperationError("MaskIdealBand (vips_mask_ideal_band) failed".to_string()),
9212        )
9213    }
9214
9215    /// VipsMaskIdealBand (mask_ideal_band), make an ideal band filter
9216    /// returns `VipsImage` - Output image
9217    ///
9218    /// width: `i32` -> Image width in pixels
9219    ///
9220    /// height: `i32` -> Image height in pixels
9221    ///
9222    /// frequency_cutoff_x: `f64` -> Frequency cutoff x
9223    ///
9224    /// frequency_cutoff_y: `f64` -> Frequency cutoff y
9225    ///
9226    /// radius: `f64` -> Radius of circle
9227    ///
9228    /// <ins>Optional arguments</ins>
9229    ///
9230    /// uchar: `bool` -> Output an unsigned char image
9231    ///
9232    /// nodc: `bool` -> Remove DC component
9233    ///
9234    /// reject: `bool` -> Invert the sense of the filter
9235    ///
9236    /// optical: `bool` -> Rotate quadrants to optical space
9237    pub fn mask_ideal_band_with_opts(
9238        width: i32,
9239        height: i32,
9240        frequency_cutoff_x: f64,
9241        frequency_cutoff_y: f64,
9242        radius: f64,
9243        option: VOption,
9244    ) -> Result<VipsImage> {
9245        let mut out_out = VipsImage::from(null_mut());
9246        let vips_op_response = call(
9247            "mask_ideal_band",
9248            option
9249                .set(
9250                    "out",
9251                    &mut out_out,
9252                )
9253                .set(
9254                    "width",
9255                    width,
9256                )
9257                .set(
9258                    "height",
9259                    height,
9260                )
9261                .set(
9262                    "frequency_cutoff_x",
9263                    frequency_cutoff_x,
9264                )
9265                .set(
9266                    "frequency_cutoff_y",
9267                    frequency_cutoff_y,
9268                )
9269                .set(
9270                    "radius",
9271                    radius,
9272                ),
9273        )?;
9274        utils::result(
9275            vips_op_response,
9276            out_out,
9277            Error::OperationError("MaskIdealBand (vips_mask_ideal_band) failed".to_string()),
9278        )
9279    }
9280
9281    /// VipsMaskIdealRing (mask_ideal_ring), make an ideal ring filter
9282    /// returns `VipsImage` - Output image
9283    ///
9284    /// width: `i32` -> Image width in pixels
9285    ///
9286    /// height: `i32` -> Image height in pixels
9287    ///
9288    /// frequency_cutoff: `f64` -> Frequency cutoff
9289    ///
9290    /// ringwidth: `f64` -> Ringwidth
9291    pub fn mask_ideal_ring(
9292        width: i32,
9293        height: i32,
9294        frequency_cutoff: f64,
9295        ringwidth: f64,
9296    ) -> Result<VipsImage> {
9297        let mut out_out = VipsImage::from(null_mut());
9298        let vips_op_response = call(
9299            "mask_ideal_ring",
9300            VOption::new()
9301                .set(
9302                    "out",
9303                    &mut out_out,
9304                )
9305                .set(
9306                    "width",
9307                    width,
9308                )
9309                .set(
9310                    "height",
9311                    height,
9312                )
9313                .set(
9314                    "frequency_cutoff",
9315                    frequency_cutoff,
9316                )
9317                .set(
9318                    "ringwidth",
9319                    ringwidth,
9320                ),
9321        )?;
9322        utils::result(
9323            vips_op_response,
9324            out_out,
9325            Error::OperationError("MaskIdealRing (vips_mask_ideal_ring) failed".to_string()),
9326        )
9327    }
9328
9329    /// VipsMaskIdealRing (mask_ideal_ring), make an ideal ring filter
9330    /// returns `VipsImage` - Output image
9331    ///
9332    /// width: `i32` -> Image width in pixels
9333    ///
9334    /// height: `i32` -> Image height in pixels
9335    ///
9336    /// frequency_cutoff: `f64` -> Frequency cutoff
9337    ///
9338    /// ringwidth: `f64` -> Ringwidth
9339    ///
9340    /// <ins>Optional arguments</ins>
9341    ///
9342    /// uchar: `bool` -> Output an unsigned char image
9343    ///
9344    /// nodc: `bool` -> Remove DC component
9345    ///
9346    /// reject: `bool` -> Invert the sense of the filter
9347    ///
9348    /// optical: `bool` -> Rotate quadrants to optical space
9349    pub fn mask_ideal_ring_with_opts(
9350        width: i32,
9351        height: i32,
9352        frequency_cutoff: f64,
9353        ringwidth: f64,
9354        option: VOption,
9355    ) -> Result<VipsImage> {
9356        let mut out_out = VipsImage::from(null_mut());
9357        let vips_op_response = call(
9358            "mask_ideal_ring",
9359            option
9360                .set(
9361                    "out",
9362                    &mut out_out,
9363                )
9364                .set(
9365                    "width",
9366                    width,
9367                )
9368                .set(
9369                    "height",
9370                    height,
9371                )
9372                .set(
9373                    "frequency_cutoff",
9374                    frequency_cutoff,
9375                )
9376                .set(
9377                    "ringwidth",
9378                    ringwidth,
9379                ),
9380        )?;
9381        utils::result(
9382            vips_op_response,
9383            out_out,
9384            Error::OperationError("MaskIdealRing (vips_mask_ideal_ring) failed".to_string()),
9385        )
9386    }
9387
9388    /// VipsMatch (match), first-order match of two images
9389    /// returns `VipsImage` - Output image
9390    ///
9391    /// sec: `&VipsImage` -> Secondary image
9392    ///
9393    /// xr1: `i32` -> Position of first reference tie-point
9394    ///
9395    /// yr1: `i32` -> Position of first reference tie-point
9396    ///
9397    /// xs1: `i32` -> Position of first secondary tie-point
9398    ///
9399    /// ys1: `i32` -> Position of first secondary tie-point
9400    ///
9401    /// xr2: `i32` -> Position of second reference tie-point
9402    ///
9403    /// yr2: `i32` -> Position of second reference tie-point
9404    ///
9405    /// xs2: `i32` -> Position of second secondary tie-point
9406    ///
9407    /// ys2: `i32` -> Position of second secondary tie-point
9408    pub fn matches(
9409        &self,
9410        sec: &VipsImage,
9411        xr1: i32,
9412        yr1: i32,
9413        xs1: i32,
9414        ys1: i32,
9415        xr2: i32,
9416        yr2: i32,
9417        xs2: i32,
9418        ys2: i32,
9419    ) -> Result<VipsImage> {
9420        let mut out_out = VipsImage::from(null_mut());
9421        let vips_op_response = call(
9422            "match",
9423            VOption::new()
9424                .set(
9425                    "ref", self,
9426                )
9427                .set("sec", sec)
9428                .set(
9429                    "out",
9430                    &mut out_out,
9431                )
9432                .set("xr1", xr1)
9433                .set("yr1", yr1)
9434                .set("xs1", xs1)
9435                .set("ys1", ys1)
9436                .set("xr2", xr2)
9437                .set("yr2", yr2)
9438                .set("xs2", xs2)
9439                .set("ys2", ys2),
9440        )?;
9441        utils::result(
9442            vips_op_response,
9443            out_out,
9444            Error::OperationError("Matchs (vips_match) failed".to_string()),
9445        )
9446    }
9447
9448    /// VipsMatch (match), first-order match of two images
9449    /// returns `VipsImage` - Output image
9450    ///
9451    /// sec: `&VipsImage` -> Secondary image
9452    ///
9453    /// xr1: `i32` -> Position of first reference tie-point
9454    ///
9455    /// yr1: `i32` -> Position of first reference tie-point
9456    ///
9457    /// xs1: `i32` -> Position of first secondary tie-point
9458    ///
9459    /// ys1: `i32` -> Position of first secondary tie-point
9460    ///
9461    /// xr2: `i32` -> Position of second reference tie-point
9462    ///
9463    /// yr2: `i32` -> Position of second reference tie-point
9464    ///
9465    /// xs2: `i32` -> Position of second secondary tie-point
9466    ///
9467    /// ys2: `i32` -> Position of second secondary tie-point
9468    ///
9469    /// <ins>Optional arguments</ins>
9470    ///
9471    /// hwindow: `i32` -> Half window size
9472    ///
9473    /// harea: `i32` -> Half area size
9474    ///
9475    /// search: `bool` -> Search to improve tie-points
9476    ///
9477    /// interpolate: `&VipsInterpolate` -> Interpolate pixels with this
9478    pub fn matches_with_opts(
9479        &self,
9480        sec: &VipsImage,
9481        xr1: i32,
9482        yr1: i32,
9483        xs1: i32,
9484        ys1: i32,
9485        xr2: i32,
9486        yr2: i32,
9487        xs2: i32,
9488        ys2: i32,
9489        option: VOption,
9490    ) -> Result<VipsImage> {
9491        let mut out_out = VipsImage::from(null_mut());
9492        let vips_op_response = call(
9493            "match",
9494            option
9495                .set(
9496                    "ref", self,
9497                )
9498                .set("sec", sec)
9499                .set(
9500                    "out",
9501                    &mut out_out,
9502                )
9503                .set("xr1", xr1)
9504                .set("yr1", yr1)
9505                .set("xs1", xs1)
9506                .set("ys1", ys1)
9507                .set("xr2", xr2)
9508                .set("yr2", yr2)
9509                .set("xs2", xs2)
9510                .set("ys2", ys2),
9511        )?;
9512        utils::result(
9513            vips_op_response,
9514            out_out,
9515            Error::OperationError("Matchs (vips_match) failed".to_string()),
9516        )
9517    }
9518
9519    /// VipsMath2 (math2), binary math operations
9520    /// returns `VipsImage` - Output image
9521    ///
9522    /// right: `&VipsImage` -> Right-hand image argument
9523    ///
9524    /// math2: `OperationMath2` -> Math to perform
9525    pub fn math2(&self, right: &VipsImage, math2: OperationMath2) -> Result<VipsImage> {
9526        let mut out_out = VipsImage::from(null_mut());
9527        let vips_op_response = call(
9528            "math2",
9529            VOption::new()
9530                .set(
9531                    "left",
9532                    self,
9533                )
9534                .set(
9535                    "right",
9536                    right,
9537                )
9538                .set(
9539                    "out",
9540                    &mut out_out,
9541                )
9542                .set(
9543                    "math2",
9544                    math2 as i32,
9545                ),
9546        )?;
9547        utils::result(
9548            vips_op_response,
9549            out_out,
9550            Error::OperationError("Math2 (vips_math2) failed".to_string()),
9551        )
9552    }
9553
9554    /// VipsMath2Const (math2_const), binary math operations with a constant
9555    /// returns `VipsImage` - Output image
9556    ///
9557    /// math2: `OperationMath2` -> Math to perform
9558    ///
9559    /// c: `&[f64]` -> Array of constants
9560    pub fn math2_const(&self, math2: OperationMath2, c: &[f64]) -> Result<VipsImage> {
9561        let mut out_out = VipsImage::from(null_mut());
9562        let vips_op_response = call(
9563            "math2_const",
9564            VOption::new()
9565                .set("in", self)
9566                .set(
9567                    "out",
9568                    &mut out_out,
9569                )
9570                .set(
9571                    "math2",
9572                    math2 as i32,
9573                )
9574                .set("c", c),
9575        )?;
9576        utils::result(
9577            vips_op_response,
9578            out_out,
9579            Error::OperationError("Math2Const (vips_math2_const) failed".to_string()),
9580        )
9581    }
9582
9583    /// VipsMath (math), apply a math operation to an image
9584    /// returns `VipsImage` - Output image
9585    ///
9586    /// math: `OperationMath` -> Math to perform
9587    pub fn math(&self, math: OperationMath) -> Result<VipsImage> {
9588        let mut out_out = VipsImage::from(null_mut());
9589        let vips_op_response = call(
9590            "math",
9591            VOption::new()
9592                .set("in", self)
9593                .set(
9594                    "out",
9595                    &mut out_out,
9596                )
9597                .set(
9598                    "math",
9599                    math as i32,
9600                ),
9601        )?;
9602        utils::result(
9603            vips_op_response,
9604            out_out,
9605            Error::OperationError("Math (vips_math) failed".to_string()),
9606        )
9607    }
9608
9609    /// VipsForeignLoadMat (matload), load mat from file (.mat), priority=0, untrusted, is_a, get_flags, get_flags_filename, header, load
9610    /// returns `VipsImage` - Output image
9611    ///
9612    /// filename: `&str` -> Filename to load from
9613    pub fn matload(filename: &str) -> Result<VipsImage> {
9614        let mut out_out = VipsImage::from(null_mut());
9615        let vips_op_response = call(
9616            "matload",
9617            VOption::new()
9618                .set(
9619                    "filename",
9620                    filename,
9621                )
9622                .set(
9623                    "out",
9624                    &mut out_out,
9625                ),
9626        )?;
9627        utils::result(
9628            vips_op_response,
9629            out_out,
9630            Error::OperationError("Matload (vips_matload) failed".to_string()),
9631        )
9632    }
9633
9634    /// VipsForeignLoadMat (matload), load mat from file (.mat), priority=0, untrusted, is_a, get_flags, get_flags_filename, header, load
9635    /// returns `VipsImage` - Output image
9636    ///
9637    /// filename: `&str` -> Filename to load from
9638    ///
9639    /// <ins>Optional arguments</ins>
9640    ///
9641    /// flags: [`ForeignFlags`] -> Flags for this file
9642    ///
9643    /// memory: `bool` -> Force open via memory
9644    ///
9645    /// access: [`Access`] -> Required access pattern for this file
9646    ///
9647    /// fail_on: [`FailOn`] -> Error level to fail on
9648    ///
9649    /// revalidate: `bool` -> Don't use a cached result for this operation
9650    pub fn matload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
9651        let mut out_out = VipsImage::from(null_mut());
9652        let vips_op_response = call(
9653            "matload",
9654            option
9655                .set(
9656                    "filename",
9657                    filename,
9658                )
9659                .set(
9660                    "out",
9661                    &mut out_out,
9662                ),
9663        )?;
9664        utils::result(
9665            vips_op_response,
9666            out_out,
9667            Error::OperationError("Matload (vips_matload) failed".to_string()),
9668        )
9669    }
9670
9671    /// VipsMatrixinvert (matrixinvert), invert a matrix
9672    /// returns `VipsImage` - Output matrix
9673    pub fn matrixinvert(&self) -> Result<VipsImage> {
9674        let mut out_out = VipsImage::from(null_mut());
9675        let vips_op_response = call(
9676            "matrixinvert",
9677            VOption::new()
9678                .set("in", self)
9679                .set(
9680                    "out",
9681                    &mut out_out,
9682                ),
9683        )?;
9684        utils::result(
9685            vips_op_response,
9686            out_out,
9687            Error::OperationError("Matrixinvert (vips_matrixinvert) failed".to_string()),
9688        )
9689    }
9690
9691    /// VipsForeignLoadMatrixFile (matrixload), load matrix (.mat), priority=0, is_a, get_flags, get_flags_filename, header, load
9692    /// returns `VipsImage` - Output image
9693    ///
9694    /// filename: `&str` -> Filename to load from
9695    pub fn matrixload(filename: &str) -> Result<VipsImage> {
9696        let mut out_out = VipsImage::from(null_mut());
9697        let vips_op_response = call(
9698            "matrixload",
9699            VOption::new()
9700                .set(
9701                    "filename",
9702                    filename,
9703                )
9704                .set(
9705                    "out",
9706                    &mut out_out,
9707                ),
9708        )?;
9709        utils::result(
9710            vips_op_response,
9711            out_out,
9712            Error::OperationError("Matrixload (vips_matrixload) failed".to_string()),
9713        )
9714    }
9715
9716    /// VipsForeignLoadMatrixFile (matrixload), load matrix (.mat), priority=0, is_a, get_flags, get_flags_filename, header, load
9717    /// returns `VipsImage` - Output image
9718    ///
9719    /// filename: `&str` -> Filename to load from
9720    ///
9721    /// <ins>Optional arguments</ins>
9722    ///
9723    /// flags: [`ForeignFlags`] -> Flags for this file
9724    ///
9725    /// memory: `bool` -> Force open via memory
9726    ///
9727    /// access: [`Access`] -> Required access pattern for this file
9728    ///
9729    /// fail_on: [`FailOn`] -> Error level to fail on
9730    ///
9731    /// revalidate: `bool` -> Don't use a cached result for this operation
9732    pub fn matrixload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
9733        let mut out_out = VipsImage::from(null_mut());
9734        let vips_op_response = call(
9735            "matrixload",
9736            option
9737                .set(
9738                    "filename",
9739                    filename,
9740                )
9741                .set(
9742                    "out",
9743                    &mut out_out,
9744                ),
9745        )?;
9746        utils::result(
9747            vips_op_response,
9748            out_out,
9749            Error::OperationError("Matrixload (vips_matrixload) failed".to_string()),
9750        )
9751    }
9752
9753    /// VipsForeignLoadMatrixSource (matrixload_source), load matrix, nocache, priority=0, is_a_source, get_flags, header, load
9754    /// returns `VipsImage` - Output image
9755    ///
9756    /// source: `&VipsSource` -> Source to load from
9757    pub fn matrixload_source(source: &VipsSource) -> Result<VipsImage> {
9758        let mut out_out = VipsImage::from(null_mut());
9759        let vips_op_response = call(
9760            "matrixload_source",
9761            VOption::new()
9762                .set(
9763                    "source",
9764                    source,
9765                )
9766                .set(
9767                    "out",
9768                    &mut out_out,
9769                ),
9770        )?;
9771        utils::result(
9772            vips_op_response,
9773            out_out,
9774            Error::OperationError("MatrixloadSource (vips_matrixload_source) failed".to_string()),
9775        )
9776    }
9777
9778    /// VipsForeignLoadMatrixSource (matrixload_source), load matrix, nocache, priority=0, is_a_source, get_flags, header, load
9779    /// returns `VipsImage` - Output image
9780    ///
9781    /// source: `&VipsSource` -> Source to load from
9782    ///
9783    /// <ins>Optional arguments</ins>
9784    ///
9785    /// flags: [`ForeignFlags`] -> Flags for this file
9786    ///
9787    /// memory: `bool` -> Force open via memory
9788    ///
9789    /// access: [`Access`] -> Required access pattern for this file
9790    ///
9791    /// fail_on: [`FailOn`] -> Error level to fail on
9792    ///
9793    /// revalidate: `bool` -> Don't use a cached result for this operation
9794    pub fn matrixload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
9795        let mut out_out = VipsImage::from(null_mut());
9796        let vips_op_response = call(
9797            "matrixload_source",
9798            option
9799                .set(
9800                    "source",
9801                    source,
9802                )
9803                .set(
9804                    "out",
9805                    &mut out_out,
9806                ),
9807        )?;
9808        utils::result(
9809            vips_op_response,
9810            out_out,
9811            Error::OperationError("MatrixloadSource (vips_matrixload_source) failed".to_string()),
9812        )
9813    }
9814
9815    /// VipsMatrixmultiply (matrixmultiply), multiply two matrices
9816    /// returns `VipsImage` - Output matrix
9817    ///
9818    /// right: `&VipsImage` -> Second matrix to multiply
9819    pub fn matrixmultiply(&self, right: &VipsImage) -> Result<VipsImage> {
9820        let mut out_out = VipsImage::from(null_mut());
9821        let vips_op_response = call(
9822            "matrixmultiply",
9823            VOption::new()
9824                .set(
9825                    "left",
9826                    self,
9827                )
9828                .set(
9829                    "right",
9830                    right,
9831                )
9832                .set(
9833                    "out",
9834                    &mut out_out,
9835                ),
9836        )?;
9837        utils::result(
9838            vips_op_response,
9839            out_out,
9840            Error::OperationError("Matrixmultiply (vips_matrixmultiply) failed".to_string()),
9841        )
9842    }
9843
9844    /// VipsForeignPrintMatrix (matrixprint), print matrix, nocache (.mat), priority=0, mono
9845    pub fn matrixprint(&self) -> Result<()> {
9846        let vips_op_response = call(
9847            "matrixprint",
9848            VOption::new().set("in", self),
9849        )?;
9850        utils::result(
9851            vips_op_response,
9852            (),
9853            Error::OperationError("Matrixprint (vips_matrixprint) failed".to_string()),
9854        )
9855    }
9856
9857    /// VipsForeignPrintMatrix (matrixprint), print matrix, nocache (.mat), priority=0, mono
9858    ///
9859    /// <ins>Optional arguments</ins>
9860    ///
9861    /// keep: [`ForeignKeep`] -> Which metadata to retain
9862    ///
9863    /// background: `&[f64]` -> Background value
9864    ///
9865    /// page_height: `i32` -> Set page height for multipage save
9866    ///
9867    /// profile: `&str` -> Filename of ICC profile to embed
9868    pub fn matrixprint_with_opts(&self, option: VOption) -> Result<()> {
9869        let vips_op_response = call(
9870            "matrixprint",
9871            option.set("in", self),
9872        )?;
9873        utils::result(
9874            vips_op_response,
9875            (),
9876            Error::OperationError("Matrixprint (vips_matrixprint) failed".to_string()),
9877        )
9878    }
9879
9880    /// VipsForeignSaveMatrixFile (matrixsave), save image to matrix, nocache (.mat), priority=0, mono
9881    ///
9882    /// filename: `&str` -> Filename to save to
9883    pub fn matrixsave(&self, filename: &str) -> Result<()> {
9884        let vips_op_response = call(
9885            "matrixsave",
9886            VOption::new()
9887                .set("in", self)
9888                .set(
9889                    "filename",
9890                    filename,
9891                ),
9892        )?;
9893        utils::result(
9894            vips_op_response,
9895            (),
9896            Error::OperationError("Matrixsave (vips_matrixsave) failed".to_string()),
9897        )
9898    }
9899
9900    /// VipsForeignSaveMatrixFile (matrixsave), save image to matrix, nocache (.mat), priority=0, mono
9901    ///
9902    /// filename: `&str` -> Filename to save to
9903    ///
9904    /// <ins>Optional arguments</ins>
9905    ///
9906    /// keep: [`ForeignKeep`] -> Which metadata to retain
9907    ///
9908    /// background: `&[f64]` -> Background value
9909    ///
9910    /// page_height: `i32` -> Set page height for multipage save
9911    ///
9912    /// profile: `&str` -> Filename of ICC profile to embed
9913    pub fn matrixsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
9914        let vips_op_response = call(
9915            "matrixsave",
9916            option
9917                .set("in", self)
9918                .set(
9919                    "filename",
9920                    filename,
9921                ),
9922        )?;
9923        utils::result(
9924            vips_op_response,
9925            (),
9926            Error::OperationError("Matrixsave (vips_matrixsave) failed".to_string()),
9927        )
9928    }
9929
9930    /// VipsForeignSaveMatrixTarget (matrixsave_target), save image to matrix, nocache (.mat), priority=0, mono
9931    ///
9932    /// target: `&VipsTarget` -> Target to save to
9933    pub fn matrixsave_target(&self, target: &VipsTarget) -> Result<()> {
9934        let vips_op_response = call(
9935            "matrixsave_target",
9936            VOption::new()
9937                .set("in", self)
9938                .set(
9939                    "target",
9940                    target,
9941                ),
9942        )?;
9943        utils::result(
9944            vips_op_response,
9945            (),
9946            Error::OperationError("MatrixsaveTarget (vips_matrixsave_target) failed".to_string()),
9947        )
9948    }
9949
9950    /// VipsForeignSaveMatrixTarget (matrixsave_target), save image to matrix, nocache (.mat), priority=0, mono
9951    ///
9952    /// target: `&VipsTarget` -> Target to save to
9953    ///
9954    /// <ins>Optional arguments</ins>
9955    ///
9956    /// keep: [`ForeignKeep`] -> Which metadata to retain
9957    ///
9958    /// background: `&[f64]` -> Background value
9959    ///
9960    /// page_height: `i32` -> Set page height for multipage save
9961    ///
9962    /// profile: `&str` -> Filename of ICC profile to embed
9963    pub fn matrixsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
9964        let vips_op_response = call(
9965            "matrixsave_target",
9966            option
9967                .set("in", self)
9968                .set(
9969                    "target",
9970                    target,
9971                ),
9972        )?;
9973        utils::result(
9974            vips_op_response,
9975            (),
9976            Error::OperationError("MatrixsaveTarget (vips_matrixsave_target) failed".to_string()),
9977        )
9978    }
9979
9980    /// VipsMax (max), find image maximum
9981    /// returns `f64` - Output value
9982    pub fn max(&self) -> Result<f64> {
9983        let mut out_out: f64 = 0.0;
9984        let vips_op_response = call(
9985            "max",
9986            VOption::new()
9987                .set("in", self)
9988                .set(
9989                    "out",
9990                    &mut out_out,
9991                ),
9992        )?;
9993        utils::result(
9994            vips_op_response,
9995            out_out,
9996            Error::OperationError("Max (vips_max) failed".to_string()),
9997        )
9998    }
9999
10000    /// VipsMax (max), find image maximum
10001    /// returns `f64` - Output value
10002    ///
10003    /// <ins>Optional arguments</ins>
10004    ///
10005    /// x: `&mut i32` -> Horizontal position of maximum
10006    ///
10007    /// y: `&mut i32` -> Vertical position of maximum
10008    ///
10009    /// size: `i32` -> Number of maximum values to find
10010    ///
10011    /// out_array: `&mut Vec<f64>` -> Array of output values
10012    ///
10013    /// x_array: `&[i32]` -> Array of horizontal positions
10014    ///
10015    /// y_array: `&[i32]` -> Array of vertical positions
10016    pub fn max_with_opts(&self, option: VOption) -> Result<f64> {
10017        let mut out_out: f64 = 0.0;
10018        let vips_op_response = call(
10019            "max",
10020            option
10021                .set("in", self)
10022                .set(
10023                    "out",
10024                    &mut out_out,
10025                ),
10026        )?;
10027        utils::result(
10028            vips_op_response,
10029            out_out,
10030            Error::OperationError("Max (vips_max) failed".to_string()),
10031        )
10032    }
10033
10034    /// VipsMaxpair (maxpair), maximum of a pair of images
10035    /// returns `VipsImage` - Output image
10036    ///
10037    /// right: `&VipsImage` -> Right-hand image argument
10038    pub fn maxpair(&self, right: &VipsImage) -> Result<VipsImage> {
10039        let mut out_out = VipsImage::from(null_mut());
10040        let vips_op_response = call(
10041            "maxpair",
10042            VOption::new()
10043                .set(
10044                    "left",
10045                    self,
10046                )
10047                .set(
10048                    "right",
10049                    right,
10050                )
10051                .set(
10052                    "out",
10053                    &mut out_out,
10054                ),
10055        )?;
10056        utils::result(
10057            vips_op_response,
10058            out_out,
10059            Error::OperationError("Maxpair (vips_maxpair) failed".to_string()),
10060        )
10061    }
10062
10063    /// VipsMeasure (measure), measure a set of patches on a color chart
10064    /// returns `VipsImage` - Output array of statistics
10065    ///
10066    /// h: `i32` -> Number of patches across chart
10067    ///
10068    /// v: `i32` -> Number of patches down chart
10069    pub fn measure(&self, h: i32, v: i32) -> Result<VipsImage> {
10070        let mut out_out = VipsImage::from(null_mut());
10071        let vips_op_response = call(
10072            "measure",
10073            VOption::new()
10074                .set("in", self)
10075                .set(
10076                    "out",
10077                    &mut out_out,
10078                )
10079                .set("h", h)
10080                .set("v", v),
10081        )?;
10082        utils::result(
10083            vips_op_response,
10084            out_out,
10085            Error::OperationError("Measure (vips_measure) failed".to_string()),
10086        )
10087    }
10088
10089    /// VipsMeasure (measure), measure a set of patches on a color chart
10090    /// returns `VipsImage` - Output array of statistics
10091    ///
10092    /// h: `i32` -> Number of patches across chart
10093    ///
10094    /// v: `i32` -> Number of patches down chart
10095    ///
10096    /// <ins>Optional arguments</ins>
10097    ///
10098    /// left: `i32` -> Left edge of extract area
10099    ///
10100    /// top: `i32` -> Top edge of extract area
10101    ///
10102    /// width: `i32` -> Width of extract area
10103    ///
10104    /// height: `i32` -> Height of extract area
10105    pub fn measure_with_opts(&self, h: i32, v: i32, option: VOption) -> Result<VipsImage> {
10106        let mut out_out = VipsImage::from(null_mut());
10107        let vips_op_response = call(
10108            "measure",
10109            option
10110                .set("in", self)
10111                .set(
10112                    "out",
10113                    &mut out_out,
10114                )
10115                .set("h", h)
10116                .set("v", v),
10117        )?;
10118        utils::result(
10119            vips_op_response,
10120            out_out,
10121            Error::OperationError("Measure (vips_measure) failed".to_string()),
10122        )
10123    }
10124
10125    /// VipsMerge (merge), merge two images
10126    /// returns `VipsImage` - Output image
10127    ///
10128    /// sec: `&VipsImage` -> Secondary image
10129    ///
10130    /// direction: `Direction` -> Horizontal or vertical merge
10131    ///
10132    /// dx: `i32` -> Horizontal displacement from sec to ref
10133    ///
10134    /// dy: `i32` -> Vertical displacement from sec to ref
10135    pub fn merge(
10136        &self,
10137        sec: &VipsImage,
10138        direction: Direction,
10139        dx: i32,
10140        dy: i32,
10141    ) -> Result<VipsImage> {
10142        let mut out_out = VipsImage::from(null_mut());
10143        let vips_op_response = call(
10144            "merge",
10145            VOption::new()
10146                .set(
10147                    "ref", self,
10148                )
10149                .set("sec", sec)
10150                .set(
10151                    "out",
10152                    &mut out_out,
10153                )
10154                .set(
10155                    "direction",
10156                    direction as i32,
10157                )
10158                .set("dx", dx)
10159                .set("dy", dy),
10160        )?;
10161        utils::result(
10162            vips_op_response,
10163            out_out,
10164            Error::OperationError("Merge (vips_merge) failed".to_string()),
10165        )
10166    }
10167
10168    /// VipsMerge (merge), merge two images
10169    /// returns `VipsImage` - Output image
10170    ///
10171    /// sec: `&VipsImage` -> Secondary image
10172    ///
10173    /// direction: `Direction` -> Horizontal or vertical merge
10174    ///
10175    /// dx: `i32` -> Horizontal displacement from sec to ref
10176    ///
10177    /// dy: `i32` -> Vertical displacement from sec to ref
10178    ///
10179    /// <ins>Optional arguments</ins>
10180    ///
10181    /// mblend: `i32` -> Maximum blend size
10182    pub fn merge_with_opts(
10183        &self,
10184        sec: &VipsImage,
10185        direction: Direction,
10186        dx: i32,
10187        dy: i32,
10188        option: VOption,
10189    ) -> Result<VipsImage> {
10190        let mut out_out = VipsImage::from(null_mut());
10191        let vips_op_response = call(
10192            "merge",
10193            option
10194                .set(
10195                    "ref", self,
10196                )
10197                .set("sec", sec)
10198                .set(
10199                    "out",
10200                    &mut out_out,
10201                )
10202                .set(
10203                    "direction",
10204                    direction as i32,
10205                )
10206                .set("dx", dx)
10207                .set("dy", dy),
10208        )?;
10209        utils::result(
10210            vips_op_response,
10211            out_out,
10212            Error::OperationError("Merge (vips_merge) failed".to_string()),
10213        )
10214    }
10215
10216    /// VipsMin (min), find image minimum
10217    /// returns `f64` - Output value
10218    pub fn min(&self) -> Result<f64> {
10219        let mut out_out: f64 = 0.0;
10220        let vips_op_response = call(
10221            "min",
10222            VOption::new()
10223                .set("in", self)
10224                .set(
10225                    "out",
10226                    &mut out_out,
10227                ),
10228        )?;
10229        utils::result(
10230            vips_op_response,
10231            out_out,
10232            Error::OperationError("Min (vips_min) failed".to_string()),
10233        )
10234    }
10235
10236    /// VipsMin (min), find image minimum
10237    /// returns `f64` - Output value
10238    ///
10239    /// <ins>Optional arguments</ins>
10240    ///
10241    /// x: `&mut i32` -> Horizontal position of minimum
10242    ///
10243    /// y: `&mut i32` -> Vertical position of minimum
10244    ///
10245    /// size: `i32` -> Number of minimum values to find
10246    ///
10247    /// out_array: `&mut Vec<f64>` -> Array of output values
10248    ///
10249    /// x_array: `&[i32]` -> Array of horizontal positions
10250    ///
10251    /// y_array: `&[i32]` -> Array of vertical positions
10252    pub fn min_with_opts(&self, option: VOption) -> Result<f64> {
10253        let mut out_out: f64 = 0.0;
10254        let vips_op_response = call(
10255            "min",
10256            option
10257                .set("in", self)
10258                .set(
10259                    "out",
10260                    &mut out_out,
10261                ),
10262        )?;
10263        utils::result(
10264            vips_op_response,
10265            out_out,
10266            Error::OperationError("Min (vips_min) failed".to_string()),
10267        )
10268    }
10269
10270    /// VipsMinpair (minpair), minimum of a pair of images
10271    /// returns `VipsImage` - Output image
10272    ///
10273    /// right: `&VipsImage` -> Right-hand image argument
10274    pub fn minpair(&self, right: &VipsImage) -> Result<VipsImage> {
10275        let mut out_out = VipsImage::from(null_mut());
10276        let vips_op_response = call(
10277            "minpair",
10278            VOption::new()
10279                .set(
10280                    "left",
10281                    self,
10282                )
10283                .set(
10284                    "right",
10285                    right,
10286                )
10287                .set(
10288                    "out",
10289                    &mut out_out,
10290                ),
10291        )?;
10292        utils::result(
10293            vips_op_response,
10294            out_out,
10295            Error::OperationError("Minpair (vips_minpair) failed".to_string()),
10296        )
10297    }
10298
10299    /// VipsMorph (morph), morphology operation
10300    /// returns `VipsImage` - Output image
10301    ///
10302    /// mask: `&VipsImage` -> Input matrix image
10303    ///
10304    /// morph: `OperationMorphology` -> Morphological operation to perform
10305    pub fn morph(&self, mask: &VipsImage, morph: OperationMorphology) -> Result<VipsImage> {
10306        let mut out_out = VipsImage::from(null_mut());
10307        let vips_op_response = call(
10308            "morph",
10309            VOption::new()
10310                .set("in", self)
10311                .set(
10312                    "out",
10313                    &mut out_out,
10314                )
10315                .set(
10316                    "mask",
10317                    mask,
10318                )
10319                .set(
10320                    "morph",
10321                    morph as i32,
10322                ),
10323        )?;
10324        utils::result(
10325            vips_op_response,
10326            out_out,
10327            Error::OperationError("Morph (vips_morph) failed".to_string()),
10328        )
10329    }
10330
10331    /// VipsMosaic1 (mosaic1), first-order mosaic of two images
10332    /// returns `VipsImage` - Output image
10333    ///
10334    /// sec: `&VipsImage` -> Secondary image
10335    ///
10336    /// direction: `Direction` -> Horizontal or vertical mosaic
10337    ///
10338    /// xr1: `i32` -> Position of first reference tie-point
10339    ///
10340    /// yr1: `i32` -> Position of first reference tie-point
10341    ///
10342    /// xs1: `i32` -> Position of first secondary tie-point
10343    ///
10344    /// ys1: `i32` -> Position of first secondary tie-point
10345    ///
10346    /// xr2: `i32` -> Position of second reference tie-point
10347    ///
10348    /// yr2: `i32` -> Position of second reference tie-point
10349    ///
10350    /// xs2: `i32` -> Position of second secondary tie-point
10351    ///
10352    /// ys2: `i32` -> Position of second secondary tie-point
10353    pub fn mosaic1(
10354        &self,
10355        sec: &VipsImage,
10356        direction: Direction,
10357        xr1: i32,
10358        yr1: i32,
10359        xs1: i32,
10360        ys1: i32,
10361        xr2: i32,
10362        yr2: i32,
10363        xs2: i32,
10364        ys2: i32,
10365    ) -> Result<VipsImage> {
10366        let mut out_out = VipsImage::from(null_mut());
10367        let vips_op_response = call(
10368            "mosaic1",
10369            VOption::new()
10370                .set(
10371                    "ref", self,
10372                )
10373                .set("sec", sec)
10374                .set(
10375                    "out",
10376                    &mut out_out,
10377                )
10378                .set(
10379                    "direction",
10380                    direction as i32,
10381                )
10382                .set("xr1", xr1)
10383                .set("yr1", yr1)
10384                .set("xs1", xs1)
10385                .set("ys1", ys1)
10386                .set("xr2", xr2)
10387                .set("yr2", yr2)
10388                .set("xs2", xs2)
10389                .set("ys2", ys2),
10390        )?;
10391        utils::result(
10392            vips_op_response,
10393            out_out,
10394            Error::OperationError("Mosaic1 (vips_mosaic1) failed".to_string()),
10395        )
10396    }
10397
10398    /// VipsMosaic1 (mosaic1), first-order mosaic of two images
10399    /// returns `VipsImage` - Output image
10400    ///
10401    /// sec: `&VipsImage` -> Secondary image
10402    ///
10403    /// direction: `Direction` -> Horizontal or vertical mosaic
10404    ///
10405    /// xr1: `i32` -> Position of first reference tie-point
10406    ///
10407    /// yr1: `i32` -> Position of first reference tie-point
10408    ///
10409    /// xs1: `i32` -> Position of first secondary tie-point
10410    ///
10411    /// ys1: `i32` -> Position of first secondary tie-point
10412    ///
10413    /// xr2: `i32` -> Position of second reference tie-point
10414    ///
10415    /// yr2: `i32` -> Position of second reference tie-point
10416    ///
10417    /// xs2: `i32` -> Position of second secondary tie-point
10418    ///
10419    /// ys2: `i32` -> Position of second secondary tie-point
10420    ///
10421    /// <ins>Optional arguments</ins>
10422    ///
10423    /// hwindow: `i32` -> Half window size
10424    ///
10425    /// harea: `i32` -> Half area size
10426    ///
10427    /// search: `bool` -> Search to improve tie-points
10428    ///
10429    /// interpolate: `&VipsInterpolate` -> Interpolate pixels with this
10430    ///
10431    /// mblend: `i32` -> Maximum blend size
10432    pub fn mosaic1_with_opts(
10433        &self,
10434        sec: &VipsImage,
10435        direction: Direction,
10436        xr1: i32,
10437        yr1: i32,
10438        xs1: i32,
10439        ys1: i32,
10440        xr2: i32,
10441        yr2: i32,
10442        xs2: i32,
10443        ys2: i32,
10444        option: VOption,
10445    ) -> Result<VipsImage> {
10446        let mut out_out = VipsImage::from(null_mut());
10447        let vips_op_response = call(
10448            "mosaic1",
10449            option
10450                .set(
10451                    "ref", self,
10452                )
10453                .set("sec", sec)
10454                .set(
10455                    "out",
10456                    &mut out_out,
10457                )
10458                .set(
10459                    "direction",
10460                    direction as i32,
10461                )
10462                .set("xr1", xr1)
10463                .set("yr1", yr1)
10464                .set("xs1", xs1)
10465                .set("ys1", ys1)
10466                .set("xr2", xr2)
10467                .set("yr2", yr2)
10468                .set("xs2", xs2)
10469                .set("ys2", ys2),
10470        )?;
10471        utils::result(
10472            vips_op_response,
10473            out_out,
10474            Error::OperationError("Mosaic1 (vips_mosaic1) failed".to_string()),
10475        )
10476    }
10477
10478    /// VipsMosaic (mosaic), mosaic two images
10479    /// returns `VipsImage` - Output image
10480    ///
10481    /// sec: `&VipsImage` -> Secondary image
10482    ///
10483    /// direction: `Direction` -> Horizontal or vertical mosaic
10484    ///
10485    /// xref: `i32` -> Position of reference tie-point
10486    ///
10487    /// yref: `i32` -> Position of reference tie-point
10488    ///
10489    /// xsec: `i32` -> Position of secondary tie-point
10490    ///
10491    /// ysec: `i32` -> Position of secondary tie-point
10492    pub fn mosaic(
10493        &self,
10494        sec: &VipsImage,
10495        direction: Direction,
10496        xref: i32,
10497        yref: i32,
10498        xsec: i32,
10499        ysec: i32,
10500    ) -> Result<VipsImage> {
10501        let mut out_out = VipsImage::from(null_mut());
10502        let vips_op_response = call(
10503            "mosaic",
10504            VOption::new()
10505                .set(
10506                    "ref", self,
10507                )
10508                .set("sec", sec)
10509                .set(
10510                    "out",
10511                    &mut out_out,
10512                )
10513                .set(
10514                    "direction",
10515                    direction as i32,
10516                )
10517                .set(
10518                    "xref",
10519                    xref,
10520                )
10521                .set(
10522                    "yref",
10523                    yref,
10524                )
10525                .set(
10526                    "xsec",
10527                    xsec,
10528                )
10529                .set(
10530                    "ysec",
10531                    ysec,
10532                ),
10533        )?;
10534        utils::result(
10535            vips_op_response,
10536            out_out,
10537            Error::OperationError("Mosaic (vips_mosaic) failed".to_string()),
10538        )
10539    }
10540
10541    /// VipsMosaic (mosaic), mosaic two images
10542    /// returns `VipsImage` - Output image
10543    ///
10544    /// sec: `&VipsImage` -> Secondary image
10545    ///
10546    /// direction: `Direction` -> Horizontal or vertical mosaic
10547    ///
10548    /// xref: `i32` -> Position of reference tie-point
10549    ///
10550    /// yref: `i32` -> Position of reference tie-point
10551    ///
10552    /// xsec: `i32` -> Position of secondary tie-point
10553    ///
10554    /// ysec: `i32` -> Position of secondary tie-point
10555    ///
10556    /// <ins>Optional arguments</ins>
10557    ///
10558    /// hwindow: `i32` -> Half window size
10559    ///
10560    /// harea: `i32` -> Half area size
10561    ///
10562    /// mblend: `i32` -> Maximum blend size
10563    ///
10564    /// bandno: `i32` -> Band to search for features on
10565    ///
10566    /// dx0: `&mut i32` -> Detected integer offset
10567    ///
10568    /// dy0: `&mut i32` -> Detected integer offset
10569    ///
10570    /// scale1: `&mut f64` -> Detected scale
10571    ///
10572    /// angle1: `&mut f64` -> Detected rotation
10573    ///
10574    /// dy1: `&mut f64` -> Detected first-order displacement
10575    ///
10576    /// dx1: `&mut f64` -> Detected first-order displacement
10577    pub fn mosaic_with_opts(
10578        &self,
10579        sec: &VipsImage,
10580        direction: Direction,
10581        xref: i32,
10582        yref: i32,
10583        xsec: i32,
10584        ysec: i32,
10585        option: VOption,
10586    ) -> Result<VipsImage> {
10587        let mut out_out = VipsImage::from(null_mut());
10588        let vips_op_response = call(
10589            "mosaic",
10590            option
10591                .set(
10592                    "ref", self,
10593                )
10594                .set("sec", sec)
10595                .set(
10596                    "out",
10597                    &mut out_out,
10598                )
10599                .set(
10600                    "direction",
10601                    direction as i32,
10602                )
10603                .set(
10604                    "xref",
10605                    xref,
10606                )
10607                .set(
10608                    "yref",
10609                    yref,
10610                )
10611                .set(
10612                    "xsec",
10613                    xsec,
10614                )
10615                .set(
10616                    "ysec",
10617                    ysec,
10618                ),
10619        )?;
10620        utils::result(
10621            vips_op_response,
10622            out_out,
10623            Error::OperationError("Mosaic (vips_mosaic) failed".to_string()),
10624        )
10625    }
10626
10627    /// VipsMsb (msb), pick most-significant byte from an image
10628    /// returns `VipsImage` - Output image
10629    pub fn msb(&self) -> Result<VipsImage> {
10630        let mut out_out = VipsImage::from(null_mut());
10631        let vips_op_response = call(
10632            "msb",
10633            VOption::new()
10634                .set("in", self)
10635                .set(
10636                    "out",
10637                    &mut out_out,
10638                ),
10639        )?;
10640        utils::result(
10641            vips_op_response,
10642            out_out,
10643            Error::OperationError("Msb (vips_msb) failed".to_string()),
10644        )
10645    }
10646
10647    /// VipsMsb (msb), pick most-significant byte from an image
10648    /// returns `VipsImage` - Output image
10649    ///
10650    /// <ins>Optional arguments</ins>
10651    ///
10652    /// band: `i32` -> Band to msb
10653    pub fn msb_with_opts(&self, option: VOption) -> Result<VipsImage> {
10654        let mut out_out = VipsImage::from(null_mut());
10655        let vips_op_response = call(
10656            "msb",
10657            option
10658                .set("in", self)
10659                .set(
10660                    "out",
10661                    &mut out_out,
10662                ),
10663        )?;
10664        utils::result(
10665            vips_op_response,
10666            out_out,
10667            Error::OperationError("Msb (vips_msb) failed".to_string()),
10668        )
10669    }
10670
10671    /// VipsMultiply (multiply), multiply two images
10672    /// returns `VipsImage` - Output image
10673    ///
10674    /// right: `&VipsImage` -> Right-hand image argument
10675    pub fn multiply(&self, right: &VipsImage) -> Result<VipsImage> {
10676        let mut out_out = VipsImage::from(null_mut());
10677        let vips_op_response = call(
10678            "multiply",
10679            VOption::new()
10680                .set(
10681                    "left",
10682                    self,
10683                )
10684                .set(
10685                    "right",
10686                    right,
10687                )
10688                .set(
10689                    "out",
10690                    &mut out_out,
10691                ),
10692        )?;
10693        utils::result(
10694            vips_op_response,
10695            out_out,
10696            Error::OperationError("Multiply (vips_multiply) failed".to_string()),
10697        )
10698    }
10699
10700    /// VipsForeignLoadOpenexr (openexrload), load an OpenEXR image (.exr), priority=200, untrusted, is_a, get_flags, get_flags_filename, header, load
10701    /// returns `VipsImage` - Output image
10702    ///
10703    /// filename: `&str` -> Filename to load from
10704    pub fn openexrload(filename: &str) -> Result<VipsImage> {
10705        let mut out_out = VipsImage::from(null_mut());
10706        let vips_op_response = call(
10707            "openexrload",
10708            VOption::new()
10709                .set(
10710                    "filename",
10711                    filename,
10712                )
10713                .set(
10714                    "out",
10715                    &mut out_out,
10716                ),
10717        )?;
10718        utils::result(
10719            vips_op_response,
10720            out_out,
10721            Error::OperationError("Openexrload (vips_openexrload) failed".to_string()),
10722        )
10723    }
10724
10725    /// VipsForeignLoadOpenexr (openexrload), load an OpenEXR image (.exr), priority=200, untrusted, is_a, get_flags, get_flags_filename, header, load
10726    /// returns `VipsImage` - Output image
10727    ///
10728    /// filename: `&str` -> Filename to load from
10729    ///
10730    /// <ins>Optional arguments</ins>
10731    ///
10732    /// flags: [`ForeignFlags`] -> Flags for this file
10733    ///
10734    /// memory: `bool` -> Force open via memory
10735    ///
10736    /// access: [`Access`] -> Required access pattern for this file
10737    ///
10738    /// fail_on: [`FailOn`] -> Error level to fail on
10739    ///
10740    /// revalidate: `bool` -> Don't use a cached result for this operation
10741    pub fn openexrload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
10742        let mut out_out = VipsImage::from(null_mut());
10743        let vips_op_response = call(
10744            "openexrload",
10745            option
10746                .set(
10747                    "filename",
10748                    filename,
10749                )
10750                .set(
10751                    "out",
10752                    &mut out_out,
10753                ),
10754        )?;
10755        utils::result(
10756            vips_op_response,
10757            out_out,
10758            Error::OperationError("Openexrload (vips_openexrload) failed".to_string()),
10759        )
10760    }
10761
10762    /// VipsForeignLoadOpenslideFile (openslideload), load file with OpenSlide (.svs, .vms, .vmu, .ndpi, .scn, .mrxs, .svslide, .tif, .bif, .dcm), priority=100, untrusted, is_a, get_flags, get_flags_filename, header, load
10763    /// returns `VipsImage` - Output image
10764    ///
10765    /// filename: `&str` -> Filename to load from
10766    pub fn openslideload(filename: &str) -> Result<VipsImage> {
10767        let mut out_out = VipsImage::from(null_mut());
10768        let vips_op_response = call(
10769            "openslideload",
10770            VOption::new()
10771                .set(
10772                    "filename",
10773                    filename,
10774                )
10775                .set(
10776                    "out",
10777                    &mut out_out,
10778                ),
10779        )?;
10780        utils::result(
10781            vips_op_response,
10782            out_out,
10783            Error::OperationError("Openslideload (vips_openslideload) failed".to_string()),
10784        )
10785    }
10786
10787    /// VipsForeignLoadOpenslideFile (openslideload), load file with OpenSlide (.svs, .vms, .vmu, .ndpi, .scn, .mrxs, .svslide, .tif, .bif, .dcm), priority=100, untrusted, is_a, get_flags, get_flags_filename, header, load
10788    /// returns `VipsImage` - Output image
10789    ///
10790    /// filename: `&str` -> Filename to load from
10791    ///
10792    /// <ins>Optional arguments</ins>
10793    ///
10794    /// level: `i32` -> Load this level from the file
10795    ///
10796    /// autocrop: `bool` -> Crop to image bounds
10797    ///
10798    /// associated: `&str` -> Load this associated image
10799    ///
10800    /// attach_associated: `bool` -> Attach all associated images
10801    ///
10802    /// rgb: `bool` -> Output RGB (not RGBA)
10803    ///
10804    /// flags: [`ForeignFlags`] -> Flags for this file
10805    ///
10806    /// memory: `bool` -> Force open via memory
10807    ///
10808    /// access: [`Access`] -> Required access pattern for this file
10809    ///
10810    /// fail_on: [`FailOn`] -> Error level to fail on
10811    ///
10812    /// revalidate: `bool` -> Don't use a cached result for this operation
10813    pub fn openslideload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
10814        let mut out_out = VipsImage::from(null_mut());
10815        let vips_op_response = call(
10816            "openslideload",
10817            option
10818                .set(
10819                    "filename",
10820                    filename,
10821                )
10822                .set(
10823                    "out",
10824                    &mut out_out,
10825                ),
10826        )?;
10827        utils::result(
10828            vips_op_response,
10829            out_out,
10830            Error::OperationError("Openslideload (vips_openslideload) failed".to_string()),
10831        )
10832    }
10833
10834    /// VipsForeignLoadOpenslideSource (openslideload_source), load source with OpenSlide, nocache, priority=100, untrusted, is_a_source, get_flags, get_flags_filename, header, load
10835    /// returns `VipsImage` - Output image
10836    ///
10837    /// source: `&VipsSource` -> Source to load from
10838    pub fn openslideload_source(source: &VipsSource) -> Result<VipsImage> {
10839        let mut out_out = VipsImage::from(null_mut());
10840        let vips_op_response = call(
10841            "openslideload_source",
10842            VOption::new()
10843                .set(
10844                    "source",
10845                    source,
10846                )
10847                .set(
10848                    "out",
10849                    &mut out_out,
10850                ),
10851        )?;
10852        utils::result(
10853            vips_op_response,
10854            out_out,
10855            Error::OperationError(
10856                "OpenslideloadSource (vips_openslideload_source) failed".to_string(),
10857            ),
10858        )
10859    }
10860
10861    /// VipsForeignLoadOpenslideSource (openslideload_source), load source with OpenSlide, nocache, priority=100, untrusted, is_a_source, get_flags, get_flags_filename, header, load
10862    /// returns `VipsImage` - Output image
10863    ///
10864    /// source: `&VipsSource` -> Source to load from
10865    ///
10866    /// <ins>Optional arguments</ins>
10867    ///
10868    /// level: `i32` -> Load this level from the file
10869    ///
10870    /// autocrop: `bool` -> Crop to image bounds
10871    ///
10872    /// associated: `&str` -> Load this associated image
10873    ///
10874    /// attach_associated: `bool` -> Attach all associated images
10875    ///
10876    /// rgb: `bool` -> Output RGB (not RGBA)
10877    ///
10878    /// flags: [`ForeignFlags`] -> Flags for this file
10879    ///
10880    /// memory: `bool` -> Force open via memory
10881    ///
10882    /// access: [`Access`] -> Required access pattern for this file
10883    ///
10884    /// fail_on: [`FailOn`] -> Error level to fail on
10885    ///
10886    /// revalidate: `bool` -> Don't use a cached result for this operation
10887    pub fn openslideload_source_with_opts(
10888        source: &VipsSource,
10889        option: VOption,
10890    ) -> Result<VipsImage> {
10891        let mut out_out = VipsImage::from(null_mut());
10892        let vips_op_response = call(
10893            "openslideload_source",
10894            option
10895                .set(
10896                    "source",
10897                    source,
10898                )
10899                .set(
10900                    "out",
10901                    &mut out_out,
10902                ),
10903        )?;
10904        utils::result(
10905            vips_op_response,
10906            out_out,
10907            Error::OperationError(
10908                "OpenslideloadSource (vips_openslideload_source) failed".to_string(),
10909            ),
10910        )
10911    }
10912
10913    /// VipsForeignLoadPdfFile (pdfload), load PDF from file (poppler) (.pdf), priority=0, untrusted, is_a, get_flags, get_flags_filename, header, load
10914    /// returns `VipsImage` - Output image
10915    ///
10916    /// filename: `&str` -> Filename to load from
10917    pub fn pdfload(filename: &str) -> Result<VipsImage> {
10918        let mut out_out = VipsImage::from(null_mut());
10919        let vips_op_response = call(
10920            "pdfload",
10921            VOption::new()
10922                .set(
10923                    "filename",
10924                    filename,
10925                )
10926                .set(
10927                    "out",
10928                    &mut out_out,
10929                ),
10930        )?;
10931        utils::result(
10932            vips_op_response,
10933            out_out,
10934            Error::OperationError("Pdfload (vips_pdfload) failed".to_string()),
10935        )
10936    }
10937
10938    /// VipsForeignLoadPdfFile (pdfload), load PDF from file (poppler) (.pdf), priority=0, untrusted, is_a, get_flags, get_flags_filename, header, load
10939    /// returns `VipsImage` - Output image
10940    ///
10941    /// filename: `&str` -> Filename to load from
10942    ///
10943    /// <ins>Optional arguments</ins>
10944    ///
10945    /// page: `i32` -> First page to load
10946    ///
10947    /// n: `i32` -> Number of pages to load, -1 for all
10948    ///
10949    /// dpi: `f64` -> DPI to render at
10950    ///
10951    /// scale: `f64` -> Factor to scale by
10952    ///
10953    /// background: `&[f64]` -> Background colour
10954    ///
10955    /// password: `&str` -> Password to decrypt with
10956    ///
10957    /// page_box: [`ForeignPdfPageBox`] -> The region of the page to render
10958    ///
10959    /// flags: [`ForeignFlags`] -> Flags for this file
10960    ///
10961    /// memory: `bool` -> Force open via memory
10962    ///
10963    /// access: [`Access`] -> Required access pattern for this file
10964    ///
10965    /// fail_on: [`FailOn`] -> Error level to fail on
10966    ///
10967    /// revalidate: `bool` -> Don't use a cached result for this operation
10968    pub fn pdfload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
10969        let mut out_out = VipsImage::from(null_mut());
10970        let vips_op_response = call(
10971            "pdfload",
10972            option
10973                .set(
10974                    "filename",
10975                    filename,
10976                )
10977                .set(
10978                    "out",
10979                    &mut out_out,
10980                ),
10981        )?;
10982        utils::result(
10983            vips_op_response,
10984            out_out,
10985            Error::OperationError("Pdfload (vips_pdfload) failed".to_string()),
10986        )
10987    }
10988
10989    /// VipsForeignLoadPdfBuffer (pdfload_buffer), load PDF from buffer (poppler), priority=0, untrusted, is_a_buffer, get_flags, get_flags_filename, header, load
10990    /// returns `VipsImage` - Output image
10991    ///
10992    /// buffer: `&[u8]` -> Buffer to load from
10993    pub fn pdfload_buffer(buffer: &[u8]) -> Result<VipsImage> {
10994        let mut out_out = VipsImage::from(null_mut());
10995        let vips_op_response = call(
10996            "pdfload_buffer",
10997            VOption::new()
10998                .set(
10999                    "buffer",
11000                    buffer,
11001                )
11002                .set(
11003                    "out",
11004                    &mut out_out,
11005                ),
11006        )?;
11007        utils::result(
11008            vips_op_response,
11009            out_out,
11010            Error::OperationError("PdfloadBuffer (vips_pdfload_buffer) failed".to_string()),
11011        )
11012    }
11013
11014    /// VipsForeignLoadPdfBuffer (pdfload_buffer), load PDF from buffer (poppler), priority=0, untrusted, is_a_buffer, get_flags, get_flags_filename, header, load
11015    /// returns `VipsImage` - Output image
11016    ///
11017    /// buffer: `&[u8]` -> Buffer to load from
11018    ///
11019    /// <ins>Optional arguments</ins>
11020    ///
11021    /// page: `i32` -> First page to load
11022    ///
11023    /// n: `i32` -> Number of pages to load, -1 for all
11024    ///
11025    /// dpi: `f64` -> DPI to render at
11026    ///
11027    /// scale: `f64` -> Factor to scale by
11028    ///
11029    /// background: `&[f64]` -> Background colour
11030    ///
11031    /// password: `&str` -> Password to decrypt with
11032    ///
11033    /// page_box: [`ForeignPdfPageBox`] -> The region of the page to render
11034    ///
11035    /// flags: [`ForeignFlags`] -> Flags for this file
11036    ///
11037    /// memory: `bool` -> Force open via memory
11038    ///
11039    /// access: [`Access`] -> Required access pattern for this file
11040    ///
11041    /// fail_on: [`FailOn`] -> Error level to fail on
11042    ///
11043    /// revalidate: `bool` -> Don't use a cached result for this operation
11044    pub fn pdfload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
11045        let mut out_out = VipsImage::from(null_mut());
11046        let vips_op_response = call(
11047            "pdfload_buffer",
11048            option
11049                .set(
11050                    "buffer",
11051                    buffer,
11052                )
11053                .set(
11054                    "out",
11055                    &mut out_out,
11056                ),
11057        )?;
11058        utils::result(
11059            vips_op_response,
11060            out_out,
11061            Error::OperationError("PdfloadBuffer (vips_pdfload_buffer) failed".to_string()),
11062        )
11063    }
11064
11065    /// VipsForeignLoadPdfSource (pdfload_source), load PDF from source (poppler), nocache, priority=0, untrusted, is_a_source, get_flags, get_flags_filename, header, load
11066    /// returns `VipsImage` - Output image
11067    ///
11068    /// source: `&VipsSource` -> Source to load from
11069    pub fn pdfload_source(source: &VipsSource) -> Result<VipsImage> {
11070        let mut out_out = VipsImage::from(null_mut());
11071        let vips_op_response = call(
11072            "pdfload_source",
11073            VOption::new()
11074                .set(
11075                    "source",
11076                    source,
11077                )
11078                .set(
11079                    "out",
11080                    &mut out_out,
11081                ),
11082        )?;
11083        utils::result(
11084            vips_op_response,
11085            out_out,
11086            Error::OperationError("PdfloadSource (vips_pdfload_source) failed".to_string()),
11087        )
11088    }
11089
11090    /// VipsForeignLoadPdfSource (pdfload_source), load PDF from source (poppler), nocache, priority=0, untrusted, is_a_source, get_flags, get_flags_filename, header, load
11091    /// returns `VipsImage` - Output image
11092    ///
11093    /// source: `&VipsSource` -> Source to load from
11094    ///
11095    /// <ins>Optional arguments</ins>
11096    ///
11097    /// page: `i32` -> First page to load
11098    ///
11099    /// n: `i32` -> Number of pages to load, -1 for all
11100    ///
11101    /// dpi: `f64` -> DPI to render at
11102    ///
11103    /// scale: `f64` -> Factor to scale by
11104    ///
11105    /// background: `&[f64]` -> Background colour
11106    ///
11107    /// password: `&str` -> Password to decrypt with
11108    ///
11109    /// page_box: [`ForeignPdfPageBox`] -> The region of the page to render
11110    ///
11111    /// flags: [`ForeignFlags`] -> Flags for this file
11112    ///
11113    /// memory: `bool` -> Force open via memory
11114    ///
11115    /// access: [`Access`] -> Required access pattern for this file
11116    ///
11117    /// fail_on: [`FailOn`] -> Error level to fail on
11118    ///
11119    /// revalidate: `bool` -> Don't use a cached result for this operation
11120    pub fn pdfload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
11121        let mut out_out = VipsImage::from(null_mut());
11122        let vips_op_response = call(
11123            "pdfload_source",
11124            option
11125                .set(
11126                    "source",
11127                    source,
11128                )
11129                .set(
11130                    "out",
11131                    &mut out_out,
11132                ),
11133        )?;
11134        utils::result(
11135            vips_op_response,
11136            out_out,
11137            Error::OperationError("PdfloadSource (vips_pdfload_source) failed".to_string()),
11138        )
11139    }
11140
11141    /// VipsPercent (percent), find threshold for percent of pixels
11142    /// returns `i32` - Threshold above which lie percent of pixels
11143    ///
11144    /// percent: `f64` -> Percent of pixels
11145    pub fn percent(&self, percent: f64) -> Result<i32> {
11146        let mut threshold_out: i32 = 0;
11147        let vips_op_response = call(
11148            "percent",
11149            VOption::new()
11150                .set("in", self)
11151                .set(
11152                    "percent",
11153                    percent,
11154                )
11155                .set(
11156                    "threshold",
11157                    &mut threshold_out,
11158                ),
11159        )?;
11160        utils::result(
11161            vips_op_response,
11162            threshold_out,
11163            Error::OperationError("Percent (vips_percent) failed".to_string()),
11164        )
11165    }
11166
11167    /// VipsPerlin (perlin), make a perlin noise image
11168    /// returns `VipsImage` - Output image
11169    ///
11170    /// width: `i32` -> Image width in pixels
11171    ///
11172    /// height: `i32` -> Image height in pixels
11173    pub fn perlin(width: i32, height: i32) -> Result<VipsImage> {
11174        let mut out_out = VipsImage::from(null_mut());
11175        let vips_op_response = call(
11176            "perlin",
11177            VOption::new()
11178                .set(
11179                    "out",
11180                    &mut out_out,
11181                )
11182                .set(
11183                    "width",
11184                    width,
11185                )
11186                .set(
11187                    "height",
11188                    height,
11189                ),
11190        )?;
11191        utils::result(
11192            vips_op_response,
11193            out_out,
11194            Error::OperationError("Perlin (vips_perlin) failed".to_string()),
11195        )
11196    }
11197
11198    /// VipsPerlin (perlin), make a perlin noise image
11199    /// returns `VipsImage` - Output image
11200    ///
11201    /// width: `i32` -> Image width in pixels
11202    ///
11203    /// height: `i32` -> Image height in pixels
11204    ///
11205    /// <ins>Optional arguments</ins>
11206    ///
11207    /// cell_size: `i32` -> Size of Perlin cells
11208    ///
11209    /// uchar: `bool` -> Output an unsigned char image
11210    ///
11211    /// seed: `i32` -> Random number seed
11212    pub fn perlin_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
11213        let mut out_out = VipsImage::from(null_mut());
11214        let vips_op_response = call(
11215            "perlin",
11216            option
11217                .set(
11218                    "out",
11219                    &mut out_out,
11220                )
11221                .set(
11222                    "width",
11223                    width,
11224                )
11225                .set(
11226                    "height",
11227                    height,
11228                ),
11229        )?;
11230        utils::result(
11231            vips_op_response,
11232            out_out,
11233            Error::OperationError("Perlin (vips_perlin) failed".to_string()),
11234        )
11235    }
11236
11237    /// VipsPhasecor (phasecor), calculate phase correlation
11238    /// returns `VipsImage` - Output image
11239    ///
11240    /// in2: `&VipsImage` -> Second input image
11241    pub fn phasecor(&self, in2: &VipsImage) -> Result<VipsImage> {
11242        let mut out_out = VipsImage::from(null_mut());
11243        let vips_op_response = call(
11244            "phasecor",
11245            VOption::new()
11246                .set("in", self)
11247                .set("in2", in2)
11248                .set(
11249                    "out",
11250                    &mut out_out,
11251                ),
11252        )?;
11253        utils::result(
11254            vips_op_response,
11255            out_out,
11256            Error::OperationError("Phasecor (vips_phasecor) failed".to_string()),
11257        )
11258    }
11259
11260    /// VipsForeignLoadPngFile (pngload), load png from file (.png), priority=200, is_a, get_flags, get_flags_filename, header, load
11261    /// returns `VipsImage` - Output image
11262    ///
11263    /// filename: `&str` -> Filename to load from
11264    pub fn pngload(filename: &str) -> Result<VipsImage> {
11265        let mut out_out = VipsImage::from(null_mut());
11266        let vips_op_response = call(
11267            "pngload",
11268            VOption::new()
11269                .set(
11270                    "filename",
11271                    filename,
11272                )
11273                .set(
11274                    "out",
11275                    &mut out_out,
11276                ),
11277        )?;
11278        utils::result(
11279            vips_op_response,
11280            out_out,
11281            Error::OperationError("Pngload (vips_pngload) failed".to_string()),
11282        )
11283    }
11284
11285    /// VipsForeignLoadPngFile (pngload), load png from file (.png), priority=200, is_a, get_flags, get_flags_filename, header, load
11286    /// returns `VipsImage` - Output image
11287    ///
11288    /// filename: `&str` -> Filename to load from
11289    ///
11290    /// <ins>Optional arguments</ins>
11291    ///
11292    /// unlimited: `bool` -> Remove all denial of service limits
11293    ///
11294    /// flags: [`ForeignFlags`] -> Flags for this file
11295    ///
11296    /// memory: `bool` -> Force open via memory
11297    ///
11298    /// access: [`Access`] -> Required access pattern for this file
11299    ///
11300    /// fail_on: [`FailOn`] -> Error level to fail on
11301    ///
11302    /// revalidate: `bool` -> Don't use a cached result for this operation
11303    pub fn pngload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
11304        let mut out_out = VipsImage::from(null_mut());
11305        let vips_op_response = call(
11306            "pngload",
11307            option
11308                .set(
11309                    "filename",
11310                    filename,
11311                )
11312                .set(
11313                    "out",
11314                    &mut out_out,
11315                ),
11316        )?;
11317        utils::result(
11318            vips_op_response,
11319            out_out,
11320            Error::OperationError("Pngload (vips_pngload) failed".to_string()),
11321        )
11322    }
11323
11324    /// VipsForeignLoadPngBuffer (pngload_buffer), load png from buffer, priority=200, is_a_buffer, get_flags, get_flags_filename, header, load
11325    /// returns `VipsImage` - Output image
11326    ///
11327    /// buffer: `&[u8]` -> Buffer to load from
11328    pub fn pngload_buffer(buffer: &[u8]) -> Result<VipsImage> {
11329        let mut out_out = VipsImage::from(null_mut());
11330        let vips_op_response = call(
11331            "pngload_buffer",
11332            VOption::new()
11333                .set(
11334                    "buffer",
11335                    buffer,
11336                )
11337                .set(
11338                    "out",
11339                    &mut out_out,
11340                ),
11341        )?;
11342        utils::result(
11343            vips_op_response,
11344            out_out,
11345            Error::OperationError("PngloadBuffer (vips_pngload_buffer) failed".to_string()),
11346        )
11347    }
11348
11349    /// VipsForeignLoadPngBuffer (pngload_buffer), load png from buffer, priority=200, is_a_buffer, get_flags, get_flags_filename, header, load
11350    /// returns `VipsImage` - Output image
11351    ///
11352    /// buffer: `&[u8]` -> Buffer to load from
11353    ///
11354    /// <ins>Optional arguments</ins>
11355    ///
11356    /// unlimited: `bool` -> Remove all denial of service limits
11357    ///
11358    /// flags: [`ForeignFlags`] -> Flags for this file
11359    ///
11360    /// memory: `bool` -> Force open via memory
11361    ///
11362    /// access: [`Access`] -> Required access pattern for this file
11363    ///
11364    /// fail_on: [`FailOn`] -> Error level to fail on
11365    ///
11366    /// revalidate: `bool` -> Don't use a cached result for this operation
11367    pub fn pngload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
11368        let mut out_out = VipsImage::from(null_mut());
11369        let vips_op_response = call(
11370            "pngload_buffer",
11371            option
11372                .set(
11373                    "buffer",
11374                    buffer,
11375                )
11376                .set(
11377                    "out",
11378                    &mut out_out,
11379                ),
11380        )?;
11381        utils::result(
11382            vips_op_response,
11383            out_out,
11384            Error::OperationError("PngloadBuffer (vips_pngload_buffer) failed".to_string()),
11385        )
11386    }
11387
11388    /// VipsForeignLoadPngSource (pngload_source), load png from source, nocache, priority=200, is_a_source, get_flags, get_flags_filename, header, load
11389    /// returns `VipsImage` - Output image
11390    ///
11391    /// source: `&VipsSource` -> Source to load from
11392    pub fn pngload_source(source: &VipsSource) -> Result<VipsImage> {
11393        let mut out_out = VipsImage::from(null_mut());
11394        let vips_op_response = call(
11395            "pngload_source",
11396            VOption::new()
11397                .set(
11398                    "source",
11399                    source,
11400                )
11401                .set(
11402                    "out",
11403                    &mut out_out,
11404                ),
11405        )?;
11406        utils::result(
11407            vips_op_response,
11408            out_out,
11409            Error::OperationError("PngloadSource (vips_pngload_source) failed".to_string()),
11410        )
11411    }
11412
11413    /// VipsForeignLoadPngSource (pngload_source), load png from source, nocache, priority=200, is_a_source, get_flags, get_flags_filename, header, load
11414    /// returns `VipsImage` - Output image
11415    ///
11416    /// source: `&VipsSource` -> Source to load from
11417    ///
11418    /// <ins>Optional arguments</ins>
11419    ///
11420    /// unlimited: `bool` -> Remove all denial of service limits
11421    ///
11422    /// flags: [`ForeignFlags`] -> Flags for this file
11423    ///
11424    /// memory: `bool` -> Force open via memory
11425    ///
11426    /// access: [`Access`] -> Required access pattern for this file
11427    ///
11428    /// fail_on: [`FailOn`] -> Error level to fail on
11429    ///
11430    /// revalidate: `bool` -> Don't use a cached result for this operation
11431    pub fn pngload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
11432        let mut out_out = VipsImage::from(null_mut());
11433        let vips_op_response = call(
11434            "pngload_source",
11435            option
11436                .set(
11437                    "source",
11438                    source,
11439                )
11440                .set(
11441                    "out",
11442                    &mut out_out,
11443                ),
11444        )?;
11445        utils::result(
11446            vips_op_response,
11447            out_out,
11448            Error::OperationError("PngloadSource (vips_pngload_source) failed".to_string()),
11449        )
11450    }
11451
11452    /// VipsForeignSavePngFile (pngsave), save image to file as png, nocache (.png), priority=0, mono rgb alpha
11453    ///
11454    /// filename: `&str` -> Filename to save to
11455    pub fn pngsave(&self, filename: &str) -> Result<()> {
11456        let vips_op_response = call(
11457            "pngsave",
11458            VOption::new()
11459                .set("in", self)
11460                .set(
11461                    "filename",
11462                    filename,
11463                ),
11464        )?;
11465        utils::result(
11466            vips_op_response,
11467            (),
11468            Error::OperationError("Pngsave (vips_pngsave) failed".to_string()),
11469        )
11470    }
11471
11472    /// VipsForeignSavePngFile (pngsave), save image to file as png, nocache (.png), priority=0, mono rgb alpha
11473    ///
11474    /// filename: `&str` -> Filename to save to
11475    ///
11476    /// <ins>Optional arguments</ins>
11477    ///
11478    /// compression: `i32` -> Compression factor
11479    ///
11480    /// interlace: `bool` -> Interlace image
11481    ///
11482    /// filter: [`ForeignPngFilter`] -> libpng row filter flag(s)
11483    ///
11484    /// palette: `bool` -> Quantise to 8bpp palette
11485    ///
11486    /// Q: `i32` -> Quantisation quality
11487    ///
11488    /// dither: `f64` -> Amount of dithering
11489    ///
11490    /// bitdepth: `i32` -> Write as a 1, 2, 4, 8 or 16 bit image
11491    ///
11492    /// effort: `i32` -> Quantisation CPU effort
11493    ///
11494    /// keep: [`ForeignKeep`] -> Which metadata to retain
11495    ///
11496    /// background: `&[f64]` -> Background value
11497    ///
11498    /// page_height: `i32` -> Set page height for multipage save
11499    ///
11500    /// profile: `&str` -> Filename of ICC profile to embed
11501    pub fn pngsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
11502        let vips_op_response = call(
11503            "pngsave",
11504            option
11505                .set("in", self)
11506                .set(
11507                    "filename",
11508                    filename,
11509                ),
11510        )?;
11511        utils::result(
11512            vips_op_response,
11513            (),
11514            Error::OperationError("Pngsave (vips_pngsave) failed".to_string()),
11515        )
11516    }
11517
11518    /// VipsForeignSavePngBuffer (pngsave_buffer), save image to buffer as png, nocache (.png), priority=0, mono rgb alpha
11519    /// returns `Vec<u8>` - Buffer to save to
11520    pub fn pngsave_buffer(&self) -> Result<Vec<u8>> {
11521        let mut buffer_out = Vec::new();
11522        let vips_op_response = call(
11523            "pngsave_buffer",
11524            VOption::new()
11525                .set("in", self)
11526                .set(
11527                    "buffer",
11528                    &mut buffer_out,
11529                ),
11530        )?;
11531        utils::result(
11532            vips_op_response,
11533            buffer_out,
11534            Error::OperationError("PngsaveBuffer (vips_pngsave_buffer) failed".to_string()),
11535        )
11536    }
11537
11538    /// VipsForeignSavePngBuffer (pngsave_buffer), save image to buffer as png, nocache (.png), priority=0, mono rgb alpha
11539    /// returns `Vec<u8>` - Buffer to save to
11540    ///
11541    /// <ins>Optional arguments</ins>
11542    ///
11543    /// compression: `i32` -> Compression factor
11544    ///
11545    /// interlace: `bool` -> Interlace image
11546    ///
11547    /// filter: [`ForeignPngFilter`] -> libpng row filter flag(s)
11548    ///
11549    /// palette: `bool` -> Quantise to 8bpp palette
11550    ///
11551    /// Q: `i32` -> Quantisation quality
11552    ///
11553    /// dither: `f64` -> Amount of dithering
11554    ///
11555    /// bitdepth: `i32` -> Write as a 1, 2, 4, 8 or 16 bit image
11556    ///
11557    /// effort: `i32` -> Quantisation CPU effort
11558    ///
11559    /// keep: [`ForeignKeep`] -> Which metadata to retain
11560    ///
11561    /// background: `&[f64]` -> Background value
11562    ///
11563    /// page_height: `i32` -> Set page height for multipage save
11564    ///
11565    /// profile: `&str` -> Filename of ICC profile to embed
11566    pub fn pngsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
11567        let mut buffer_out = Vec::new();
11568        let vips_op_response = call(
11569            "pngsave_buffer",
11570            option
11571                .set("in", self)
11572                .set(
11573                    "buffer",
11574                    &mut buffer_out,
11575                ),
11576        )?;
11577        utils::result(
11578            vips_op_response,
11579            buffer_out,
11580            Error::OperationError("PngsaveBuffer (vips_pngsave_buffer) failed".to_string()),
11581        )
11582    }
11583
11584    /// VipsForeignSavePngTarget (pngsave_target), save image to target as PNG, nocache (.png), priority=0, mono rgb alpha
11585    ///
11586    /// target: `&VipsTarget` -> Target to save to
11587    pub fn pngsave_target(&self, target: &VipsTarget) -> Result<()> {
11588        let vips_op_response = call(
11589            "pngsave_target",
11590            VOption::new()
11591                .set("in", self)
11592                .set(
11593                    "target",
11594                    target,
11595                ),
11596        )?;
11597        utils::result(
11598            vips_op_response,
11599            (),
11600            Error::OperationError("PngsaveTarget (vips_pngsave_target) failed".to_string()),
11601        )
11602    }
11603
11604    /// VipsForeignSavePngTarget (pngsave_target), save image to target as PNG, nocache (.png), priority=0, mono rgb alpha
11605    ///
11606    /// target: `&VipsTarget` -> Target to save to
11607    ///
11608    /// <ins>Optional arguments</ins>
11609    ///
11610    /// compression: `i32` -> Compression factor
11611    ///
11612    /// interlace: `bool` -> Interlace image
11613    ///
11614    /// filter: [`ForeignPngFilter`] -> libpng row filter flag(s)
11615    ///
11616    /// palette: `bool` -> Quantise to 8bpp palette
11617    ///
11618    /// Q: `i32` -> Quantisation quality
11619    ///
11620    /// dither: `f64` -> Amount of dithering
11621    ///
11622    /// bitdepth: `i32` -> Write as a 1, 2, 4, 8 or 16 bit image
11623    ///
11624    /// effort: `i32` -> Quantisation CPU effort
11625    ///
11626    /// keep: [`ForeignKeep`] -> Which metadata to retain
11627    ///
11628    /// background: `&[f64]` -> Background value
11629    ///
11630    /// page_height: `i32` -> Set page height for multipage save
11631    ///
11632    /// profile: `&str` -> Filename of ICC profile to embed
11633    pub fn pngsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
11634        let vips_op_response = call(
11635            "pngsave_target",
11636            option
11637                .set("in", self)
11638                .set(
11639                    "target",
11640                    target,
11641                ),
11642        )?;
11643        utils::result(
11644            vips_op_response,
11645            (),
11646            Error::OperationError("PngsaveTarget (vips_pngsave_target) failed".to_string()),
11647        )
11648    }
11649
11650    /// VipsForeignLoadPpmFile (ppmload), load ppm from file (.pbm, .pgm, .ppm, .pfm, .pnm), priority=200, untrusted, is_a, get_flags, header, load
11651    /// returns `VipsImage` - Output image
11652    ///
11653    /// filename: `&str` -> Filename to load from
11654    pub fn ppmload(filename: &str) -> Result<VipsImage> {
11655        let mut out_out = VipsImage::from(null_mut());
11656        let vips_op_response = call(
11657            "ppmload",
11658            VOption::new()
11659                .set(
11660                    "filename",
11661                    filename,
11662                )
11663                .set(
11664                    "out",
11665                    &mut out_out,
11666                ),
11667        )?;
11668        utils::result(
11669            vips_op_response,
11670            out_out,
11671            Error::OperationError("Ppmload (vips_ppmload) failed".to_string()),
11672        )
11673    }
11674
11675    /// VipsForeignLoadPpmFile (ppmload), load ppm from file (.pbm, .pgm, .ppm, .pfm, .pnm), priority=200, untrusted, is_a, get_flags, header, load
11676    /// returns `VipsImage` - Output image
11677    ///
11678    /// filename: `&str` -> Filename to load from
11679    ///
11680    /// <ins>Optional arguments</ins>
11681    ///
11682    /// flags: [`ForeignFlags`] -> Flags for this file
11683    ///
11684    /// memory: `bool` -> Force open via memory
11685    ///
11686    /// access: [`Access`] -> Required access pattern for this file
11687    ///
11688    /// fail_on: [`FailOn`] -> Error level to fail on
11689    ///
11690    /// revalidate: `bool` -> Don't use a cached result for this operation
11691    pub fn ppmload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
11692        let mut out_out = VipsImage::from(null_mut());
11693        let vips_op_response = call(
11694            "ppmload",
11695            option
11696                .set(
11697                    "filename",
11698                    filename,
11699                )
11700                .set(
11701                    "out",
11702                    &mut out_out,
11703                ),
11704        )?;
11705        utils::result(
11706            vips_op_response,
11707            out_out,
11708            Error::OperationError("Ppmload (vips_ppmload) failed".to_string()),
11709        )
11710    }
11711
11712    /// VipsForeignLoadPpmBuffer (ppmload_buffer), load ppm from buffer (.pbm, .pgm, .ppm, .pfm, .pnm), priority=200, untrusted, is_a_buffer, get_flags, header, load
11713    /// returns `VipsImage` - Output image
11714    ///
11715    /// buffer: `&[u8]` -> Buffer to load from
11716    pub fn ppmload_buffer(buffer: &[u8]) -> Result<VipsImage> {
11717        let mut out_out = VipsImage::from(null_mut());
11718        let vips_op_response = call(
11719            "ppmload_buffer",
11720            VOption::new()
11721                .set(
11722                    "buffer",
11723                    buffer,
11724                )
11725                .set(
11726                    "out",
11727                    &mut out_out,
11728                ),
11729        )?;
11730        utils::result(
11731            vips_op_response,
11732            out_out,
11733            Error::OperationError("PpmloadBuffer (vips_ppmload_buffer) failed".to_string()),
11734        )
11735    }
11736
11737    /// VipsForeignLoadPpmBuffer (ppmload_buffer), load ppm from buffer (.pbm, .pgm, .ppm, .pfm, .pnm), priority=200, untrusted, is_a_buffer, get_flags, header, load
11738    /// returns `VipsImage` - Output image
11739    ///
11740    /// buffer: `&[u8]` -> Buffer to load from
11741    ///
11742    /// <ins>Optional arguments</ins>
11743    ///
11744    /// flags: [`ForeignFlags`] -> Flags for this file
11745    ///
11746    /// memory: `bool` -> Force open via memory
11747    ///
11748    /// access: [`Access`] -> Required access pattern for this file
11749    ///
11750    /// fail_on: [`FailOn`] -> Error level to fail on
11751    ///
11752    /// revalidate: `bool` -> Don't use a cached result for this operation
11753    pub fn ppmload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
11754        let mut out_out = VipsImage::from(null_mut());
11755        let vips_op_response = call(
11756            "ppmload_buffer",
11757            option
11758                .set(
11759                    "buffer",
11760                    buffer,
11761                )
11762                .set(
11763                    "out",
11764                    &mut out_out,
11765                ),
11766        )?;
11767        utils::result(
11768            vips_op_response,
11769            out_out,
11770            Error::OperationError("PpmloadBuffer (vips_ppmload_buffer) failed".to_string()),
11771        )
11772    }
11773
11774    /// VipsForeignLoadPpmSource (ppmload_source), load ppm from source, nocache (.pbm, .pgm, .ppm, .pfm, .pnm), priority=200, untrusted, is_a_source, get_flags, header, load
11775    /// returns `VipsImage` - Output image
11776    ///
11777    /// source: `&VipsSource` -> Source to load from
11778    pub fn ppmload_source(source: &VipsSource) -> Result<VipsImage> {
11779        let mut out_out = VipsImage::from(null_mut());
11780        let vips_op_response = call(
11781            "ppmload_source",
11782            VOption::new()
11783                .set(
11784                    "source",
11785                    source,
11786                )
11787                .set(
11788                    "out",
11789                    &mut out_out,
11790                ),
11791        )?;
11792        utils::result(
11793            vips_op_response,
11794            out_out,
11795            Error::OperationError("PpmloadSource (vips_ppmload_source) failed".to_string()),
11796        )
11797    }
11798
11799    /// VipsForeignLoadPpmSource (ppmload_source), load ppm from source, nocache (.pbm, .pgm, .ppm, .pfm, .pnm), priority=200, untrusted, is_a_source, get_flags, header, load
11800    /// returns `VipsImage` - Output image
11801    ///
11802    /// source: `&VipsSource` -> Source to load from
11803    ///
11804    /// <ins>Optional arguments</ins>
11805    ///
11806    /// flags: [`ForeignFlags`] -> Flags for this file
11807    ///
11808    /// memory: `bool` -> Force open via memory
11809    ///
11810    /// access: [`Access`] -> Required access pattern for this file
11811    ///
11812    /// fail_on: [`FailOn`] -> Error level to fail on
11813    ///
11814    /// revalidate: `bool` -> Don't use a cached result for this operation
11815    pub fn ppmload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
11816        let mut out_out = VipsImage::from(null_mut());
11817        let vips_op_response = call(
11818            "ppmload_source",
11819            option
11820                .set(
11821                    "source",
11822                    source,
11823                )
11824                .set(
11825                    "out",
11826                    &mut out_out,
11827                ),
11828        )?;
11829        utils::result(
11830            vips_op_response,
11831            out_out,
11832            Error::OperationError("PpmloadSource (vips_ppmload_source) failed".to_string()),
11833        )
11834    }
11835
11836    /// VipsForeignSavePpmFile (ppmsave), save image to ppm file, nocache (.pbm, .pgm, .ppm, .pfm, .pnm), priority=0,
11837    ///
11838    /// filename: `&str` -> Filename to save to
11839    pub fn ppmsave(&self, filename: &str) -> Result<()> {
11840        let vips_op_response = call(
11841            "ppmsave",
11842            VOption::new()
11843                .set("in", self)
11844                .set(
11845                    "filename",
11846                    filename,
11847                ),
11848        )?;
11849        utils::result(
11850            vips_op_response,
11851            (),
11852            Error::OperationError("Ppmsave (vips_ppmsave) failed".to_string()),
11853        )
11854    }
11855
11856    /// VipsForeignSavePpmFile (ppmsave), save image to ppm file, nocache (.pbm, .pgm, .ppm, .pfm, .pnm), priority=0,
11857    ///
11858    /// filename: `&str` -> Filename to save to
11859    ///
11860    /// <ins>Optional arguments</ins>
11861    ///
11862    /// format: [`ForeignPpmFormat`] -> Format to save in
11863    ///
11864    /// ascii: `bool` -> Save as ascii
11865    ///
11866    /// bitdepth: `i32` -> Set to 1 to write as a 1 bit image
11867    ///
11868    /// keep: [`ForeignKeep`] -> Which metadata to retain
11869    ///
11870    /// background: `&[f64]` -> Background value
11871    ///
11872    /// page_height: `i32` -> Set page height for multipage save
11873    ///
11874    /// profile: `&str` -> Filename of ICC profile to embed
11875    pub fn ppmsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
11876        let vips_op_response = call(
11877            "ppmsave",
11878            option
11879                .set("in", self)
11880                .set(
11881                    "filename",
11882                    filename,
11883                ),
11884        )?;
11885        utils::result(
11886            vips_op_response,
11887            (),
11888            Error::OperationError("Ppmsave (vips_ppmsave) failed".to_string()),
11889        )
11890    }
11891
11892    /// VipsForeignSavePpmTarget (ppmsave_target), save to ppm, nocache (.ppm), priority=0,
11893    ///
11894    /// target: `&VipsTarget` -> Target to save to
11895    pub fn ppmsave_target(&self, target: &VipsTarget) -> Result<()> {
11896        let vips_op_response = call(
11897            "ppmsave_target",
11898            VOption::new()
11899                .set("in", self)
11900                .set(
11901                    "target",
11902                    target,
11903                ),
11904        )?;
11905        utils::result(
11906            vips_op_response,
11907            (),
11908            Error::OperationError("PpmsaveTarget (vips_ppmsave_target) failed".to_string()),
11909        )
11910    }
11911
11912    /// VipsForeignSavePpmTarget (ppmsave_target), save to ppm, nocache (.ppm), priority=0,
11913    ///
11914    /// target: `&VipsTarget` -> Target to save to
11915    ///
11916    /// <ins>Optional arguments</ins>
11917    ///
11918    /// format: [`ForeignPpmFormat`] -> Format to save in
11919    ///
11920    /// ascii: `bool` -> Save as ascii
11921    ///
11922    /// bitdepth: `i32` -> Set to 1 to write as a 1 bit image
11923    ///
11924    /// keep: [`ForeignKeep`] -> Which metadata to retain
11925    ///
11926    /// background: `&[f64]` -> Background value
11927    ///
11928    /// page_height: `i32` -> Set page height for multipage save
11929    ///
11930    /// profile: `&str` -> Filename of ICC profile to embed
11931    pub fn ppmsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
11932        let vips_op_response = call(
11933            "ppmsave_target",
11934            option
11935                .set("in", self)
11936                .set(
11937                    "target",
11938                    target,
11939                ),
11940        )?;
11941        utils::result(
11942            vips_op_response,
11943            (),
11944            Error::OperationError("PpmsaveTarget (vips_ppmsave_target) failed".to_string()),
11945        )
11946    }
11947
11948    /// VipsPremultiply (premultiply), premultiply image alpha
11949    /// returns `VipsImage` - Output image
11950    pub fn premultiply(&self) -> Result<VipsImage> {
11951        let mut out_out = VipsImage::from(null_mut());
11952        let vips_op_response = call(
11953            "premultiply",
11954            VOption::new()
11955                .set("in", self)
11956                .set(
11957                    "out",
11958                    &mut out_out,
11959                ),
11960        )?;
11961        utils::result(
11962            vips_op_response,
11963            out_out,
11964            Error::OperationError("Premultiply (vips_premultiply) failed".to_string()),
11965        )
11966    }
11967
11968    /// VipsPremultiply (premultiply), premultiply image alpha
11969    /// returns `VipsImage` - Output image
11970    ///
11971    /// <ins>Optional arguments</ins>
11972    ///
11973    /// max_alpha: `f64` -> Maximum value of alpha channel
11974    pub fn premultiply_with_opts(&self, option: VOption) -> Result<VipsImage> {
11975        let mut out_out = VipsImage::from(null_mut());
11976        let vips_op_response = call(
11977            "premultiply",
11978            option
11979                .set("in", self)
11980                .set(
11981                    "out",
11982                    &mut out_out,
11983                ),
11984        )?;
11985        utils::result(
11986            vips_op_response,
11987            out_out,
11988            Error::OperationError("Premultiply (vips_premultiply) failed".to_string()),
11989        )
11990    }
11991
11992    /// VipsPrewitt (prewitt), Prewitt edge detector
11993    /// returns `VipsImage` - Output image
11994    pub fn prewitt(&self) -> Result<VipsImage> {
11995        let mut out_out = VipsImage::from(null_mut());
11996        let vips_op_response = call(
11997            "prewitt",
11998            VOption::new()
11999                .set("in", self)
12000                .set(
12001                    "out",
12002                    &mut out_out,
12003                ),
12004        )?;
12005        utils::result(
12006            vips_op_response,
12007            out_out,
12008            Error::OperationError("Prewitt (vips_prewitt) failed".to_string()),
12009        )
12010    }
12011
12012    /// VipsProfile (profile), find image profiles
12013    /// Tuple (
12014    /// VipsImage - First non-zero pixel in column
12015    /// VipsImage - First non-zero pixel in row
12016    ///)
12017    pub fn profile(
12018        &self,
12019    ) -> Result<(
12020        VipsImage,
12021        VipsImage,
12022    )> {
12023        let mut columns_out = VipsImage::from(null_mut());
12024        let mut rows_out = VipsImage::from(null_mut());
12025        let vips_op_response = call(
12026            "profile",
12027            VOption::new()
12028                .set("in", self)
12029                .set(
12030                    "columns",
12031                    &mut columns_out,
12032                )
12033                .set(
12034                    "rows",
12035                    &mut rows_out,
12036                ),
12037        )?;
12038        utils::result(
12039            vips_op_response,
12040            (
12041                columns_out,
12042                rows_out,
12043            ),
12044            Error::OperationError("Profile (vips_profile) failed".to_string()),
12045        )
12046    }
12047
12048    /// VipsProfileLoad (profile_load), load named ICC profile
12049    /// returns `Vec<u8>` - Loaded profile
12050    ///
12051    /// name: `&str` -> Profile name
12052    pub fn profile_load(name: &str) -> Result<Vec<u8>> {
12053        let mut profile_out = Vec::new();
12054        let vips_op_response = call(
12055            "profile_load",
12056            VOption::new()
12057                .set(
12058                    "name",
12059                    name,
12060                )
12061                .set(
12062                    "profile",
12063                    &mut profile_out,
12064                ),
12065        )?;
12066        utils::result(
12067            vips_op_response,
12068            profile_out,
12069            Error::OperationError("ProfileLoad (vips_profile_load) failed".to_string()),
12070        )
12071    }
12072
12073    /// VipsProject (project), find image projections
12074    /// Tuple (
12075    /// VipsImage - Sums of columns
12076    /// VipsImage - Sums of rows
12077    ///)
12078    pub fn project(
12079        &self,
12080    ) -> Result<(
12081        VipsImage,
12082        VipsImage,
12083    )> {
12084        let mut columns_out = VipsImage::from(null_mut());
12085        let mut rows_out = VipsImage::from(null_mut());
12086        let vips_op_response = call(
12087            "project",
12088            VOption::new()
12089                .set("in", self)
12090                .set(
12091                    "columns",
12092                    &mut columns_out,
12093                )
12094                .set(
12095                    "rows",
12096                    &mut rows_out,
12097                ),
12098        )?;
12099        utils::result(
12100            vips_op_response,
12101            (
12102                columns_out,
12103                rows_out,
12104            ),
12105            Error::OperationError("Project (vips_project) failed".to_string()),
12106        )
12107    }
12108
12109    /// VipsQuadratic (quadratic), resample an image with a quadratic transform
12110    /// returns `VipsImage` - Output image
12111    ///
12112    /// coeff: `&VipsImage` -> Coefficient matrix
12113    pub fn quadratic(&self, coeff: &VipsImage) -> Result<VipsImage> {
12114        let mut out_out = VipsImage::from(null_mut());
12115        let vips_op_response = call(
12116            "quadratic",
12117            VOption::new()
12118                .set("in", self)
12119                .set(
12120                    "out",
12121                    &mut out_out,
12122                )
12123                .set(
12124                    "coeff",
12125                    coeff,
12126                ),
12127        )?;
12128        utils::result(
12129            vips_op_response,
12130            out_out,
12131            Error::OperationError("Quadratic (vips_quadratic) failed".to_string()),
12132        )
12133    }
12134
12135    /// VipsQuadratic (quadratic), resample an image with a quadratic transform
12136    /// returns `VipsImage` - Output image
12137    ///
12138    /// coeff: `&VipsImage` -> Coefficient matrix
12139    ///
12140    /// <ins>Optional arguments</ins>
12141    ///
12142    /// interpolate: `&VipsInterpolate` -> Interpolate values with this
12143    pub fn quadratic_with_opts(&self, coeff: &VipsImage, option: VOption) -> Result<VipsImage> {
12144        let mut out_out = VipsImage::from(null_mut());
12145        let vips_op_response = call(
12146            "quadratic",
12147            option
12148                .set("in", self)
12149                .set(
12150                    "out",
12151                    &mut out_out,
12152                )
12153                .set(
12154                    "coeff",
12155                    coeff,
12156                ),
12157        )?;
12158        utils::result(
12159            vips_op_response,
12160            out_out,
12161            Error::OperationError("Quadratic (vips_quadratic) failed".to_string()),
12162        )
12163    }
12164
12165    /// VipsRad2float (rad2float), unpack Radiance coding to float RGB
12166    /// returns `VipsImage` - Output image
12167    pub fn rad2float(&self) -> Result<VipsImage> {
12168        let mut out_out = VipsImage::from(null_mut());
12169        let vips_op_response = call(
12170            "rad2float",
12171            VOption::new()
12172                .set("in", self)
12173                .set(
12174                    "out",
12175                    &mut out_out,
12176                ),
12177        )?;
12178        utils::result(
12179            vips_op_response,
12180            out_out,
12181            Error::OperationError("Rad2Float (vips_rad2float) failed".to_string()),
12182        )
12183    }
12184
12185    /// VipsForeignLoadRadFile (radload), load a Radiance image from a file (.hdr), priority=-50, untrusted, is_a, get_flags, get_flags_filename, header, load
12186    /// returns `VipsImage` - Output image
12187    ///
12188    /// filename: `&str` -> Filename to load from
12189    pub fn radload(filename: &str) -> Result<VipsImage> {
12190        let mut out_out = VipsImage::from(null_mut());
12191        let vips_op_response = call(
12192            "radload",
12193            VOption::new()
12194                .set(
12195                    "filename",
12196                    filename,
12197                )
12198                .set(
12199                    "out",
12200                    &mut out_out,
12201                ),
12202        )?;
12203        utils::result(
12204            vips_op_response,
12205            out_out,
12206            Error::OperationError("Radload (vips_radload) failed".to_string()),
12207        )
12208    }
12209
12210    /// VipsForeignLoadRadFile (radload), load a Radiance image from a file (.hdr), priority=-50, untrusted, is_a, get_flags, get_flags_filename, header, load
12211    /// returns `VipsImage` - Output image
12212    ///
12213    /// filename: `&str` -> Filename to load from
12214    ///
12215    /// <ins>Optional arguments</ins>
12216    ///
12217    /// flags: [`ForeignFlags`] -> Flags for this file
12218    ///
12219    /// memory: `bool` -> Force open via memory
12220    ///
12221    /// access: [`Access`] -> Required access pattern for this file
12222    ///
12223    /// fail_on: [`FailOn`] -> Error level to fail on
12224    ///
12225    /// revalidate: `bool` -> Don't use a cached result for this operation
12226    pub fn radload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
12227        let mut out_out = VipsImage::from(null_mut());
12228        let vips_op_response = call(
12229            "radload",
12230            option
12231                .set(
12232                    "filename",
12233                    filename,
12234                )
12235                .set(
12236                    "out",
12237                    &mut out_out,
12238                ),
12239        )?;
12240        utils::result(
12241            vips_op_response,
12242            out_out,
12243            Error::OperationError("Radload (vips_radload) failed".to_string()),
12244        )
12245    }
12246
12247    /// VipsForeignLoadRadBuffer (radload_buffer), load rad from buffer, priority=-50, untrusted, is_a_buffer, get_flags, get_flags_filename, header, load
12248    /// returns `VipsImage` - Output image
12249    ///
12250    /// buffer: `&[u8]` -> Buffer to load from
12251    pub fn radload_buffer(buffer: &[u8]) -> Result<VipsImage> {
12252        let mut out_out = VipsImage::from(null_mut());
12253        let vips_op_response = call(
12254            "radload_buffer",
12255            VOption::new()
12256                .set(
12257                    "buffer",
12258                    buffer,
12259                )
12260                .set(
12261                    "out",
12262                    &mut out_out,
12263                ),
12264        )?;
12265        utils::result(
12266            vips_op_response,
12267            out_out,
12268            Error::OperationError("RadloadBuffer (vips_radload_buffer) failed".to_string()),
12269        )
12270    }
12271
12272    /// VipsForeignLoadRadBuffer (radload_buffer), load rad from buffer, priority=-50, untrusted, is_a_buffer, get_flags, get_flags_filename, header, load
12273    /// returns `VipsImage` - Output image
12274    ///
12275    /// buffer: `&[u8]` -> Buffer to load from
12276    ///
12277    /// <ins>Optional arguments</ins>
12278    ///
12279    /// flags: [`ForeignFlags`] -> Flags for this file
12280    ///
12281    /// memory: `bool` -> Force open via memory
12282    ///
12283    /// access: [`Access`] -> Required access pattern for this file
12284    ///
12285    /// fail_on: [`FailOn`] -> Error level to fail on
12286    ///
12287    /// revalidate: `bool` -> Don't use a cached result for this operation
12288    pub fn radload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
12289        let mut out_out = VipsImage::from(null_mut());
12290        let vips_op_response = call(
12291            "radload_buffer",
12292            option
12293                .set(
12294                    "buffer",
12295                    buffer,
12296                )
12297                .set(
12298                    "out",
12299                    &mut out_out,
12300                ),
12301        )?;
12302        utils::result(
12303            vips_op_response,
12304            out_out,
12305            Error::OperationError("RadloadBuffer (vips_radload_buffer) failed".to_string()),
12306        )
12307    }
12308
12309    /// VipsForeignLoadRadSource (radload_source), load rad from source, nocache, priority=-50, untrusted, is_a_source, get_flags, get_flags_filename, header, load
12310    /// returns `VipsImage` - Output image
12311    ///
12312    /// source: `&VipsSource` -> Source to load from
12313    pub fn radload_source(source: &VipsSource) -> Result<VipsImage> {
12314        let mut out_out = VipsImage::from(null_mut());
12315        let vips_op_response = call(
12316            "radload_source",
12317            VOption::new()
12318                .set(
12319                    "source",
12320                    source,
12321                )
12322                .set(
12323                    "out",
12324                    &mut out_out,
12325                ),
12326        )?;
12327        utils::result(
12328            vips_op_response,
12329            out_out,
12330            Error::OperationError("RadloadSource (vips_radload_source) failed".to_string()),
12331        )
12332    }
12333
12334    /// VipsForeignLoadRadSource (radload_source), load rad from source, nocache, priority=-50, untrusted, is_a_source, get_flags, get_flags_filename, header, load
12335    /// returns `VipsImage` - Output image
12336    ///
12337    /// source: `&VipsSource` -> Source to load from
12338    ///
12339    /// <ins>Optional arguments</ins>
12340    ///
12341    /// flags: [`ForeignFlags`] -> Flags for this file
12342    ///
12343    /// memory: `bool` -> Force open via memory
12344    ///
12345    /// access: [`Access`] -> Required access pattern for this file
12346    ///
12347    /// fail_on: [`FailOn`] -> Error level to fail on
12348    ///
12349    /// revalidate: `bool` -> Don't use a cached result for this operation
12350    pub fn radload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
12351        let mut out_out = VipsImage::from(null_mut());
12352        let vips_op_response = call(
12353            "radload_source",
12354            option
12355                .set(
12356                    "source",
12357                    source,
12358                )
12359                .set(
12360                    "out",
12361                    &mut out_out,
12362                ),
12363        )?;
12364        utils::result(
12365            vips_op_response,
12366            out_out,
12367            Error::OperationError("RadloadSource (vips_radload_source) failed".to_string()),
12368        )
12369    }
12370
12371    /// VipsForeignSaveRadFile (radsave), save image to Radiance file, nocache (.hdr), priority=0, mono rgb
12372    ///
12373    /// filename: `&str` -> Filename to save to
12374    pub fn radsave(&self, filename: &str) -> Result<()> {
12375        let vips_op_response = call(
12376            "radsave",
12377            VOption::new()
12378                .set("in", self)
12379                .set(
12380                    "filename",
12381                    filename,
12382                ),
12383        )?;
12384        utils::result(
12385            vips_op_response,
12386            (),
12387            Error::OperationError("Radsave (vips_radsave) failed".to_string()),
12388        )
12389    }
12390
12391    /// VipsForeignSaveRadFile (radsave), save image to Radiance file, nocache (.hdr), priority=0, mono rgb
12392    ///
12393    /// filename: `&str` -> Filename to save to
12394    ///
12395    /// <ins>Optional arguments</ins>
12396    ///
12397    /// keep: [`ForeignKeep`] -> Which metadata to retain
12398    ///
12399    /// background: `&[f64]` -> Background value
12400    ///
12401    /// page_height: `i32` -> Set page height for multipage save
12402    ///
12403    /// profile: `&str` -> Filename of ICC profile to embed
12404    pub fn radsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
12405        let vips_op_response = call(
12406            "radsave",
12407            option
12408                .set("in", self)
12409                .set(
12410                    "filename",
12411                    filename,
12412                ),
12413        )?;
12414        utils::result(
12415            vips_op_response,
12416            (),
12417            Error::OperationError("Radsave (vips_radsave) failed".to_string()),
12418        )
12419    }
12420
12421    /// VipsForeignSaveRadBuffer (radsave_buffer), save image to Radiance buffer, nocache (.hdr), priority=0, mono rgb
12422    /// returns `Vec<u8>` - Buffer to save to
12423    pub fn radsave_buffer(&self) -> Result<Vec<u8>> {
12424        let mut buffer_out = Vec::new();
12425        let vips_op_response = call(
12426            "radsave_buffer",
12427            VOption::new()
12428                .set("in", self)
12429                .set(
12430                    "buffer",
12431                    &mut buffer_out,
12432                ),
12433        )?;
12434        utils::result(
12435            vips_op_response,
12436            buffer_out,
12437            Error::OperationError("RadsaveBuffer (vips_radsave_buffer) failed".to_string()),
12438        )
12439    }
12440
12441    /// VipsForeignSaveRadBuffer (radsave_buffer), save image to Radiance buffer, nocache (.hdr), priority=0, mono rgb
12442    /// returns `Vec<u8>` - Buffer to save to
12443    ///
12444    /// <ins>Optional arguments</ins>
12445    ///
12446    /// keep: [`ForeignKeep`] -> Which metadata to retain
12447    ///
12448    /// background: `&[f64]` -> Background value
12449    ///
12450    /// page_height: `i32` -> Set page height for multipage save
12451    ///
12452    /// profile: `&str` -> Filename of ICC profile to embed
12453    pub fn radsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
12454        let mut buffer_out = Vec::new();
12455        let vips_op_response = call(
12456            "radsave_buffer",
12457            option
12458                .set("in", self)
12459                .set(
12460                    "buffer",
12461                    &mut buffer_out,
12462                ),
12463        )?;
12464        utils::result(
12465            vips_op_response,
12466            buffer_out,
12467            Error::OperationError("RadsaveBuffer (vips_radsave_buffer) failed".to_string()),
12468        )
12469    }
12470
12471    /// VipsForeignSaveRadTarget (radsave_target), save image to Radiance target, nocache (.hdr), priority=0, mono rgb
12472    ///
12473    /// target: `&VipsTarget` -> Target to save to
12474    pub fn radsave_target(&self, target: &VipsTarget) -> Result<()> {
12475        let vips_op_response = call(
12476            "radsave_target",
12477            VOption::new()
12478                .set("in", self)
12479                .set(
12480                    "target",
12481                    target,
12482                ),
12483        )?;
12484        utils::result(
12485            vips_op_response,
12486            (),
12487            Error::OperationError("RadsaveTarget (vips_radsave_target) failed".to_string()),
12488        )
12489    }
12490
12491    /// VipsForeignSaveRadTarget (radsave_target), save image to Radiance target, nocache (.hdr), priority=0, mono rgb
12492    ///
12493    /// target: `&VipsTarget` -> Target to save to
12494    ///
12495    /// <ins>Optional arguments</ins>
12496    ///
12497    /// keep: [`ForeignKeep`] -> Which metadata to retain
12498    ///
12499    /// background: `&[f64]` -> Background value
12500    ///
12501    /// page_height: `i32` -> Set page height for multipage save
12502    ///
12503    /// profile: `&str` -> Filename of ICC profile to embed
12504    pub fn radsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
12505        let vips_op_response = call(
12506            "radsave_target",
12507            option
12508                .set("in", self)
12509                .set(
12510                    "target",
12511                    target,
12512                ),
12513        )?;
12514        utils::result(
12515            vips_op_response,
12516            (),
12517            Error::OperationError("RadsaveTarget (vips_radsave_target) failed".to_string()),
12518        )
12519    }
12520
12521    /// VipsRank (rank), rank filter
12522    /// returns `VipsImage` - Output image
12523    ///
12524    /// width: `i32` -> Window width in pixels
12525    ///
12526    /// height: `i32` -> Window height in pixels
12527    ///
12528    /// index: `i32` -> Select pixel at index
12529    pub fn rank(&self, width: i32, height: i32, index: i32) -> Result<VipsImage> {
12530        let mut out_out = VipsImage::from(null_mut());
12531        let vips_op_response = call(
12532            "rank",
12533            VOption::new()
12534                .set("in", self)
12535                .set(
12536                    "out",
12537                    &mut out_out,
12538                )
12539                .set(
12540                    "width",
12541                    width,
12542                )
12543                .set(
12544                    "height",
12545                    height,
12546                )
12547                .set(
12548                    "index",
12549                    index,
12550                ),
12551        )?;
12552        utils::result(
12553            vips_op_response,
12554            out_out,
12555            Error::OperationError("Rank (vips_rank) failed".to_string()),
12556        )
12557    }
12558
12559    /// VipsForeignLoadRaw (rawload), load raw data from a file, priority=0, untrusted, get_flags, get_flags_filename, header
12560    /// returns `VipsImage` - Output image
12561    ///
12562    /// filename: `&str` -> Filename to load from
12563    ///
12564    /// width: `i32` -> Image width in pixels
12565    ///
12566    /// height: `i32` -> Image height in pixels
12567    ///
12568    /// bands: `i32` -> Number of bands in image
12569    pub fn rawload(filename: &str, width: i32, height: i32, bands: i32) -> Result<VipsImage> {
12570        let mut out_out = VipsImage::from(null_mut());
12571        let vips_op_response = call(
12572            "rawload",
12573            VOption::new()
12574                .set(
12575                    "filename",
12576                    filename,
12577                )
12578                .set(
12579                    "out",
12580                    &mut out_out,
12581                )
12582                .set(
12583                    "width",
12584                    width,
12585                )
12586                .set(
12587                    "height",
12588                    height,
12589                )
12590                .set(
12591                    "bands",
12592                    bands,
12593                ),
12594        )?;
12595        utils::result(
12596            vips_op_response,
12597            out_out,
12598            Error::OperationError("Rawload (vips_rawload) failed".to_string()),
12599        )
12600    }
12601
12602    /// VipsForeignLoadRaw (rawload), load raw data from a file, priority=0, untrusted, get_flags, get_flags_filename, header
12603    /// returns `VipsImage` - Output image
12604    ///
12605    /// filename: `&str` -> Filename to load from
12606    ///
12607    /// width: `i32` -> Image width in pixels
12608    ///
12609    /// height: `i32` -> Image height in pixels
12610    ///
12611    /// bands: `i32` -> Number of bands in image
12612    ///
12613    /// <ins>Optional arguments</ins>
12614    ///
12615    /// offset: `u64` -> Offset in bytes from start of file
12616    ///
12617    /// format: [`BandFormat`] -> Pixel format in image
12618    ///
12619    /// interpretation: [`Interpretation`] -> Pixel interpretation
12620    ///
12621    /// flags: [`ForeignFlags`] -> Flags for this file
12622    ///
12623    /// memory: `bool` -> Force open via memory
12624    ///
12625    /// access: [`Access`] -> Required access pattern for this file
12626    ///
12627    /// fail_on: [`FailOn`] -> Error level to fail on
12628    ///
12629    /// revalidate: `bool` -> Don't use a cached result for this operation
12630    pub fn rawload_with_opts(
12631        filename: &str,
12632        width: i32,
12633        height: i32,
12634        bands: i32,
12635        option: VOption,
12636    ) -> Result<VipsImage> {
12637        let mut out_out = VipsImage::from(null_mut());
12638        let vips_op_response = call(
12639            "rawload",
12640            option
12641                .set(
12642                    "filename",
12643                    filename,
12644                )
12645                .set(
12646                    "out",
12647                    &mut out_out,
12648                )
12649                .set(
12650                    "width",
12651                    width,
12652                )
12653                .set(
12654                    "height",
12655                    height,
12656                )
12657                .set(
12658                    "bands",
12659                    bands,
12660                ),
12661        )?;
12662        utils::result(
12663            vips_op_response,
12664            out_out,
12665            Error::OperationError("Rawload (vips_rawload) failed".to_string()),
12666        )
12667    }
12668
12669    /// VipsForeignSaveRawFile (rawsave), save image to raw file, nocache (.raw), priority=0,
12670    ///
12671    /// filename: `&str` -> Filename to save to
12672    pub fn rawsave(&self, filename: &str) -> Result<()> {
12673        let vips_op_response = call(
12674            "rawsave",
12675            VOption::new()
12676                .set("in", self)
12677                .set(
12678                    "filename",
12679                    filename,
12680                ),
12681        )?;
12682        utils::result(
12683            vips_op_response,
12684            (),
12685            Error::OperationError("Rawsave (vips_rawsave) failed".to_string()),
12686        )
12687    }
12688
12689    /// VipsForeignSaveRawFile (rawsave), save image to raw file, nocache (.raw), priority=0,
12690    ///
12691    /// filename: `&str` -> Filename to save to
12692    ///
12693    /// <ins>Optional arguments</ins>
12694    ///
12695    /// keep: [`ForeignKeep`] -> Which metadata to retain
12696    ///
12697    /// background: `&[f64]` -> Background value
12698    ///
12699    /// page_height: `i32` -> Set page height for multipage save
12700    ///
12701    /// profile: `&str` -> Filename of ICC profile to embed
12702    pub fn rawsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
12703        let vips_op_response = call(
12704            "rawsave",
12705            option
12706                .set("in", self)
12707                .set(
12708                    "filename",
12709                    filename,
12710                ),
12711        )?;
12712        utils::result(
12713            vips_op_response,
12714            (),
12715            Error::OperationError("Rawsave (vips_rawsave) failed".to_string()),
12716        )
12717    }
12718
12719    /// VipsForeignSaveRawBuffer (rawsave_buffer), write raw image to buffer, nocache (.raw), priority=0,
12720    /// returns `Vec<u8>` - Buffer to save to
12721    pub fn rawsave_buffer(&self) -> Result<Vec<u8>> {
12722        let mut buffer_out = Vec::new();
12723        let vips_op_response = call(
12724            "rawsave_buffer",
12725            VOption::new()
12726                .set("in", self)
12727                .set(
12728                    "buffer",
12729                    &mut buffer_out,
12730                ),
12731        )?;
12732        utils::result(
12733            vips_op_response,
12734            buffer_out,
12735            Error::OperationError("RawsaveBuffer (vips_rawsave_buffer) failed".to_string()),
12736        )
12737    }
12738
12739    /// VipsForeignSaveRawBuffer (rawsave_buffer), write raw image to buffer, nocache (.raw), priority=0,
12740    /// returns `Vec<u8>` - Buffer to save to
12741    ///
12742    /// <ins>Optional arguments</ins>
12743    ///
12744    /// keep: [`ForeignKeep`] -> Which metadata to retain
12745    ///
12746    /// background: `&[f64]` -> Background value
12747    ///
12748    /// page_height: `i32` -> Set page height for multipage save
12749    ///
12750    /// profile: `&str` -> Filename of ICC profile to embed
12751    pub fn rawsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
12752        let mut buffer_out = Vec::new();
12753        let vips_op_response = call(
12754            "rawsave_buffer",
12755            option
12756                .set("in", self)
12757                .set(
12758                    "buffer",
12759                    &mut buffer_out,
12760                ),
12761        )?;
12762        utils::result(
12763            vips_op_response,
12764            buffer_out,
12765            Error::OperationError("RawsaveBuffer (vips_rawsave_buffer) failed".to_string()),
12766        )
12767    }
12768
12769    /// VipsForeignSaveRawTarget (rawsave_target), write raw image to target, nocache (.raw), priority=0,
12770    ///
12771    /// target: `&VipsTarget` -> Target to save to
12772    pub fn rawsave_target(&self, target: &VipsTarget) -> Result<()> {
12773        let vips_op_response = call(
12774            "rawsave_target",
12775            VOption::new()
12776                .set("in", self)
12777                .set(
12778                    "target",
12779                    target,
12780                ),
12781        )?;
12782        utils::result(
12783            vips_op_response,
12784            (),
12785            Error::OperationError("RawsaveTarget (vips_rawsave_target) failed".to_string()),
12786        )
12787    }
12788
12789    /// VipsForeignSaveRawTarget (rawsave_target), write raw image to target, nocache (.raw), priority=0,
12790    ///
12791    /// target: `&VipsTarget` -> Target to save to
12792    ///
12793    /// <ins>Optional arguments</ins>
12794    ///
12795    /// keep: [`ForeignKeep`] -> Which metadata to retain
12796    ///
12797    /// background: `&[f64]` -> Background value
12798    ///
12799    /// page_height: `i32` -> Set page height for multipage save
12800    ///
12801    /// profile: `&str` -> Filename of ICC profile to embed
12802    pub fn rawsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
12803        let vips_op_response = call(
12804            "rawsave_target",
12805            option
12806                .set("in", self)
12807                .set(
12808                    "target",
12809                    target,
12810                ),
12811        )?;
12812        utils::result(
12813            vips_op_response,
12814            (),
12815            Error::OperationError("RawsaveTarget (vips_rawsave_target) failed".to_string()),
12816        )
12817    }
12818
12819    /// VipsRecomb (recomb), linear recombination with matrix
12820    /// returns `VipsImage` - Output image
12821    ///
12822    /// m: `&VipsImage` -> Matrix of coefficients
12823    pub fn recomb(&self, m: &VipsImage) -> Result<VipsImage> {
12824        let mut out_out = VipsImage::from(null_mut());
12825        let vips_op_response = call(
12826            "recomb",
12827            VOption::new()
12828                .set("in", self)
12829                .set(
12830                    "out",
12831                    &mut out_out,
12832                )
12833                .set("m", m),
12834        )?;
12835        utils::result(
12836            vips_op_response,
12837            out_out,
12838            Error::OperationError("Recomb (vips_recomb) failed".to_string()),
12839        )
12840    }
12841
12842    /// VipsReduce (reduce), reduce an image
12843    /// returns `VipsImage` - Output image
12844    ///
12845    /// hshrink: `f64` -> Horizontal shrink factor
12846    ///
12847    /// vshrink: `f64` -> Vertical shrink factor
12848    pub fn reduce(&self, hshrink: f64, vshrink: f64) -> Result<VipsImage> {
12849        let mut out_out = VipsImage::from(null_mut());
12850        let vips_op_response = call(
12851            "reduce",
12852            VOption::new()
12853                .set("in", self)
12854                .set(
12855                    "out",
12856                    &mut out_out,
12857                )
12858                .set(
12859                    "hshrink",
12860                    hshrink,
12861                )
12862                .set(
12863                    "vshrink",
12864                    vshrink,
12865                ),
12866        )?;
12867        utils::result(
12868            vips_op_response,
12869            out_out,
12870            Error::OperationError("Reduce (vips_reduce) failed".to_string()),
12871        )
12872    }
12873
12874    /// VipsReduce (reduce), reduce an image
12875    /// returns `VipsImage` - Output image
12876    ///
12877    /// hshrink: `f64` -> Horizontal shrink factor
12878    ///
12879    /// vshrink: `f64` -> Vertical shrink factor
12880    ///
12881    /// <ins>Optional arguments</ins>
12882    ///
12883    /// kernel: [`Kernel`] -> Resampling kernel
12884    ///
12885    /// gap: `f64` -> Reducing gap
12886    pub fn reduce_with_opts(
12887        &self,
12888        hshrink: f64,
12889        vshrink: f64,
12890        option: VOption,
12891    ) -> Result<VipsImage> {
12892        let mut out_out = VipsImage::from(null_mut());
12893        let vips_op_response = call(
12894            "reduce",
12895            option
12896                .set("in", self)
12897                .set(
12898                    "out",
12899                    &mut out_out,
12900                )
12901                .set(
12902                    "hshrink",
12903                    hshrink,
12904                )
12905                .set(
12906                    "vshrink",
12907                    vshrink,
12908                ),
12909        )?;
12910        utils::result(
12911            vips_op_response,
12912            out_out,
12913            Error::OperationError("Reduce (vips_reduce) failed".to_string()),
12914        )
12915    }
12916
12917    /// VipsReduceh (reduceh), shrink an image horizontally
12918    /// returns `VipsImage` - Output image
12919    ///
12920    /// hshrink: `f64` -> Horizontal shrink factor
12921    pub fn reduceh(&self, hshrink: f64) -> Result<VipsImage> {
12922        let mut out_out = VipsImage::from(null_mut());
12923        let vips_op_response = call(
12924            "reduceh",
12925            VOption::new()
12926                .set("in", self)
12927                .set(
12928                    "out",
12929                    &mut out_out,
12930                )
12931                .set(
12932                    "hshrink",
12933                    hshrink,
12934                ),
12935        )?;
12936        utils::result(
12937            vips_op_response,
12938            out_out,
12939            Error::OperationError("Reduceh (vips_reduceh) failed".to_string()),
12940        )
12941    }
12942
12943    /// VipsReduceh (reduceh), shrink an image horizontally
12944    /// returns `VipsImage` - Output image
12945    ///
12946    /// hshrink: `f64` -> Horizontal shrink factor
12947    ///
12948    /// <ins>Optional arguments</ins>
12949    ///
12950    /// kernel: [`Kernel`] -> Resampling kernel
12951    ///
12952    /// gap: `f64` -> Reducing gap
12953    pub fn reduceh_with_opts(&self, hshrink: f64, option: VOption) -> Result<VipsImage> {
12954        let mut out_out = VipsImage::from(null_mut());
12955        let vips_op_response = call(
12956            "reduceh",
12957            option
12958                .set("in", self)
12959                .set(
12960                    "out",
12961                    &mut out_out,
12962                )
12963                .set(
12964                    "hshrink",
12965                    hshrink,
12966                ),
12967        )?;
12968        utils::result(
12969            vips_op_response,
12970            out_out,
12971            Error::OperationError("Reduceh (vips_reduceh) failed".to_string()),
12972        )
12973    }
12974
12975    /// VipsReducev (reducev), shrink an image vertically
12976    /// returns `VipsImage` - Output image
12977    ///
12978    /// vshrink: `f64` -> Vertical shrink factor
12979    pub fn reducev(&self, vshrink: f64) -> Result<VipsImage> {
12980        let mut out_out = VipsImage::from(null_mut());
12981        let vips_op_response = call(
12982            "reducev",
12983            VOption::new()
12984                .set("in", self)
12985                .set(
12986                    "out",
12987                    &mut out_out,
12988                )
12989                .set(
12990                    "vshrink",
12991                    vshrink,
12992                ),
12993        )?;
12994        utils::result(
12995            vips_op_response,
12996            out_out,
12997            Error::OperationError("Reducev (vips_reducev) failed".to_string()),
12998        )
12999    }
13000
13001    /// VipsReducev (reducev), shrink an image vertically
13002    /// returns `VipsImage` - Output image
13003    ///
13004    /// vshrink: `f64` -> Vertical shrink factor
13005    ///
13006    /// <ins>Optional arguments</ins>
13007    ///
13008    /// kernel: [`Kernel`] -> Resampling kernel
13009    ///
13010    /// gap: `f64` -> Reducing gap
13011    pub fn reducev_with_opts(&self, vshrink: f64, option: VOption) -> Result<VipsImage> {
13012        let mut out_out = VipsImage::from(null_mut());
13013        let vips_op_response = call(
13014            "reducev",
13015            option
13016                .set("in", self)
13017                .set(
13018                    "out",
13019                    &mut out_out,
13020                )
13021                .set(
13022                    "vshrink",
13023                    vshrink,
13024                ),
13025        )?;
13026        utils::result(
13027            vips_op_response,
13028            out_out,
13029            Error::OperationError("Reducev (vips_reducev) failed".to_string()),
13030        )
13031    }
13032
13033    /// VipsRelational (relational), relational operation on two images
13034    /// returns `VipsImage` - Output image
13035    ///
13036    /// right: `&VipsImage` -> Right-hand image argument
13037    ///
13038    /// relational: `OperationRelational` -> Relational to perform
13039    pub fn relational(
13040        &self,
13041        right: &VipsImage,
13042        relational: OperationRelational,
13043    ) -> Result<VipsImage> {
13044        let mut out_out = VipsImage::from(null_mut());
13045        let vips_op_response = call(
13046            "relational",
13047            VOption::new()
13048                .set(
13049                    "left",
13050                    self,
13051                )
13052                .set(
13053                    "right",
13054                    right,
13055                )
13056                .set(
13057                    "out",
13058                    &mut out_out,
13059                )
13060                .set(
13061                    "relational",
13062                    relational as i32,
13063                ),
13064        )?;
13065        utils::result(
13066            vips_op_response,
13067            out_out,
13068            Error::OperationError("Relational (vips_relational) failed".to_string()),
13069        )
13070    }
13071
13072    /// VipsRelationalConst (relational_const), relational operations against a constant
13073    /// returns `VipsImage` - Output image
13074    ///
13075    /// relational: `OperationRelational` -> Relational to perform
13076    ///
13077    /// c: `&[f64]` -> Array of constants
13078    pub fn relational_const(
13079        &self,
13080        relational: OperationRelational,
13081        c: &[f64],
13082    ) -> Result<VipsImage> {
13083        let mut out_out = VipsImage::from(null_mut());
13084        let vips_op_response = call(
13085            "relational_const",
13086            VOption::new()
13087                .set("in", self)
13088                .set(
13089                    "out",
13090                    &mut out_out,
13091                )
13092                .set(
13093                    "relational",
13094                    relational as i32,
13095                )
13096                .set("c", c),
13097        )?;
13098        utils::result(
13099            vips_op_response,
13100            out_out,
13101            Error::OperationError("RelationalConst (vips_relational_const) failed".to_string()),
13102        )
13103    }
13104
13105    /// VipsRemainder (remainder), remainder after integer division of two images
13106    /// returns `VipsImage` - Output image
13107    ///
13108    /// right: `&VipsImage` -> Right-hand image argument
13109    pub fn remainder(&self, right: &VipsImage) -> Result<VipsImage> {
13110        let mut out_out = VipsImage::from(null_mut());
13111        let vips_op_response = call(
13112            "remainder",
13113            VOption::new()
13114                .set(
13115                    "left",
13116                    self,
13117                )
13118                .set(
13119                    "right",
13120                    right,
13121                )
13122                .set(
13123                    "out",
13124                    &mut out_out,
13125                ),
13126        )?;
13127        utils::result(
13128            vips_op_response,
13129            out_out,
13130            Error::OperationError("Remainder (vips_remainder) failed".to_string()),
13131        )
13132    }
13133
13134    /// VipsRemainderConst (remainder_const), remainder after integer division of an image and a constant
13135    /// returns `VipsImage` - Output image
13136    ///
13137    /// c: `&[f64]` -> Array of constants
13138    pub fn remainder_const(&self, c: &[f64]) -> Result<VipsImage> {
13139        let mut out_out = VipsImage::from(null_mut());
13140        let vips_op_response = call(
13141            "remainder_const",
13142            VOption::new()
13143                .set("in", self)
13144                .set(
13145                    "out",
13146                    &mut out_out,
13147                )
13148                .set("c", c),
13149        )?;
13150        utils::result(
13151            vips_op_response,
13152            out_out,
13153            Error::OperationError("RemainderConst (vips_remainder_const) failed".to_string()),
13154        )
13155    }
13156
13157    /// VipsRemosaic (remosaic), rebuild an mosaiced image
13158    /// returns `VipsImage` - Output image
13159    ///
13160    /// old_str: `&str` -> Search for this string
13161    ///
13162    /// new_str: `&str` -> And swap for this string
13163    pub fn remosaic(&self, old_str: &str, new_str: &str) -> Result<VipsImage> {
13164        let mut out_out = VipsImage::from(null_mut());
13165        let vips_op_response = call(
13166            "remosaic",
13167            VOption::new()
13168                .set("in", self)
13169                .set(
13170                    "out",
13171                    &mut out_out,
13172                )
13173                .set(
13174                    "old_str",
13175                    old_str,
13176                )
13177                .set(
13178                    "new_str",
13179                    new_str,
13180                ),
13181        )?;
13182        utils::result(
13183            vips_op_response,
13184            out_out,
13185            Error::OperationError("Remosaic (vips_remosaic) failed".to_string()),
13186        )
13187    }
13188
13189    /// VipsReplicate (replicate), replicate an image
13190    /// returns `VipsImage` - Output image
13191    ///
13192    /// across: `i32` -> Repeat this many times horizontally
13193    ///
13194    /// down: `i32` -> Repeat this many times vertically
13195    pub fn replicate(&self, across: i32, down: i32) -> Result<VipsImage> {
13196        let mut out_out = VipsImage::from(null_mut());
13197        let vips_op_response = call(
13198            "replicate",
13199            VOption::new()
13200                .set("in", self)
13201                .set(
13202                    "out",
13203                    &mut out_out,
13204                )
13205                .set(
13206                    "across",
13207                    across,
13208                )
13209                .set(
13210                    "down",
13211                    down,
13212                ),
13213        )?;
13214        utils::result(
13215            vips_op_response,
13216            out_out,
13217            Error::OperationError("Replicate (vips_replicate) failed".to_string()),
13218        )
13219    }
13220
13221    /// VipsResize (resize), resize an image
13222    /// returns `VipsImage` - Output image
13223    ///
13224    /// scale: `f64` -> Scale image by this factor
13225    pub fn resize(&self, scale: f64) -> Result<VipsImage> {
13226        let mut out_out = VipsImage::from(null_mut());
13227        let vips_op_response = call(
13228            "resize",
13229            VOption::new()
13230                .set("in", self)
13231                .set(
13232                    "out",
13233                    &mut out_out,
13234                )
13235                .set(
13236                    "scale",
13237                    scale,
13238                ),
13239        )?;
13240        utils::result(
13241            vips_op_response,
13242            out_out,
13243            Error::OperationError("Resize (vips_resize) failed".to_string()),
13244        )
13245    }
13246
13247    /// VipsResize (resize), resize an image
13248    /// returns `VipsImage` - Output image
13249    ///
13250    /// scale: `f64` -> Scale image by this factor
13251    ///
13252    /// <ins>Optional arguments</ins>
13253    ///
13254    /// kernel: [`Kernel`] -> Resampling kernel
13255    ///
13256    /// gap: `f64` -> Reducing gap
13257    ///
13258    /// vscale: `f64` -> Vertical scale image by this factor
13259    pub fn resize_with_opts(&self, scale: f64, option: VOption) -> Result<VipsImage> {
13260        let mut out_out = VipsImage::from(null_mut());
13261        let vips_op_response = call(
13262            "resize",
13263            option
13264                .set("in", self)
13265                .set(
13266                    "out",
13267                    &mut out_out,
13268                )
13269                .set(
13270                    "scale",
13271                    scale,
13272                ),
13273        )?;
13274        utils::result(
13275            vips_op_response,
13276            out_out,
13277            Error::OperationError("Resize (vips_resize) failed".to_string()),
13278        )
13279    }
13280
13281    /// VipsRot45 (rot45), rotate an image
13282    /// returns `VipsImage` - Output image
13283    pub fn rot45(&self) -> Result<VipsImage> {
13284        let mut out_out = VipsImage::from(null_mut());
13285        let vips_op_response = call(
13286            "rot45",
13287            VOption::new()
13288                .set("in", self)
13289                .set(
13290                    "out",
13291                    &mut out_out,
13292                ),
13293        )?;
13294        utils::result(
13295            vips_op_response,
13296            out_out,
13297            Error::OperationError("Rot45 (vips_rot45) failed".to_string()),
13298        )
13299    }
13300
13301    /// VipsRot45 (rot45), rotate an image
13302    /// returns `VipsImage` - Output image
13303    ///
13304    /// <ins>Optional arguments</ins>
13305    ///
13306    /// angle: [`Angle45`] -> Angle to rotate image
13307    pub fn rot45_with_opts(&self, option: VOption) -> Result<VipsImage> {
13308        let mut out_out = VipsImage::from(null_mut());
13309        let vips_op_response = call(
13310            "rot45",
13311            option
13312                .set("in", self)
13313                .set(
13314                    "out",
13315                    &mut out_out,
13316                ),
13317        )?;
13318        utils::result(
13319            vips_op_response,
13320            out_out,
13321            Error::OperationError("Rot45 (vips_rot45) failed".to_string()),
13322        )
13323    }
13324
13325    /// VipsRot (rot), rotate an image
13326    /// returns `VipsImage` - Output image
13327    ///
13328    /// angle: `Angle` -> Angle to rotate image
13329    pub fn rot(&self, angle: Angle) -> Result<VipsImage> {
13330        let mut out_out = VipsImage::from(null_mut());
13331        let vips_op_response = call(
13332            "rot",
13333            VOption::new()
13334                .set("in", self)
13335                .set(
13336                    "out",
13337                    &mut out_out,
13338                )
13339                .set(
13340                    "angle",
13341                    angle as i32,
13342                ),
13343        )?;
13344        utils::result(
13345            vips_op_response,
13346            out_out,
13347            Error::OperationError("Rot (vips_rot) failed".to_string()),
13348        )
13349    }
13350
13351    /// VipsRotate (rotate), rotate an image by a number of degrees
13352    /// returns `VipsImage` - Output image
13353    ///
13354    /// angle: `f64` -> Rotate clockwise by this many degrees
13355    pub fn rotate(&self, angle: f64) -> Result<VipsImage> {
13356        let mut out_out = VipsImage::from(null_mut());
13357        let vips_op_response = call(
13358            "rotate",
13359            VOption::new()
13360                .set("in", self)
13361                .set(
13362                    "out",
13363                    &mut out_out,
13364                )
13365                .set(
13366                    "angle",
13367                    angle,
13368                ),
13369        )?;
13370        utils::result(
13371            vips_op_response,
13372            out_out,
13373            Error::OperationError("Rotate (vips_rotate) failed".to_string()),
13374        )
13375    }
13376
13377    /// VipsRotate (rotate), rotate an image by a number of degrees
13378    /// returns `VipsImage` - Output image
13379    ///
13380    /// angle: `f64` -> Rotate clockwise by this many degrees
13381    ///
13382    /// <ins>Optional arguments</ins>
13383    ///
13384    /// interpolate: `&VipsInterpolate` -> Interpolate pixels with this
13385    ///
13386    /// background: `&[f64]` -> Background value
13387    ///
13388    /// odx: `f64` -> Horizontal output displacement
13389    ///
13390    /// ody: `f64` -> Vertical output displacement
13391    ///
13392    /// idx: `f64` -> Horizontal input displacement
13393    ///
13394    /// idy: `f64` -> Vertical input displacement
13395    pub fn rotate_with_opts(&self, angle: f64, option: VOption) -> Result<VipsImage> {
13396        let mut out_out = VipsImage::from(null_mut());
13397        let vips_op_response = call(
13398            "rotate",
13399            option
13400                .set("in", self)
13401                .set(
13402                    "out",
13403                    &mut out_out,
13404                )
13405                .set(
13406                    "angle",
13407                    angle,
13408                ),
13409        )?;
13410        utils::result(
13411            vips_op_response,
13412            out_out,
13413            Error::OperationError("Rotate (vips_rotate) failed".to_string()),
13414        )
13415    }
13416
13417    /// VipsRound (round), perform a round function on an image
13418    /// returns `VipsImage` - Output image
13419    ///
13420    /// round: `OperationRound` -> Rounding operation to perform
13421    pub fn round(&self, round: OperationRound) -> Result<VipsImage> {
13422        let mut out_out = VipsImage::from(null_mut());
13423        let vips_op_response = call(
13424            "round",
13425            VOption::new()
13426                .set("in", self)
13427                .set(
13428                    "out",
13429                    &mut out_out,
13430                )
13431                .set(
13432                    "round",
13433                    round as i32,
13434                ),
13435        )?;
13436        utils::result(
13437            vips_op_response,
13438            out_out,
13439            Error::OperationError("Round (vips_round) failed".to_string()),
13440        )
13441    }
13442
13443    /// VipssRGB2HSV (sRGB2HSV), transform sRGB to HSV
13444    /// returns `VipsImage` - Output image
13445    pub fn sRGB2HSV(&self) -> Result<VipsImage> {
13446        let mut out_out = VipsImage::from(null_mut());
13447        let vips_op_response = call(
13448            "sRGB2HSV",
13449            VOption::new()
13450                .set("in", self)
13451                .set(
13452                    "out",
13453                    &mut out_out,
13454                ),
13455        )?;
13456        utils::result(
13457            vips_op_response,
13458            out_out,
13459            Error::OperationError("SRgb2Hsv (vips_sRGB2HSV) failed".to_string()),
13460        )
13461    }
13462
13463    /// VipssRGB2scRGB (sRGB2scRGB), convert an sRGB image to scRGB
13464    /// returns `VipsImage` - Output image
13465    pub fn sRGB2scRGB(&self) -> Result<VipsImage> {
13466        let mut out_out = VipsImage::from(null_mut());
13467        let vips_op_response = call(
13468            "sRGB2scRGB",
13469            VOption::new()
13470                .set("in", self)
13471                .set(
13472                    "out",
13473                    &mut out_out,
13474                ),
13475        )?;
13476        utils::result(
13477            vips_op_response,
13478            out_out,
13479            Error::OperationError("SRgb2ScRgb (vips_sRGB2scRGB) failed".to_string()),
13480        )
13481    }
13482
13483    /// VipsscRGB2BW (scRGB2BW), convert scRGB to BW
13484    /// returns `VipsImage` - Output image
13485    pub fn scRGB2BW(&self) -> Result<VipsImage> {
13486        let mut out_out = VipsImage::from(null_mut());
13487        let vips_op_response = call(
13488            "scRGB2BW",
13489            VOption::new()
13490                .set("in", self)
13491                .set(
13492                    "out",
13493                    &mut out_out,
13494                ),
13495        )?;
13496        utils::result(
13497            vips_op_response,
13498            out_out,
13499            Error::OperationError("ScRgb2Bw (vips_scRGB2BW) failed".to_string()),
13500        )
13501    }
13502
13503    /// VipsscRGB2BW (scRGB2BW), convert scRGB to BW
13504    /// returns `VipsImage` - Output image
13505    ///
13506    /// <ins>Optional arguments</ins>
13507    ///
13508    /// depth: `i32` -> Output device space depth in bits
13509    pub fn scRGB2BW_with_opts(&self, option: VOption) -> Result<VipsImage> {
13510        let mut out_out = VipsImage::from(null_mut());
13511        let vips_op_response = call(
13512            "scRGB2BW",
13513            option
13514                .set("in", self)
13515                .set(
13516                    "out",
13517                    &mut out_out,
13518                ),
13519        )?;
13520        utils::result(
13521            vips_op_response,
13522            out_out,
13523            Error::OperationError("ScRgb2Bw (vips_scRGB2BW) failed".to_string()),
13524        )
13525    }
13526
13527    /// VipsscRGB2XYZ (scRGB2XYZ), transform scRGB to XYZ
13528    /// returns `VipsImage` - Output image
13529    pub fn scRGB2XYZ(&self) -> Result<VipsImage> {
13530        let mut out_out = VipsImage::from(null_mut());
13531        let vips_op_response = call(
13532            "scRGB2XYZ",
13533            VOption::new()
13534                .set("in", self)
13535                .set(
13536                    "out",
13537                    &mut out_out,
13538                ),
13539        )?;
13540        utils::result(
13541            vips_op_response,
13542            out_out,
13543            Error::OperationError("ScRgb2Xyz (vips_scRGB2XYZ) failed".to_string()),
13544        )
13545    }
13546
13547    /// VipsscRGB2sRGB (scRGB2sRGB), convert scRGB to sRGB
13548    /// returns `VipsImage` - Output image
13549    pub fn scRGB2sRGB(&self) -> Result<VipsImage> {
13550        let mut out_out = VipsImage::from(null_mut());
13551        let vips_op_response = call(
13552            "scRGB2sRGB",
13553            VOption::new()
13554                .set("in", self)
13555                .set(
13556                    "out",
13557                    &mut out_out,
13558                ),
13559        )?;
13560        utils::result(
13561            vips_op_response,
13562            out_out,
13563            Error::OperationError("ScRgb2SRgb (vips_scRGB2sRGB) failed".to_string()),
13564        )
13565    }
13566
13567    /// VipsscRGB2sRGB (scRGB2sRGB), convert scRGB to sRGB
13568    /// returns `VipsImage` - Output image
13569    ///
13570    /// <ins>Optional arguments</ins>
13571    ///
13572    /// depth: `i32` -> Output device space depth in bits
13573    pub fn scRGB2sRGB_with_opts(&self, option: VOption) -> Result<VipsImage> {
13574        let mut out_out = VipsImage::from(null_mut());
13575        let vips_op_response = call(
13576            "scRGB2sRGB",
13577            option
13578                .set("in", self)
13579                .set(
13580                    "out",
13581                    &mut out_out,
13582                ),
13583        )?;
13584        utils::result(
13585            vips_op_response,
13586            out_out,
13587            Error::OperationError("ScRgb2SRgb (vips_scRGB2sRGB) failed".to_string()),
13588        )
13589    }
13590
13591    /// VipsScale (scale), scale an image to uchar
13592    /// returns `VipsImage` - Output image
13593    pub fn scale(&self) -> Result<VipsImage> {
13594        let mut out_out = VipsImage::from(null_mut());
13595        let vips_op_response = call(
13596            "scale",
13597            VOption::new()
13598                .set("in", self)
13599                .set(
13600                    "out",
13601                    &mut out_out,
13602                ),
13603        )?;
13604        utils::result(
13605            vips_op_response,
13606            out_out,
13607            Error::OperationError("Scale (vips_scale) failed".to_string()),
13608        )
13609    }
13610
13611    /// VipsScale (scale), scale an image to uchar
13612    /// returns `VipsImage` - Output image
13613    ///
13614    /// <ins>Optional arguments</ins>
13615    ///
13616    /// exp: `f64` -> Exponent for log scale
13617    ///
13618    /// log: `bool` -> Log scale
13619    pub fn scale_with_opts(&self, option: VOption) -> Result<VipsImage> {
13620        let mut out_out = VipsImage::from(null_mut());
13621        let vips_op_response = call(
13622            "scale",
13623            option
13624                .set("in", self)
13625                .set(
13626                    "out",
13627                    &mut out_out,
13628                ),
13629        )?;
13630        utils::result(
13631            vips_op_response,
13632            out_out,
13633            Error::OperationError("Scale (vips_scale) failed".to_string()),
13634        )
13635    }
13636
13637    /// VipsScharr (scharr), Scharr edge detector
13638    /// returns `VipsImage` - Output image
13639    pub fn scharr(&self) -> Result<VipsImage> {
13640        let mut out_out = VipsImage::from(null_mut());
13641        let vips_op_response = call(
13642            "scharr",
13643            VOption::new()
13644                .set("in", self)
13645                .set(
13646                    "out",
13647                    &mut out_out,
13648                ),
13649        )?;
13650        utils::result(
13651            vips_op_response,
13652            out_out,
13653            Error::OperationError("Scharr (vips_scharr) failed".to_string()),
13654        )
13655    }
13656
13657    /// VipsSdf (sdf), create an SDF image
13658    /// returns `VipsImage` - Output image
13659    ///
13660    /// width: `i32` -> Image width in pixels
13661    ///
13662    /// height: `i32` -> Image height in pixels
13663    ///
13664    /// shape: `SdfShape` -> SDF shape to create
13665    pub fn sdf(width: i32, height: i32, shape: SdfShape) -> Result<VipsImage> {
13666        let mut out_out = VipsImage::from(null_mut());
13667        let vips_op_response = call(
13668            "sdf",
13669            VOption::new()
13670                .set(
13671                    "out",
13672                    &mut out_out,
13673                )
13674                .set(
13675                    "width",
13676                    width,
13677                )
13678                .set(
13679                    "height",
13680                    height,
13681                )
13682                .set(
13683                    "shape",
13684                    shape as i32,
13685                ),
13686        )?;
13687        utils::result(
13688            vips_op_response,
13689            out_out,
13690            Error::OperationError("Sdf (vips_sdf) failed".to_string()),
13691        )
13692    }
13693
13694    /// VipsSdf (sdf), create an SDF image
13695    /// returns `VipsImage` - Output image
13696    ///
13697    /// width: `i32` -> Image width in pixels
13698    ///
13699    /// height: `i32` -> Image height in pixels
13700    ///
13701    /// shape: `SdfShape` -> SDF shape to create
13702    ///
13703    /// <ins>Optional arguments</ins>
13704    ///
13705    /// r: `f64` -> Radius
13706    ///
13707    /// a: `&[f64]` -> Point a
13708    ///
13709    /// b: `&[f64]` -> Point b
13710    ///
13711    /// corners: `&[f64]` -> Corner radii
13712    pub fn sdf_with_opts(
13713        width: i32,
13714        height: i32,
13715        shape: SdfShape,
13716        option: VOption,
13717    ) -> Result<VipsImage> {
13718        let mut out_out = VipsImage::from(null_mut());
13719        let vips_op_response = call(
13720            "sdf",
13721            option
13722                .set(
13723                    "out",
13724                    &mut out_out,
13725                )
13726                .set(
13727                    "width",
13728                    width,
13729                )
13730                .set(
13731                    "height",
13732                    height,
13733                )
13734                .set(
13735                    "shape",
13736                    shape as i32,
13737                ),
13738        )?;
13739        utils::result(
13740            vips_op_response,
13741            out_out,
13742            Error::OperationError("Sdf (vips_sdf) failed".to_string()),
13743        )
13744    }
13745
13746    /// VipsSequential (sequential), check sequential access
13747    /// returns `VipsImage` - Output image
13748    pub fn sequential(&self) -> Result<VipsImage> {
13749        let mut out_out = VipsImage::from(null_mut());
13750        let vips_op_response = call(
13751            "sequential",
13752            VOption::new()
13753                .set("in", self)
13754                .set(
13755                    "out",
13756                    &mut out_out,
13757                ),
13758        )?;
13759        utils::result(
13760            vips_op_response,
13761            out_out,
13762            Error::OperationError("Sequential (vips_sequential) failed".to_string()),
13763        )
13764    }
13765
13766    /// VipsSequential (sequential), check sequential access
13767    /// returns `VipsImage` - Output image
13768    ///
13769    /// <ins>Optional arguments</ins>
13770    ///
13771    /// tile_height: `i32` -> Tile height in pixels
13772    pub fn sequential_with_opts(&self, option: VOption) -> Result<VipsImage> {
13773        let mut out_out = VipsImage::from(null_mut());
13774        let vips_op_response = call(
13775            "sequential",
13776            option
13777                .set("in", self)
13778                .set(
13779                    "out",
13780                    &mut out_out,
13781                ),
13782        )?;
13783        utils::result(
13784            vips_op_response,
13785            out_out,
13786            Error::OperationError("Sequential (vips_sequential) failed".to_string()),
13787        )
13788    }
13789
13790    /// VipsSharpen (sharpen), unsharp masking for print
13791    /// returns `VipsImage` - Output image
13792    pub fn sharpen(&self) -> Result<VipsImage> {
13793        let mut out_out = VipsImage::from(null_mut());
13794        let vips_op_response = call(
13795            "sharpen",
13796            VOption::new()
13797                .set("in", self)
13798                .set(
13799                    "out",
13800                    &mut out_out,
13801                ),
13802        )?;
13803        utils::result(
13804            vips_op_response,
13805            out_out,
13806            Error::OperationError("Sharpen (vips_sharpen) failed".to_string()),
13807        )
13808    }
13809
13810    /// VipsSharpen (sharpen), unsharp masking for print
13811    /// returns `VipsImage` - Output image
13812    ///
13813    /// <ins>Optional arguments</ins>
13814    ///
13815    /// sigma: `f64` -> Sigma of Gaussian
13816    ///
13817    /// x1: `f64` -> Flat/jaggy threshold
13818    ///
13819    /// y2: `f64` -> Maximum brightening
13820    ///
13821    /// y3: `f64` -> Maximum darkening
13822    ///
13823    /// m1: `f64` -> Slope for flat areas
13824    ///
13825    /// m2: `f64` -> Slope for jaggy areas
13826    pub fn sharpen_with_opts(&self, option: VOption) -> Result<VipsImage> {
13827        let mut out_out = VipsImage::from(null_mut());
13828        let vips_op_response = call(
13829            "sharpen",
13830            option
13831                .set("in", self)
13832                .set(
13833                    "out",
13834                    &mut out_out,
13835                ),
13836        )?;
13837        utils::result(
13838            vips_op_response,
13839            out_out,
13840            Error::OperationError("Sharpen (vips_sharpen) failed".to_string()),
13841        )
13842    }
13843
13844    /// VipsShrink (shrink), shrink an image
13845    /// returns `VipsImage` - Output image
13846    ///
13847    /// hshrink: `f64` -> Horizontal shrink factor
13848    ///
13849    /// vshrink: `f64` -> Vertical shrink factor
13850    pub fn shrink(&self, hshrink: f64, vshrink: f64) -> Result<VipsImage> {
13851        let mut out_out = VipsImage::from(null_mut());
13852        let vips_op_response = call(
13853            "shrink",
13854            VOption::new()
13855                .set("in", self)
13856                .set(
13857                    "out",
13858                    &mut out_out,
13859                )
13860                .set(
13861                    "hshrink",
13862                    hshrink,
13863                )
13864                .set(
13865                    "vshrink",
13866                    vshrink,
13867                ),
13868        )?;
13869        utils::result(
13870            vips_op_response,
13871            out_out,
13872            Error::OperationError("Shrink (vips_shrink) failed".to_string()),
13873        )
13874    }
13875
13876    /// VipsShrink (shrink), shrink an image
13877    /// returns `VipsImage` - Output image
13878    ///
13879    /// hshrink: `f64` -> Horizontal shrink factor
13880    ///
13881    /// vshrink: `f64` -> Vertical shrink factor
13882    ///
13883    /// <ins>Optional arguments</ins>
13884    ///
13885    /// ceil: `bool` -> Round-up output dimensions
13886    pub fn shrink_with_opts(
13887        &self,
13888        hshrink: f64,
13889        vshrink: f64,
13890        option: VOption,
13891    ) -> Result<VipsImage> {
13892        let mut out_out = VipsImage::from(null_mut());
13893        let vips_op_response = call(
13894            "shrink",
13895            option
13896                .set("in", self)
13897                .set(
13898                    "out",
13899                    &mut out_out,
13900                )
13901                .set(
13902                    "hshrink",
13903                    hshrink,
13904                )
13905                .set(
13906                    "vshrink",
13907                    vshrink,
13908                ),
13909        )?;
13910        utils::result(
13911            vips_op_response,
13912            out_out,
13913            Error::OperationError("Shrink (vips_shrink) failed".to_string()),
13914        )
13915    }
13916
13917    /// VipsShrinkh (shrinkh), shrink an image horizontally
13918    /// returns `VipsImage` - Output image
13919    ///
13920    /// hshrink: `i32` -> Horizontal shrink factor
13921    pub fn shrinkh(&self, hshrink: i32) -> Result<VipsImage> {
13922        let mut out_out = VipsImage::from(null_mut());
13923        let vips_op_response = call(
13924            "shrinkh",
13925            VOption::new()
13926                .set("in", self)
13927                .set(
13928                    "out",
13929                    &mut out_out,
13930                )
13931                .set(
13932                    "hshrink",
13933                    hshrink,
13934                ),
13935        )?;
13936        utils::result(
13937            vips_op_response,
13938            out_out,
13939            Error::OperationError("Shrinkh (vips_shrinkh) failed".to_string()),
13940        )
13941    }
13942
13943    /// VipsShrinkh (shrinkh), shrink an image horizontally
13944    /// returns `VipsImage` - Output image
13945    ///
13946    /// hshrink: `i32` -> Horizontal shrink factor
13947    ///
13948    /// <ins>Optional arguments</ins>
13949    ///
13950    /// ceil: `bool` -> Round-up output dimensions
13951    pub fn shrinkh_with_opts(&self, hshrink: i32, option: VOption) -> Result<VipsImage> {
13952        let mut out_out = VipsImage::from(null_mut());
13953        let vips_op_response = call(
13954            "shrinkh",
13955            option
13956                .set("in", self)
13957                .set(
13958                    "out",
13959                    &mut out_out,
13960                )
13961                .set(
13962                    "hshrink",
13963                    hshrink,
13964                ),
13965        )?;
13966        utils::result(
13967            vips_op_response,
13968            out_out,
13969            Error::OperationError("Shrinkh (vips_shrinkh) failed".to_string()),
13970        )
13971    }
13972
13973    /// VipsShrinkv (shrinkv), shrink an image vertically
13974    /// returns `VipsImage` - Output image
13975    ///
13976    /// vshrink: `i32` -> Vertical shrink factor
13977    pub fn shrinkv(&self, vshrink: i32) -> Result<VipsImage> {
13978        let mut out_out = VipsImage::from(null_mut());
13979        let vips_op_response = call(
13980            "shrinkv",
13981            VOption::new()
13982                .set("in", self)
13983                .set(
13984                    "out",
13985                    &mut out_out,
13986                )
13987                .set(
13988                    "vshrink",
13989                    vshrink,
13990                ),
13991        )?;
13992        utils::result(
13993            vips_op_response,
13994            out_out,
13995            Error::OperationError("Shrinkv (vips_shrinkv) failed".to_string()),
13996        )
13997    }
13998
13999    /// VipsShrinkv (shrinkv), shrink an image vertically
14000    /// returns `VipsImage` - Output image
14001    ///
14002    /// vshrink: `i32` -> Vertical shrink factor
14003    ///
14004    /// <ins>Optional arguments</ins>
14005    ///
14006    /// ceil: `bool` -> Round-up output dimensions
14007    pub fn shrinkv_with_opts(&self, vshrink: i32, option: VOption) -> Result<VipsImage> {
14008        let mut out_out = VipsImage::from(null_mut());
14009        let vips_op_response = call(
14010            "shrinkv",
14011            option
14012                .set("in", self)
14013                .set(
14014                    "out",
14015                    &mut out_out,
14016                )
14017                .set(
14018                    "vshrink",
14019                    vshrink,
14020                ),
14021        )?;
14022        utils::result(
14023            vips_op_response,
14024            out_out,
14025            Error::OperationError("Shrinkv (vips_shrinkv) failed".to_string()),
14026        )
14027    }
14028
14029    /// VipsSign (sign), unit vector of pixel
14030    /// returns `VipsImage` - Output image
14031    pub fn sign(&self) -> Result<VipsImage> {
14032        let mut out_out = VipsImage::from(null_mut());
14033        let vips_op_response = call(
14034            "sign",
14035            VOption::new()
14036                .set("in", self)
14037                .set(
14038                    "out",
14039                    &mut out_out,
14040                ),
14041        )?;
14042        utils::result(
14043            vips_op_response,
14044            out_out,
14045            Error::OperationError("Sign (vips_sign) failed".to_string()),
14046        )
14047    }
14048
14049    /// VipsSimilarity (similarity), similarity transform of an image
14050    /// returns `VipsImage` - Output image
14051    pub fn similarity(&self) -> Result<VipsImage> {
14052        let mut out_out = VipsImage::from(null_mut());
14053        let vips_op_response = call(
14054            "similarity",
14055            VOption::new()
14056                .set("in", self)
14057                .set(
14058                    "out",
14059                    &mut out_out,
14060                ),
14061        )?;
14062        utils::result(
14063            vips_op_response,
14064            out_out,
14065            Error::OperationError("Similarity (vips_similarity) failed".to_string()),
14066        )
14067    }
14068
14069    /// VipsSimilarity (similarity), similarity transform of an image
14070    /// returns `VipsImage` - Output image
14071    ///
14072    /// <ins>Optional arguments</ins>
14073    ///
14074    /// scale: `f64` -> Scale by this factor
14075    ///
14076    /// angle: `f64` -> Rotate clockwise by this many degrees
14077    ///
14078    /// interpolate: `&VipsInterpolate` -> Interpolate pixels with this
14079    ///
14080    /// background: `&[f64]` -> Background value
14081    ///
14082    /// odx: `f64` -> Horizontal output displacement
14083    ///
14084    /// ody: `f64` -> Vertical output displacement
14085    ///
14086    /// idx: `f64` -> Horizontal input displacement
14087    ///
14088    /// idy: `f64` -> Vertical input displacement
14089    pub fn similarity_with_opts(&self, option: VOption) -> Result<VipsImage> {
14090        let mut out_out = VipsImage::from(null_mut());
14091        let vips_op_response = call(
14092            "similarity",
14093            option
14094                .set("in", self)
14095                .set(
14096                    "out",
14097                    &mut out_out,
14098                ),
14099        )?;
14100        utils::result(
14101            vips_op_response,
14102            out_out,
14103            Error::OperationError("Similarity (vips_similarity) failed".to_string()),
14104        )
14105    }
14106
14107    /// VipsSines (sines), make a 2D sine wave
14108    /// returns `VipsImage` - Output image
14109    ///
14110    /// width: `i32` -> Image width in pixels
14111    ///
14112    /// height: `i32` -> Image height in pixels
14113    pub fn sines(width: i32, height: i32) -> Result<VipsImage> {
14114        let mut out_out = VipsImage::from(null_mut());
14115        let vips_op_response = call(
14116            "sines",
14117            VOption::new()
14118                .set(
14119                    "out",
14120                    &mut out_out,
14121                )
14122                .set(
14123                    "width",
14124                    width,
14125                )
14126                .set(
14127                    "height",
14128                    height,
14129                ),
14130        )?;
14131        utils::result(
14132            vips_op_response,
14133            out_out,
14134            Error::OperationError("Sines (vips_sines) failed".to_string()),
14135        )
14136    }
14137
14138    /// VipsSines (sines), make a 2D sine wave
14139    /// returns `VipsImage` - Output image
14140    ///
14141    /// width: `i32` -> Image width in pixels
14142    ///
14143    /// height: `i32` -> Image height in pixels
14144    ///
14145    /// <ins>Optional arguments</ins>
14146    ///
14147    /// uchar: `bool` -> Output an unsigned char image
14148    ///
14149    /// hfreq: `f64` -> Horizontal spatial frequency
14150    ///
14151    /// vfreq: `f64` -> Vertical spatial frequency
14152    pub fn sines_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
14153        let mut out_out = VipsImage::from(null_mut());
14154        let vips_op_response = call(
14155            "sines",
14156            option
14157                .set(
14158                    "out",
14159                    &mut out_out,
14160                )
14161                .set(
14162                    "width",
14163                    width,
14164                )
14165                .set(
14166                    "height",
14167                    height,
14168                ),
14169        )?;
14170        utils::result(
14171            vips_op_response,
14172            out_out,
14173            Error::OperationError("Sines (vips_sines) failed".to_string()),
14174        )
14175    }
14176
14177    /// VipsSmartcrop (smartcrop), extract an area from an image
14178    /// returns `VipsImage` - Output image
14179    ///
14180    /// width: `i32` -> Width of extract area
14181    ///
14182    /// height: `i32` -> Height of extract area
14183    pub fn smartcrop(&self, width: i32, height: i32) -> Result<VipsImage> {
14184        let mut out_out = VipsImage::from(null_mut());
14185        let vips_op_response = call(
14186            "smartcrop",
14187            VOption::new()
14188                .set(
14189                    "input",
14190                    self,
14191                )
14192                .set(
14193                    "out",
14194                    &mut out_out,
14195                )
14196                .set(
14197                    "width",
14198                    width,
14199                )
14200                .set(
14201                    "height",
14202                    height,
14203                ),
14204        )?;
14205        utils::result(
14206            vips_op_response,
14207            out_out,
14208            Error::OperationError("Smartcrop (vips_smartcrop) failed".to_string()),
14209        )
14210    }
14211
14212    /// VipsSmartcrop (smartcrop), extract an area from an image
14213    /// returns `VipsImage` - Output image
14214    ///
14215    /// width: `i32` -> Width of extract area
14216    ///
14217    /// height: `i32` -> Height of extract area
14218    ///
14219    /// <ins>Optional arguments</ins>
14220    ///
14221    /// attention_x: `&mut i32` -> Horizontal position of attention centre
14222    ///
14223    /// attention_y: `&mut i32` -> Vertical position of attention centre
14224    ///
14225    /// interesting: [`Interesting`] -> How to measure interestingness
14226    ///
14227    /// premultiplied: `bool` -> Input image already has premultiplied alpha
14228    pub fn smartcrop_with_opts(
14229        &self,
14230        width: i32,
14231        height: i32,
14232        option: VOption,
14233    ) -> Result<VipsImage> {
14234        let mut out_out = VipsImage::from(null_mut());
14235        let vips_op_response = call(
14236            "smartcrop",
14237            option
14238                .set(
14239                    "input",
14240                    self,
14241                )
14242                .set(
14243                    "out",
14244                    &mut out_out,
14245                )
14246                .set(
14247                    "width",
14248                    width,
14249                )
14250                .set(
14251                    "height",
14252                    height,
14253                ),
14254        )?;
14255        utils::result(
14256            vips_op_response,
14257            out_out,
14258            Error::OperationError("Smartcrop (vips_smartcrop) failed".to_string()),
14259        )
14260    }
14261
14262    /// VipsSobel (sobel), Sobel edge detector
14263    /// returns `VipsImage` - Output image
14264    pub fn sobel(&self) -> Result<VipsImage> {
14265        let mut out_out = VipsImage::from(null_mut());
14266        let vips_op_response = call(
14267            "sobel",
14268            VOption::new()
14269                .set("in", self)
14270                .set(
14271                    "out",
14272                    &mut out_out,
14273                ),
14274        )?;
14275        utils::result(
14276            vips_op_response,
14277            out_out,
14278            Error::OperationError("Sobel (vips_sobel) failed".to_string()),
14279        )
14280    }
14281
14282    /// VipsSpcor (spcor), spatial correlation
14283    /// returns `VipsImage` - Output image
14284    ///
14285    /// refp: `&VipsImage` -> Input reference image
14286    pub fn spcor(&self, refp: &VipsImage) -> Result<VipsImage> {
14287        let mut out_out = VipsImage::from(null_mut());
14288        let vips_op_response = call(
14289            "spcor",
14290            VOption::new()
14291                .set("in", self)
14292                .set(
14293                    "ref", refp,
14294                )
14295                .set(
14296                    "out",
14297                    &mut out_out,
14298                ),
14299        )?;
14300        utils::result(
14301            vips_op_response,
14302            out_out,
14303            Error::OperationError("Spcor (vips_spcor) failed".to_string()),
14304        )
14305    }
14306
14307    /// VipsSpectrum (spectrum), make displayable power spectrum
14308    /// returns `VipsImage` - Output image
14309    pub fn spectrum(&self) -> Result<VipsImage> {
14310        let mut out_out = VipsImage::from(null_mut());
14311        let vips_op_response = call(
14312            "spectrum",
14313            VOption::new()
14314                .set("in", self)
14315                .set(
14316                    "out",
14317                    &mut out_out,
14318                ),
14319        )?;
14320        utils::result(
14321            vips_op_response,
14322            out_out,
14323            Error::OperationError("Spectrum (vips_spectrum) failed".to_string()),
14324        )
14325    }
14326
14327    /// VipsStats (stats), find many image stats
14328    /// returns `VipsImage` - Output array of statistics
14329    pub fn stats(&self) -> Result<VipsImage> {
14330        let mut out_out = VipsImage::from(null_mut());
14331        let vips_op_response = call(
14332            "stats",
14333            VOption::new()
14334                .set("in", self)
14335                .set(
14336                    "out",
14337                    &mut out_out,
14338                ),
14339        )?;
14340        utils::result(
14341            vips_op_response,
14342            out_out,
14343            Error::OperationError("Stats (vips_stats) failed".to_string()),
14344        )
14345    }
14346
14347    /// VipsStdif (stdif), statistical difference
14348    /// returns `VipsImage` - Output image
14349    ///
14350    /// width: `i32` -> Window width in pixels
14351    ///
14352    /// height: `i32` -> Window height in pixels
14353    pub fn stdif(&self, width: i32, height: i32) -> Result<VipsImage> {
14354        let mut out_out = VipsImage::from(null_mut());
14355        let vips_op_response = call(
14356            "stdif",
14357            VOption::new()
14358                .set("in", self)
14359                .set(
14360                    "out",
14361                    &mut out_out,
14362                )
14363                .set(
14364                    "width",
14365                    width,
14366                )
14367                .set(
14368                    "height",
14369                    height,
14370                ),
14371        )?;
14372        utils::result(
14373            vips_op_response,
14374            out_out,
14375            Error::OperationError("Stdif (vips_stdif) failed".to_string()),
14376        )
14377    }
14378
14379    /// VipsStdif (stdif), statistical difference
14380    /// returns `VipsImage` - Output image
14381    ///
14382    /// width: `i32` -> Window width in pixels
14383    ///
14384    /// height: `i32` -> Window height in pixels
14385    ///
14386    /// <ins>Optional arguments</ins>
14387    ///
14388    /// s0: `f64` -> New deviation
14389    ///
14390    /// b: `f64` -> Weight of new deviation
14391    ///
14392    /// m0: `f64` -> New mean
14393    ///
14394    /// a: `f64` -> Weight of new mean
14395    pub fn stdif_with_opts(&self, width: i32, height: i32, option: VOption) -> Result<VipsImage> {
14396        let mut out_out = VipsImage::from(null_mut());
14397        let vips_op_response = call(
14398            "stdif",
14399            option
14400                .set("in", self)
14401                .set(
14402                    "out",
14403                    &mut out_out,
14404                )
14405                .set(
14406                    "width",
14407                    width,
14408                )
14409                .set(
14410                    "height",
14411                    height,
14412                ),
14413        )?;
14414        utils::result(
14415            vips_op_response,
14416            out_out,
14417            Error::OperationError("Stdif (vips_stdif) failed".to_string()),
14418        )
14419    }
14420
14421    /// VipsSubsample (subsample), subsample an image
14422    /// returns `VipsImage` - Output image
14423    ///
14424    /// xfac: `i32` -> Horizontal subsample factor
14425    ///
14426    /// yfac: `i32` -> Vertical subsample factor
14427    pub fn subsample(&self, xfac: i32, yfac: i32) -> Result<VipsImage> {
14428        let mut out_out = VipsImage::from(null_mut());
14429        let vips_op_response = call(
14430            "subsample",
14431            VOption::new()
14432                .set(
14433                    "input",
14434                    self,
14435                )
14436                .set(
14437                    "out",
14438                    &mut out_out,
14439                )
14440                .set(
14441                    "xfac",
14442                    xfac,
14443                )
14444                .set(
14445                    "yfac",
14446                    yfac,
14447                ),
14448        )?;
14449        utils::result(
14450            vips_op_response,
14451            out_out,
14452            Error::OperationError("Subsample (vips_subsample) failed".to_string()),
14453        )
14454    }
14455
14456    /// VipsSubsample (subsample), subsample an image
14457    /// returns `VipsImage` - Output image
14458    ///
14459    /// xfac: `i32` -> Horizontal subsample factor
14460    ///
14461    /// yfac: `i32` -> Vertical subsample factor
14462    ///
14463    /// <ins>Optional arguments</ins>
14464    ///
14465    /// point: `bool` -> Point sample
14466    pub fn subsample_with_opts(&self, xfac: i32, yfac: i32, option: VOption) -> Result<VipsImage> {
14467        let mut out_out = VipsImage::from(null_mut());
14468        let vips_op_response = call(
14469            "subsample",
14470            option
14471                .set(
14472                    "input",
14473                    self,
14474                )
14475                .set(
14476                    "out",
14477                    &mut out_out,
14478                )
14479                .set(
14480                    "xfac",
14481                    xfac,
14482                )
14483                .set(
14484                    "yfac",
14485                    yfac,
14486                ),
14487        )?;
14488        utils::result(
14489            vips_op_response,
14490            out_out,
14491            Error::OperationError("Subsample (vips_subsample) failed".to_string()),
14492        )
14493    }
14494
14495    /// VipsSubtract (subtract), subtract two images
14496    /// returns `VipsImage` - Output image
14497    ///
14498    /// right: `&VipsImage` -> Right-hand image argument
14499    pub fn subtract(&self, right: &VipsImage) -> Result<VipsImage> {
14500        let mut out_out = VipsImage::from(null_mut());
14501        let vips_op_response = call(
14502            "subtract",
14503            VOption::new()
14504                .set(
14505                    "left",
14506                    self,
14507                )
14508                .set(
14509                    "right",
14510                    right,
14511                )
14512                .set(
14513                    "out",
14514                    &mut out_out,
14515                ),
14516        )?;
14517        utils::result(
14518            vips_op_response,
14519            out_out,
14520            Error::OperationError("Subtract (vips_subtract) failed".to_string()),
14521        )
14522    }
14523
14524    /// VipsSum (sum), sum an array of images
14525    /// returns `VipsImage` - Output image
14526    ///
14527    /// inp: `&[VipsImage]` -> Array of input images
14528    pub fn sum(inp: &[VipsImage]) -> Result<VipsImage> {
14529        let mut out_out = VipsImage::from(null_mut());
14530        let vips_op_response = call(
14531            "sum",
14532            VOption::new()
14533                .set("in", inp)
14534                .set(
14535                    "out",
14536                    &mut out_out,
14537                ),
14538        )?;
14539        utils::result(
14540            vips_op_response,
14541            out_out,
14542            Error::OperationError("Sum (vips_sum) failed".to_string()),
14543        )
14544    }
14545
14546    /// VipsForeignLoadSvgFile (svgload), load SVG with rsvg (.svg, .svgz, .svg.gz), priority=-5, untrusted, is_a, get_flags, get_flags_filename, header, load
14547    /// returns `VipsImage` - Output image
14548    ///
14549    /// filename: `&str` -> Filename to load from
14550    pub fn svgload(filename: &str) -> Result<VipsImage> {
14551        let mut out_out = VipsImage::from(null_mut());
14552        let vips_op_response = call(
14553            "svgload",
14554            VOption::new()
14555                .set(
14556                    "filename",
14557                    filename,
14558                )
14559                .set(
14560                    "out",
14561                    &mut out_out,
14562                ),
14563        )?;
14564        utils::result(
14565            vips_op_response,
14566            out_out,
14567            Error::OperationError("Svgload (vips_svgload) failed".to_string()),
14568        )
14569    }
14570
14571    /// VipsForeignLoadSvgFile (svgload), load SVG with rsvg (.svg, .svgz, .svg.gz), priority=-5, untrusted, is_a, get_flags, get_flags_filename, header, load
14572    /// returns `VipsImage` - Output image
14573    ///
14574    /// filename: `&str` -> Filename to load from
14575    ///
14576    /// <ins>Optional arguments</ins>
14577    ///
14578    /// dpi: `f64` -> Render at this DPI
14579    ///
14580    /// scale: `f64` -> Scale output by this factor
14581    ///
14582    /// unlimited: `bool` -> Allow SVG of any size
14583    ///
14584    /// stylesheet: `&str` -> Custom CSS
14585    ///
14586    /// high_bitdepth: `bool` -> Enable scRGB 128-bit output (32-bit per channel)
14587    ///
14588    /// flags: [`ForeignFlags`] -> Flags for this file
14589    ///
14590    /// memory: `bool` -> Force open via memory
14591    ///
14592    /// access: [`Access`] -> Required access pattern for this file
14593    ///
14594    /// fail_on: [`FailOn`] -> Error level to fail on
14595    ///
14596    /// revalidate: `bool` -> Don't use a cached result for this operation
14597    pub fn svgload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
14598        let mut out_out = VipsImage::from(null_mut());
14599        let vips_op_response = call(
14600            "svgload",
14601            option
14602                .set(
14603                    "filename",
14604                    filename,
14605                )
14606                .set(
14607                    "out",
14608                    &mut out_out,
14609                ),
14610        )?;
14611        utils::result(
14612            vips_op_response,
14613            out_out,
14614            Error::OperationError("Svgload (vips_svgload) failed".to_string()),
14615        )
14616    }
14617
14618    /// VipsForeignLoadSvgBuffer (svgload_buffer), load SVG with rsvg, priority=-5, untrusted, is_a_buffer, get_flags, get_flags_filename, header, load
14619    /// returns `VipsImage` - Output image
14620    ///
14621    /// buffer: `&[u8]` -> Buffer to load from
14622    pub fn svgload_buffer(buffer: &[u8]) -> Result<VipsImage> {
14623        let mut out_out = VipsImage::from(null_mut());
14624        let vips_op_response = call(
14625            "svgload_buffer",
14626            VOption::new()
14627                .set(
14628                    "buffer",
14629                    buffer,
14630                )
14631                .set(
14632                    "out",
14633                    &mut out_out,
14634                ),
14635        )?;
14636        utils::result(
14637            vips_op_response,
14638            out_out,
14639            Error::OperationError("SvgloadBuffer (vips_svgload_buffer) failed".to_string()),
14640        )
14641    }
14642
14643    /// VipsForeignLoadSvgBuffer (svgload_buffer), load SVG with rsvg, priority=-5, untrusted, is_a_buffer, get_flags, get_flags_filename, header, load
14644    /// returns `VipsImage` - Output image
14645    ///
14646    /// buffer: `&[u8]` -> Buffer to load from
14647    ///
14648    /// <ins>Optional arguments</ins>
14649    ///
14650    /// dpi: `f64` -> Render at this DPI
14651    ///
14652    /// scale: `f64` -> Scale output by this factor
14653    ///
14654    /// unlimited: `bool` -> Allow SVG of any size
14655    ///
14656    /// stylesheet: `&str` -> Custom CSS
14657    ///
14658    /// high_bitdepth: `bool` -> Enable scRGB 128-bit output (32-bit per channel)
14659    ///
14660    /// flags: [`ForeignFlags`] -> Flags for this file
14661    ///
14662    /// memory: `bool` -> Force open via memory
14663    ///
14664    /// access: [`Access`] -> Required access pattern for this file
14665    ///
14666    /// fail_on: [`FailOn`] -> Error level to fail on
14667    ///
14668    /// revalidate: `bool` -> Don't use a cached result for this operation
14669    pub fn svgload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
14670        let mut out_out = VipsImage::from(null_mut());
14671        let vips_op_response = call(
14672            "svgload_buffer",
14673            option
14674                .set(
14675                    "buffer",
14676                    buffer,
14677                )
14678                .set(
14679                    "out",
14680                    &mut out_out,
14681                ),
14682        )?;
14683        utils::result(
14684            vips_op_response,
14685            out_out,
14686            Error::OperationError("SvgloadBuffer (vips_svgload_buffer) failed".to_string()),
14687        )
14688    }
14689
14690    /// VipsForeignLoadSvgSource (svgload_source), load svg from source, nocache, priority=-5, untrusted, is_a_source, get_flags, get_flags_filename, header, load
14691    /// returns `VipsImage` - Output image
14692    ///
14693    /// source: `&VipsSource` -> Source to load from
14694    pub fn svgload_source(source: &VipsSource) -> Result<VipsImage> {
14695        let mut out_out = VipsImage::from(null_mut());
14696        let vips_op_response = call(
14697            "svgload_source",
14698            VOption::new()
14699                .set(
14700                    "source",
14701                    source,
14702                )
14703                .set(
14704                    "out",
14705                    &mut out_out,
14706                ),
14707        )?;
14708        utils::result(
14709            vips_op_response,
14710            out_out,
14711            Error::OperationError("SvgloadSource (vips_svgload_source) failed".to_string()),
14712        )
14713    }
14714
14715    /// VipsForeignLoadSvgSource (svgload_source), load svg from source, nocache, priority=-5, untrusted, is_a_source, get_flags, get_flags_filename, header, load
14716    /// returns `VipsImage` - Output image
14717    ///
14718    /// source: `&VipsSource` -> Source to load from
14719    ///
14720    /// <ins>Optional arguments</ins>
14721    ///
14722    /// dpi: `f64` -> Render at this DPI
14723    ///
14724    /// scale: `f64` -> Scale output by this factor
14725    ///
14726    /// unlimited: `bool` -> Allow SVG of any size
14727    ///
14728    /// stylesheet: `&str` -> Custom CSS
14729    ///
14730    /// high_bitdepth: `bool` -> Enable scRGB 128-bit output (32-bit per channel)
14731    ///
14732    /// flags: [`ForeignFlags`] -> Flags for this file
14733    ///
14734    /// memory: `bool` -> Force open via memory
14735    ///
14736    /// access: [`Access`] -> Required access pattern for this file
14737    ///
14738    /// fail_on: [`FailOn`] -> Error level to fail on
14739    ///
14740    /// revalidate: `bool` -> Don't use a cached result for this operation
14741    pub fn svgload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
14742        let mut out_out = VipsImage::from(null_mut());
14743        let vips_op_response = call(
14744            "svgload_source",
14745            option
14746                .set(
14747                    "source",
14748                    source,
14749                )
14750                .set(
14751                    "out",
14752                    &mut out_out,
14753                ),
14754        )?;
14755        utils::result(
14756            vips_op_response,
14757            out_out,
14758            Error::OperationError("SvgloadSource (vips_svgload_source) failed".to_string()),
14759        )
14760    }
14761
14762    /// VipsSwitch (switch), find the index of the first non-zero pixel in tests
14763    /// returns `VipsImage` - Output image
14764    ///
14765    /// tests: `&[VipsImage]` -> Table of images to test
14766    pub fn switch(tests: &[VipsImage]) -> Result<VipsImage> {
14767        let mut out_out = VipsImage::from(null_mut());
14768        let vips_op_response = call(
14769            "switch",
14770            VOption::new()
14771                .set(
14772                    "tests",
14773                    tests,
14774                )
14775                .set(
14776                    "out",
14777                    &mut out_out,
14778                ),
14779        )?;
14780        utils::result(
14781            vips_op_response,
14782            out_out,
14783            Error::OperationError("Switch (vips_switch) failed".to_string()),
14784        )
14785    }
14786
14787    /// VipsSystem (system), run an external command, nocache
14788    ///
14789    /// cmd_format: `&str` -> Command to run
14790    pub fn system(cmd_format: &str) -> Result<()> {
14791        let vips_op_response = call(
14792            "system",
14793            VOption::new().set(
14794                "cmd_format",
14795                cmd_format,
14796            ),
14797        )?;
14798        utils::result(
14799            vips_op_response,
14800            (),
14801            Error::OperationError("System (vips_system) failed".to_string()),
14802        )
14803    }
14804
14805    /// VipsSystem (system), run an external command, nocache
14806    ///
14807    /// cmd_format: `&str` -> Command to run
14808    ///
14809    /// <ins>Optional arguments</ins>
14810    ///
14811    /// in: `&[VipsImage]` -> Array of input images
14812    ///
14813    /// out: `&mut VipsImage` -> Output image
14814    ///
14815    /// in_format: `&str` -> Format for input filename
14816    ///
14817    /// out_format: `&str` -> Format for output filename
14818    ///
14819    /// cache: `bool` -> Cache this call
14820    ///
14821    /// log: `&str` -> Command log
14822    pub fn system_with_opts(cmd_format: &str, option: VOption) -> Result<()> {
14823        let vips_op_response = call(
14824            "system",
14825            option.set(
14826                "cmd_format",
14827                cmd_format,
14828            ),
14829        )?;
14830        utils::result(
14831            vips_op_response,
14832            (),
14833            Error::OperationError("System (vips_system) failed".to_string()),
14834        )
14835    }
14836
14837    /// VipsText (text), make a text image
14838    /// returns `VipsImage` - Output image
14839    ///
14840    /// text: `&str` -> Text to render
14841    pub fn text(text: &str) -> Result<VipsImage> {
14842        let mut out_out = VipsImage::from(null_mut());
14843        let vips_op_response = call(
14844            "text",
14845            VOption::new()
14846                .set(
14847                    "out",
14848                    &mut out_out,
14849                )
14850                .set(
14851                    "text",
14852                    text,
14853                ),
14854        )?;
14855        utils::result(
14856            vips_op_response,
14857            out_out,
14858            Error::OperationError("Text (vips_text) failed".to_string()),
14859        )
14860    }
14861
14862    /// VipsText (text), make a text image
14863    /// returns `VipsImage` - Output image
14864    ///
14865    /// text: `&str` -> Text to render
14866    ///
14867    /// <ins>Optional arguments</ins>
14868    ///
14869    /// font: `&str` -> Font to render with
14870    ///
14871    /// width: `i32` -> Maximum image width in pixels
14872    ///
14873    /// height: `i32` -> Maximum image height in pixels
14874    ///
14875    /// align: [`Align`] -> Align on the low, centre or high edge
14876    ///
14877    /// justify: `bool` -> Justify lines
14878    ///
14879    /// dpi: `i32` -> DPI to render at
14880    ///
14881    /// autofit_dpi: `&mut i32` -> DPI selected by autofit
14882    ///
14883    /// spacing: `i32` -> Line spacing
14884    ///
14885    /// fontfile: `&str` -> Load this font file
14886    ///
14887    /// rgba: `bool` -> Enable RGBA output
14888    ///
14889    /// wrap: [`TextWrap`] -> Wrap lines on word or character boundaries
14890    pub fn text_with_opts(text: &str, option: VOption) -> Result<VipsImage> {
14891        let mut out_out = VipsImage::from(null_mut());
14892        let vips_op_response = call(
14893            "text",
14894            option
14895                .set(
14896                    "out",
14897                    &mut out_out,
14898                )
14899                .set(
14900                    "text",
14901                    text,
14902                ),
14903        )?;
14904        utils::result(
14905            vips_op_response,
14906            out_out,
14907            Error::OperationError("Text (vips_text) failed".to_string()),
14908        )
14909    }
14910
14911    /// VipsThumbnailFile (thumbnail), generate thumbnail from file, nocache
14912    /// returns `VipsImage` - Output image
14913    ///
14914    /// filename: `&str` -> Filename to read from
14915    ///
14916    /// width: `i32` -> Size to this width
14917    pub fn thumbnail(filename: &str, width: i32) -> Result<VipsImage> {
14918        let mut out_out = VipsImage::from(null_mut());
14919        let vips_op_response = call(
14920            "thumbnail",
14921            VOption::new()
14922                .set(
14923                    "filename",
14924                    filename,
14925                )
14926                .set(
14927                    "out",
14928                    &mut out_out,
14929                )
14930                .set(
14931                    "width",
14932                    width,
14933                ),
14934        )?;
14935        utils::result(
14936            vips_op_response,
14937            out_out,
14938            Error::OperationError("Thumbnail (vips_thumbnail) failed".to_string()),
14939        )
14940    }
14941
14942    /// VipsThumbnailFile (thumbnail), generate thumbnail from file, nocache
14943    /// returns `VipsImage` - Output image
14944    ///
14945    /// filename: `&str` -> Filename to read from
14946    ///
14947    /// width: `i32` -> Size to this width
14948    ///
14949    /// <ins>Optional arguments</ins>
14950    ///
14951    /// height: `i32` -> Size to this height
14952    ///
14953    /// size: [`Size`] -> Only upsize, only downsize, or both
14954    ///
14955    /// no_rotate: `bool` -> Don't use orientation tags to rotate image upright
14956    ///
14957    /// crop: [`Interesting`] -> Reduce to fill target rectangle, then crop
14958    ///
14959    /// linear: `bool` -> Reduce in linear light
14960    ///
14961    /// input_profile: `&str` -> Fallback input profile
14962    ///
14963    /// output_profile: `&str` -> Fallback output profile
14964    ///
14965    /// intent: [`Intent`] -> Rendering intent
14966    ///
14967    /// fail_on: [`FailOn`] -> Error level to fail on
14968    pub fn thumbnail_with_opts(filename: &str, width: i32, option: VOption) -> Result<VipsImage> {
14969        let mut out_out = VipsImage::from(null_mut());
14970        let vips_op_response = call(
14971            "thumbnail",
14972            option
14973                .set(
14974                    "filename",
14975                    filename,
14976                )
14977                .set(
14978                    "out",
14979                    &mut out_out,
14980                )
14981                .set(
14982                    "width",
14983                    width,
14984                ),
14985        )?;
14986        utils::result(
14987            vips_op_response,
14988            out_out,
14989            Error::OperationError("Thumbnail (vips_thumbnail) failed".to_string()),
14990        )
14991    }
14992
14993    /// VipsThumbnailBuffer (thumbnail_buffer), generate thumbnail from buffer, nocache
14994    /// returns `VipsImage` - Output image
14995    ///
14996    /// buffer: `&[u8]` -> Buffer to load from
14997    ///
14998    /// width: `i32` -> Size to this width
14999    pub fn thumbnail_buffer(buffer: &[u8], width: i32) -> Result<VipsImage> {
15000        let mut out_out = VipsImage::from(null_mut());
15001        let vips_op_response = call(
15002            "thumbnail_buffer",
15003            VOption::new()
15004                .set(
15005                    "buffer",
15006                    buffer,
15007                )
15008                .set(
15009                    "out",
15010                    &mut out_out,
15011                )
15012                .set(
15013                    "width",
15014                    width,
15015                ),
15016        )?;
15017        utils::result(
15018            vips_op_response,
15019            out_out,
15020            Error::OperationError("ThumbnailBuffer (vips_thumbnail_buffer) failed".to_string()),
15021        )
15022    }
15023
15024    /// VipsThumbnailBuffer (thumbnail_buffer), generate thumbnail from buffer, nocache
15025    /// returns `VipsImage` - Output image
15026    ///
15027    /// buffer: `&[u8]` -> Buffer to load from
15028    ///
15029    /// width: `i32` -> Size to this width
15030    ///
15031    /// <ins>Optional arguments</ins>
15032    ///
15033    /// option_string: `&str` -> Options that are passed on to the underlying loader
15034    ///
15035    /// height: `i32` -> Size to this height
15036    ///
15037    /// size: [`Size`] -> Only upsize, only downsize, or both
15038    ///
15039    /// no_rotate: `bool` -> Don't use orientation tags to rotate image upright
15040    ///
15041    /// crop: [`Interesting`] -> Reduce to fill target rectangle, then crop
15042    ///
15043    /// linear: `bool` -> Reduce in linear light
15044    ///
15045    /// input_profile: `&str` -> Fallback input profile
15046    ///
15047    /// output_profile: `&str` -> Fallback output profile
15048    ///
15049    /// intent: [`Intent`] -> Rendering intent
15050    ///
15051    /// fail_on: [`FailOn`] -> Error level to fail on
15052    pub fn thumbnail_buffer_with_opts(
15053        buffer: &[u8],
15054        width: i32,
15055        option: VOption,
15056    ) -> Result<VipsImage> {
15057        let mut out_out = VipsImage::from(null_mut());
15058        let vips_op_response = call(
15059            "thumbnail_buffer",
15060            option
15061                .set(
15062                    "buffer",
15063                    buffer,
15064                )
15065                .set(
15066                    "out",
15067                    &mut out_out,
15068                )
15069                .set(
15070                    "width",
15071                    width,
15072                ),
15073        )?;
15074        utils::result(
15075            vips_op_response,
15076            out_out,
15077            Error::OperationError("ThumbnailBuffer (vips_thumbnail_buffer) failed".to_string()),
15078        )
15079    }
15080
15081    /// VipsThumbnailImage (thumbnail_image), generate thumbnail from image
15082    /// returns `VipsImage` - Output image
15083    ///
15084    /// width: `i32` -> Size to this width
15085    pub fn thumbnail_image(&self, width: i32) -> Result<VipsImage> {
15086        let mut out_out = VipsImage::from(null_mut());
15087        let vips_op_response = call(
15088            "thumbnail_image",
15089            VOption::new()
15090                .set("in", self)
15091                .set(
15092                    "out",
15093                    &mut out_out,
15094                )
15095                .set(
15096                    "width",
15097                    width,
15098                ),
15099        )?;
15100        utils::result(
15101            vips_op_response,
15102            out_out,
15103            Error::OperationError("ThumbnailImage (vips_thumbnail_image) failed".to_string()),
15104        )
15105    }
15106
15107    /// VipsThumbnailImage (thumbnail_image), generate thumbnail from image
15108    /// returns `VipsImage` - Output image
15109    ///
15110    /// width: `i32` -> Size to this width
15111    ///
15112    /// <ins>Optional arguments</ins>
15113    ///
15114    /// height: `i32` -> Size to this height
15115    ///
15116    /// size: [`Size`] -> Only upsize, only downsize, or both
15117    ///
15118    /// no_rotate: `bool` -> Don't use orientation tags to rotate image upright
15119    ///
15120    /// crop: [`Interesting`] -> Reduce to fill target rectangle, then crop
15121    ///
15122    /// linear: `bool` -> Reduce in linear light
15123    ///
15124    /// input_profile: `&str` -> Fallback input profile
15125    ///
15126    /// output_profile: `&str` -> Fallback output profile
15127    ///
15128    /// intent: [`Intent`] -> Rendering intent
15129    ///
15130    /// fail_on: [`FailOn`] -> Error level to fail on
15131    pub fn thumbnail_image_with_opts(&self, width: i32, option: VOption) -> Result<VipsImage> {
15132        let mut out_out = VipsImage::from(null_mut());
15133        let vips_op_response = call(
15134            "thumbnail_image",
15135            option
15136                .set("in", self)
15137                .set(
15138                    "out",
15139                    &mut out_out,
15140                )
15141                .set(
15142                    "width",
15143                    width,
15144                ),
15145        )?;
15146        utils::result(
15147            vips_op_response,
15148            out_out,
15149            Error::OperationError("ThumbnailImage (vips_thumbnail_image) failed".to_string()),
15150        )
15151    }
15152
15153    /// VipsThumbnailSource (thumbnail_source), generate thumbnail from source, nocache
15154    /// returns `VipsImage` - Output image
15155    ///
15156    /// source: `&VipsSource` -> Source to load from
15157    ///
15158    /// width: `i32` -> Size to this width
15159    pub fn thumbnail_source(source: &VipsSource, width: i32) -> Result<VipsImage> {
15160        let mut out_out = VipsImage::from(null_mut());
15161        let vips_op_response = call(
15162            "thumbnail_source",
15163            VOption::new()
15164                .set(
15165                    "source",
15166                    source,
15167                )
15168                .set(
15169                    "out",
15170                    &mut out_out,
15171                )
15172                .set(
15173                    "width",
15174                    width,
15175                ),
15176        )?;
15177        utils::result(
15178            vips_op_response,
15179            out_out,
15180            Error::OperationError("ThumbnailSource (vips_thumbnail_source) failed".to_string()),
15181        )
15182    }
15183
15184    /// VipsThumbnailSource (thumbnail_source), generate thumbnail from source, nocache
15185    /// returns `VipsImage` - Output image
15186    ///
15187    /// source: `&VipsSource` -> Source to load from
15188    ///
15189    /// width: `i32` -> Size to this width
15190    ///
15191    /// <ins>Optional arguments</ins>
15192    ///
15193    /// option_string: `&str` -> Options that are passed on to the underlying loader
15194    ///
15195    /// height: `i32` -> Size to this height
15196    ///
15197    /// size: [`Size`] -> Only upsize, only downsize, or both
15198    ///
15199    /// no_rotate: `bool` -> Don't use orientation tags to rotate image upright
15200    ///
15201    /// crop: [`Interesting`] -> Reduce to fill target rectangle, then crop
15202    ///
15203    /// linear: `bool` -> Reduce in linear light
15204    ///
15205    /// input_profile: `&str` -> Fallback input profile
15206    ///
15207    /// output_profile: `&str` -> Fallback output profile
15208    ///
15209    /// intent: [`Intent`] -> Rendering intent
15210    ///
15211    /// fail_on: [`FailOn`] -> Error level to fail on
15212    pub fn thumbnail_source_with_opts(
15213        source: &VipsSource,
15214        width: i32,
15215        option: VOption,
15216    ) -> Result<VipsImage> {
15217        let mut out_out = VipsImage::from(null_mut());
15218        let vips_op_response = call(
15219            "thumbnail_source",
15220            option
15221                .set(
15222                    "source",
15223                    source,
15224                )
15225                .set(
15226                    "out",
15227                    &mut out_out,
15228                )
15229                .set(
15230                    "width",
15231                    width,
15232                ),
15233        )?;
15234        utils::result(
15235            vips_op_response,
15236            out_out,
15237            Error::OperationError("ThumbnailSource (vips_thumbnail_source) failed".to_string()),
15238        )
15239    }
15240
15241    /// VipsForeignLoadTiffFile (tiffload), load tiff from file (.tif, .tiff), priority=50, is_a, get_flags, get_flags_filename, header, load
15242    /// returns `VipsImage` - Output image
15243    ///
15244    /// filename: `&str` -> Filename to load from
15245    pub fn tiffload(filename: &str) -> Result<VipsImage> {
15246        let mut out_out = VipsImage::from(null_mut());
15247        let vips_op_response = call(
15248            "tiffload",
15249            VOption::new()
15250                .set(
15251                    "filename",
15252                    filename,
15253                )
15254                .set(
15255                    "out",
15256                    &mut out_out,
15257                ),
15258        )?;
15259        utils::result(
15260            vips_op_response,
15261            out_out,
15262            Error::OperationError("Tiffload (vips_tiffload) failed".to_string()),
15263        )
15264    }
15265
15266    /// VipsForeignLoadTiffFile (tiffload), load tiff from file (.tif, .tiff), priority=50, is_a, get_flags, get_flags_filename, header, load
15267    /// returns `VipsImage` - Output image
15268    ///
15269    /// filename: `&str` -> Filename to load from
15270    ///
15271    /// <ins>Optional arguments</ins>
15272    ///
15273    /// page: `i32` -> First page to load
15274    ///
15275    /// n: `i32` -> Number of pages to load, -1 for all
15276    ///
15277    /// autorotate: `bool` -> Rotate image using orientation tag
15278    ///
15279    /// subifd: `i32` -> Subifd index
15280    ///
15281    /// unlimited: `bool` -> Remove all denial of service limits
15282    ///
15283    /// flags: [`ForeignFlags`] -> Flags for this file
15284    ///
15285    /// memory: `bool` -> Force open via memory
15286    ///
15287    /// access: [`Access`] -> Required access pattern for this file
15288    ///
15289    /// fail_on: [`FailOn`] -> Error level to fail on
15290    ///
15291    /// revalidate: `bool` -> Don't use a cached result for this operation
15292    pub fn tiffload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
15293        let mut out_out = VipsImage::from(null_mut());
15294        let vips_op_response = call(
15295            "tiffload",
15296            option
15297                .set(
15298                    "filename",
15299                    filename,
15300                )
15301                .set(
15302                    "out",
15303                    &mut out_out,
15304                ),
15305        )?;
15306        utils::result(
15307            vips_op_response,
15308            out_out,
15309            Error::OperationError("Tiffload (vips_tiffload) failed".to_string()),
15310        )
15311    }
15312
15313    /// VipsForeignLoadTiffBuffer (tiffload_buffer), load tiff from buffer, priority=50, is_a_buffer, get_flags, get_flags_filename, header, load
15314    /// returns `VipsImage` - Output image
15315    ///
15316    /// buffer: `&[u8]` -> Buffer to load from
15317    pub fn tiffload_buffer(buffer: &[u8]) -> Result<VipsImage> {
15318        let mut out_out = VipsImage::from(null_mut());
15319        let vips_op_response = call(
15320            "tiffload_buffer",
15321            VOption::new()
15322                .set(
15323                    "buffer",
15324                    buffer,
15325                )
15326                .set(
15327                    "out",
15328                    &mut out_out,
15329                ),
15330        )?;
15331        utils::result(
15332            vips_op_response,
15333            out_out,
15334            Error::OperationError("TiffloadBuffer (vips_tiffload_buffer) failed".to_string()),
15335        )
15336    }
15337
15338    /// VipsForeignLoadTiffBuffer (tiffload_buffer), load tiff from buffer, priority=50, is_a_buffer, get_flags, get_flags_filename, header, load
15339    /// returns `VipsImage` - Output image
15340    ///
15341    /// buffer: `&[u8]` -> Buffer to load from
15342    ///
15343    /// <ins>Optional arguments</ins>
15344    ///
15345    /// page: `i32` -> First page to load
15346    ///
15347    /// n: `i32` -> Number of pages to load, -1 for all
15348    ///
15349    /// autorotate: `bool` -> Rotate image using orientation tag
15350    ///
15351    /// subifd: `i32` -> Subifd index
15352    ///
15353    /// unlimited: `bool` -> Remove all denial of service limits
15354    ///
15355    /// flags: [`ForeignFlags`] -> Flags for this file
15356    ///
15357    /// memory: `bool` -> Force open via memory
15358    ///
15359    /// access: [`Access`] -> Required access pattern for this file
15360    ///
15361    /// fail_on: [`FailOn`] -> Error level to fail on
15362    ///
15363    /// revalidate: `bool` -> Don't use a cached result for this operation
15364    pub fn tiffload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
15365        let mut out_out = VipsImage::from(null_mut());
15366        let vips_op_response = call(
15367            "tiffload_buffer",
15368            option
15369                .set(
15370                    "buffer",
15371                    buffer,
15372                )
15373                .set(
15374                    "out",
15375                    &mut out_out,
15376                ),
15377        )?;
15378        utils::result(
15379            vips_op_response,
15380            out_out,
15381            Error::OperationError("TiffloadBuffer (vips_tiffload_buffer) failed".to_string()),
15382        )
15383    }
15384
15385    /// VipsForeignLoadTiffSource (tiffload_source), load tiff from source, nocache, priority=50, is_a_source, get_flags, get_flags_filename, header, load
15386    /// returns `VipsImage` - Output image
15387    ///
15388    /// source: `&VipsSource` -> Source to load from
15389    pub fn tiffload_source(source: &VipsSource) -> Result<VipsImage> {
15390        let mut out_out = VipsImage::from(null_mut());
15391        let vips_op_response = call(
15392            "tiffload_source",
15393            VOption::new()
15394                .set(
15395                    "source",
15396                    source,
15397                )
15398                .set(
15399                    "out",
15400                    &mut out_out,
15401                ),
15402        )?;
15403        utils::result(
15404            vips_op_response,
15405            out_out,
15406            Error::OperationError("TiffloadSource (vips_tiffload_source) failed".to_string()),
15407        )
15408    }
15409
15410    /// VipsForeignLoadTiffSource (tiffload_source), load tiff from source, nocache, priority=50, is_a_source, get_flags, get_flags_filename, header, load
15411    /// returns `VipsImage` - Output image
15412    ///
15413    /// source: `&VipsSource` -> Source to load from
15414    ///
15415    /// <ins>Optional arguments</ins>
15416    ///
15417    /// page: `i32` -> First page to load
15418    ///
15419    /// n: `i32` -> Number of pages to load, -1 for all
15420    ///
15421    /// autorotate: `bool` -> Rotate image using orientation tag
15422    ///
15423    /// subifd: `i32` -> Subifd index
15424    ///
15425    /// unlimited: `bool` -> Remove all denial of service limits
15426    ///
15427    /// flags: [`ForeignFlags`] -> Flags for this file
15428    ///
15429    /// memory: `bool` -> Force open via memory
15430    ///
15431    /// access: [`Access`] -> Required access pattern for this file
15432    ///
15433    /// fail_on: [`FailOn`] -> Error level to fail on
15434    ///
15435    /// revalidate: `bool` -> Don't use a cached result for this operation
15436    pub fn tiffload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
15437        let mut out_out = VipsImage::from(null_mut());
15438        let vips_op_response = call(
15439            "tiffload_source",
15440            option
15441                .set(
15442                    "source",
15443                    source,
15444                )
15445                .set(
15446                    "out",
15447                    &mut out_out,
15448                ),
15449        )?;
15450        utils::result(
15451            vips_op_response,
15452            out_out,
15453            Error::OperationError("TiffloadSource (vips_tiffload_source) failed".to_string()),
15454        )
15455    }
15456
15457    /// VipsForeignSaveTiffFile (tiffsave), save image to tiff file, nocache (.tif, .tiff), priority=0,
15458    ///
15459    /// filename: `&str` -> Filename to save to
15460    pub fn tiffsave(&self, filename: &str) -> Result<()> {
15461        let vips_op_response = call(
15462            "tiffsave",
15463            VOption::new()
15464                .set("in", self)
15465                .set(
15466                    "filename",
15467                    filename,
15468                ),
15469        )?;
15470        utils::result(
15471            vips_op_response,
15472            (),
15473            Error::OperationError("Tiffsave (vips_tiffsave) failed".to_string()),
15474        )
15475    }
15476
15477    /// VipsForeignSaveTiffFile (tiffsave), save image to tiff file, nocache (.tif, .tiff), priority=0,
15478    ///
15479    /// filename: `&str` -> Filename to save to
15480    ///
15481    /// <ins>Optional arguments</ins>
15482    ///
15483    /// compression: [`ForeignTiffCompression`] -> Compression for this file
15484    ///
15485    /// Q: `i32` -> Q factor
15486    ///
15487    /// predictor: [`ForeignTiffPredictor`] -> Compression prediction
15488    ///
15489    /// tile: `bool` -> Write a tiled tiff
15490    ///
15491    /// tile_width: `i32` -> Tile width in pixels
15492    ///
15493    /// tile_height: `i32` -> Tile height in pixels
15494    ///
15495    /// pyramid: `bool` -> Write a pyramidal tiff
15496    ///
15497    /// miniswhite: `bool` -> Use 0 for white in 1-bit images
15498    ///
15499    /// bitdepth: `i32` -> Write as a 1, 2, 4 or 8 bit image
15500    ///
15501    /// resunit: [`ForeignTiffResunit`] -> Resolution unit
15502    ///
15503    /// xres: `f64` -> Horizontal resolution in pixels/mm
15504    ///
15505    /// yres: `f64` -> Vertical resolution in pixels/mm
15506    ///
15507    /// bigtiff: `bool` -> Write a bigtiff image
15508    ///
15509    /// properties: `bool` -> Write a properties document to IMAGEDESCRIPTION
15510    ///
15511    /// region_shrink: [`RegionShrink`] -> Method to shrink regions
15512    ///
15513    /// level: `i32` -> Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level
15514    ///
15515    /// lossless: `bool` -> Enable WEBP lossless mode
15516    ///
15517    /// depth: [`ForeignDzDepth`] -> Pyramid depth
15518    ///
15519    /// subifd: `bool` -> Save pyr layers as sub-IFDs
15520    ///
15521    /// premultiply: `bool` -> Save with premultiplied alpha
15522    ///
15523    /// keep: [`ForeignKeep`] -> Which metadata to retain
15524    ///
15525    /// background: `&[f64]` -> Background value
15526    ///
15527    /// page_height: `i32` -> Set page height for multipage save
15528    ///
15529    /// profile: `&str` -> Filename of ICC profile to embed
15530    pub fn tiffsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
15531        let vips_op_response = call(
15532            "tiffsave",
15533            option
15534                .set("in", self)
15535                .set(
15536                    "filename",
15537                    filename,
15538                ),
15539        )?;
15540        utils::result(
15541            vips_op_response,
15542            (),
15543            Error::OperationError("Tiffsave (vips_tiffsave) failed".to_string()),
15544        )
15545    }
15546
15547    /// VipsForeignSaveTiffBuffer (tiffsave_buffer), save image to tiff buffer, nocache (.tif, .tiff), priority=0,
15548    /// returns `Vec<u8>` - Buffer to save to
15549    pub fn tiffsave_buffer(&self) -> Result<Vec<u8>> {
15550        let mut buffer_out = Vec::new();
15551        let vips_op_response = call(
15552            "tiffsave_buffer",
15553            VOption::new()
15554                .set("in", self)
15555                .set(
15556                    "buffer",
15557                    &mut buffer_out,
15558                ),
15559        )?;
15560        utils::result(
15561            vips_op_response,
15562            buffer_out,
15563            Error::OperationError("TiffsaveBuffer (vips_tiffsave_buffer) failed".to_string()),
15564        )
15565    }
15566
15567    /// VipsForeignSaveTiffBuffer (tiffsave_buffer), save image to tiff buffer, nocache (.tif, .tiff), priority=0,
15568    /// returns `Vec<u8>` - Buffer to save to
15569    ///
15570    /// <ins>Optional arguments</ins>
15571    ///
15572    /// compression: [`ForeignTiffCompression`] -> Compression for this file
15573    ///
15574    /// Q: `i32` -> Q factor
15575    ///
15576    /// predictor: [`ForeignTiffPredictor`] -> Compression prediction
15577    ///
15578    /// tile: `bool` -> Write a tiled tiff
15579    ///
15580    /// tile_width: `i32` -> Tile width in pixels
15581    ///
15582    /// tile_height: `i32` -> Tile height in pixels
15583    ///
15584    /// pyramid: `bool` -> Write a pyramidal tiff
15585    ///
15586    /// miniswhite: `bool` -> Use 0 for white in 1-bit images
15587    ///
15588    /// bitdepth: `i32` -> Write as a 1, 2, 4 or 8 bit image
15589    ///
15590    /// resunit: [`ForeignTiffResunit`] -> Resolution unit
15591    ///
15592    /// xres: `f64` -> Horizontal resolution in pixels/mm
15593    ///
15594    /// yres: `f64` -> Vertical resolution in pixels/mm
15595    ///
15596    /// bigtiff: `bool` -> Write a bigtiff image
15597    ///
15598    /// properties: `bool` -> Write a properties document to IMAGEDESCRIPTION
15599    ///
15600    /// region_shrink: [`RegionShrink`] -> Method to shrink regions
15601    ///
15602    /// level: `i32` -> Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level
15603    ///
15604    /// lossless: `bool` -> Enable WEBP lossless mode
15605    ///
15606    /// depth: [`ForeignDzDepth`] -> Pyramid depth
15607    ///
15608    /// subifd: `bool` -> Save pyr layers as sub-IFDs
15609    ///
15610    /// premultiply: `bool` -> Save with premultiplied alpha
15611    ///
15612    /// keep: [`ForeignKeep`] -> Which metadata to retain
15613    ///
15614    /// background: `&[f64]` -> Background value
15615    ///
15616    /// page_height: `i32` -> Set page height for multipage save
15617    ///
15618    /// profile: `&str` -> Filename of ICC profile to embed
15619    pub fn tiffsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
15620        let mut buffer_out = Vec::new();
15621        let vips_op_response = call(
15622            "tiffsave_buffer",
15623            option
15624                .set("in", self)
15625                .set(
15626                    "buffer",
15627                    &mut buffer_out,
15628                ),
15629        )?;
15630        utils::result(
15631            vips_op_response,
15632            buffer_out,
15633            Error::OperationError("TiffsaveBuffer (vips_tiffsave_buffer) failed".to_string()),
15634        )
15635    }
15636
15637    /// VipsForeignSaveTiffTarget (tiffsave_target), save image to tiff target, nocache (.tif, .tiff), priority=0,
15638    ///
15639    /// target: `&VipsTarget` -> Target to save to
15640    pub fn tiffsave_target(&self, target: &VipsTarget) -> Result<()> {
15641        let vips_op_response = call(
15642            "tiffsave_target",
15643            VOption::new()
15644                .set("in", self)
15645                .set(
15646                    "target",
15647                    target,
15648                ),
15649        )?;
15650        utils::result(
15651            vips_op_response,
15652            (),
15653            Error::OperationError("TiffsaveTarget (vips_tiffsave_target) failed".to_string()),
15654        )
15655    }
15656
15657    /// VipsForeignSaveTiffTarget (tiffsave_target), save image to tiff target, nocache (.tif, .tiff), priority=0,
15658    ///
15659    /// target: `&VipsTarget` -> Target to save to
15660    ///
15661    /// <ins>Optional arguments</ins>
15662    ///
15663    /// compression: [`ForeignTiffCompression`] -> Compression for this file
15664    ///
15665    /// Q: `i32` -> Q factor
15666    ///
15667    /// predictor: [`ForeignTiffPredictor`] -> Compression prediction
15668    ///
15669    /// tile: `bool` -> Write a tiled tiff
15670    ///
15671    /// tile_width: `i32` -> Tile width in pixels
15672    ///
15673    /// tile_height: `i32` -> Tile height in pixels
15674    ///
15675    /// pyramid: `bool` -> Write a pyramidal tiff
15676    ///
15677    /// miniswhite: `bool` -> Use 0 for white in 1-bit images
15678    ///
15679    /// bitdepth: `i32` -> Write as a 1, 2, 4 or 8 bit image
15680    ///
15681    /// resunit: [`ForeignTiffResunit`] -> Resolution unit
15682    ///
15683    /// xres: `f64` -> Horizontal resolution in pixels/mm
15684    ///
15685    /// yres: `f64` -> Vertical resolution in pixels/mm
15686    ///
15687    /// bigtiff: `bool` -> Write a bigtiff image
15688    ///
15689    /// properties: `bool` -> Write a properties document to IMAGEDESCRIPTION
15690    ///
15691    /// region_shrink: [`RegionShrink`] -> Method to shrink regions
15692    ///
15693    /// level: `i32` -> Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level
15694    ///
15695    /// lossless: `bool` -> Enable WEBP lossless mode
15696    ///
15697    /// depth: [`ForeignDzDepth`] -> Pyramid depth
15698    ///
15699    /// subifd: `bool` -> Save pyr layers as sub-IFDs
15700    ///
15701    /// premultiply: `bool` -> Save with premultiplied alpha
15702    ///
15703    /// keep: [`ForeignKeep`] -> Which metadata to retain
15704    ///
15705    /// background: `&[f64]` -> Background value
15706    ///
15707    /// page_height: `i32` -> Set page height for multipage save
15708    ///
15709    /// profile: `&str` -> Filename of ICC profile to embed
15710    pub fn tiffsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
15711        let vips_op_response = call(
15712            "tiffsave_target",
15713            option
15714                .set("in", self)
15715                .set(
15716                    "target",
15717                    target,
15718                ),
15719        )?;
15720        utils::result(
15721            vips_op_response,
15722            (),
15723            Error::OperationError("TiffsaveTarget (vips_tiffsave_target) failed".to_string()),
15724        )
15725    }
15726
15727    /// VipsTileCache (tilecache), cache an image as a set of tiles
15728    /// returns `VipsImage` - Output image
15729    pub fn tilecache(&mut self) -> Result<VipsImage> {
15730        let mut out_out = VipsImage::from(null_mut());
15731        let vips_op_response = call(
15732            "tilecache",
15733            VOption::new()
15734                .set("in", self)
15735                .set(
15736                    "out",
15737                    &mut out_out,
15738                ),
15739        )?;
15740        utils::result(
15741            vips_op_response,
15742            out_out,
15743            Error::OperationError("Tilecache (vips_tilecache) failed".to_string()),
15744        )
15745    }
15746
15747    /// VipsTileCache (tilecache), cache an image as a set of tiles
15748    /// returns `VipsImage` - Output image
15749    ///
15750    /// <ins>Optional arguments</ins>
15751    ///
15752    /// tile_width: `i32` -> Tile width in pixels
15753    ///
15754    /// tile_height: `i32` -> Tile height in pixels
15755    ///
15756    /// max_tiles: `i32` -> Maximum number of tiles to cache
15757    ///
15758    /// access: [`Access`] -> Expected access pattern
15759    ///
15760    /// threaded: `bool` -> Allow threaded access
15761    ///
15762    /// persistent: `bool` -> Keep cache between evaluations
15763    pub fn tilecache_with_opts(&mut self, option: VOption) -> Result<VipsImage> {
15764        let mut out_out = VipsImage::from(null_mut());
15765        let vips_op_response = call(
15766            "tilecache",
15767            option
15768                .set("in", self)
15769                .set(
15770                    "out",
15771                    &mut out_out,
15772                ),
15773        )?;
15774        utils::result(
15775            vips_op_response,
15776            out_out,
15777            Error::OperationError("Tilecache (vips_tilecache) failed".to_string()),
15778        )
15779    }
15780
15781    /// VipsTonelut (tonelut), build a look-up table
15782    /// returns `VipsImage` - Output image
15783    pub fn tonelut() -> Result<VipsImage> {
15784        let mut out_out = VipsImage::from(null_mut());
15785        let vips_op_response = call(
15786            "tonelut",
15787            VOption::new().set(
15788                "out",
15789                &mut out_out,
15790            ),
15791        )?;
15792        utils::result(
15793            vips_op_response,
15794            out_out,
15795            Error::OperationError("Tonelut (vips_tonelut) failed".to_string()),
15796        )
15797    }
15798
15799    /// VipsTonelut (tonelut), build a look-up table
15800    /// returns `VipsImage` - Output image
15801    ///
15802    /// <ins>Optional arguments</ins>
15803    ///
15804    /// in_max: `i32` -> Size of LUT to build
15805    ///
15806    /// out_max: `i32` -> Maximum value in output LUT
15807    ///
15808    /// Lb: `f64` -> Lowest value in output
15809    ///
15810    /// Lw: `f64` -> Highest value in output
15811    ///
15812    /// Ps: `f64` -> Position of shadow
15813    ///
15814    /// Pm: `f64` -> Position of mid-tones
15815    ///
15816    /// Ph: `f64` -> Position of highlights
15817    ///
15818    /// S: `f64` -> Adjust shadows by this much
15819    ///
15820    /// M: `f64` -> Adjust mid-tones by this much
15821    ///
15822    /// H: `f64` -> Adjust highlights by this much
15823    pub fn tonelut_with_opts(option: VOption) -> Result<VipsImage> {
15824        let mut out_out = VipsImage::from(null_mut());
15825        let vips_op_response = call(
15826            "tonelut",
15827            option.set(
15828                "out",
15829                &mut out_out,
15830            ),
15831        )?;
15832        utils::result(
15833            vips_op_response,
15834            out_out,
15835            Error::OperationError("Tonelut (vips_tonelut) failed".to_string()),
15836        )
15837    }
15838
15839    /// VipsTranspose3d (transpose3d), transpose3d an image
15840    /// returns `VipsImage` - Output image
15841    pub fn transpose3d(&self) -> Result<VipsImage> {
15842        let mut out_out = VipsImage::from(null_mut());
15843        let vips_op_response = call(
15844            "transpose3d",
15845            VOption::new()
15846                .set("in", self)
15847                .set(
15848                    "out",
15849                    &mut out_out,
15850                ),
15851        )?;
15852        utils::result(
15853            vips_op_response,
15854            out_out,
15855            Error::OperationError("Transpose3D (vips_transpose3d) failed".to_string()),
15856        )
15857    }
15858
15859    /// VipsTranspose3d (transpose3d), transpose3d an image
15860    /// returns `VipsImage` - Output image
15861    ///
15862    /// <ins>Optional arguments</ins>
15863    ///
15864    /// page_height: `i32` -> Height of each input page
15865    pub fn transpose3d_with_opts(&self, option: VOption) -> Result<VipsImage> {
15866        let mut out_out = VipsImage::from(null_mut());
15867        let vips_op_response = call(
15868            "transpose3d",
15869            option
15870                .set("in", self)
15871                .set(
15872                    "out",
15873                    &mut out_out,
15874                ),
15875        )?;
15876        utils::result(
15877            vips_op_response,
15878            out_out,
15879            Error::OperationError("Transpose3D (vips_transpose3d) failed".to_string()),
15880        )
15881    }
15882
15883    /// VipsUhdr2scRGB (uhdr2scRGB), transform uhdr to scRGB
15884    /// returns `VipsImage` - Output image
15885    pub fn uhdr2scRGB(&self) -> Result<VipsImage> {
15886        let mut out_out = VipsImage::from(null_mut());
15887        let vips_op_response = call(
15888            "uhdr2scRGB",
15889            VOption::new()
15890                .set("in", self)
15891                .set(
15892                    "out",
15893                    &mut out_out,
15894                ),
15895        )?;
15896        utils::result(
15897            vips_op_response,
15898            out_out,
15899            Error::OperationError("Uhdr2ScRgb (vips_uhdr2scRGB) failed".to_string()),
15900        )
15901    }
15902
15903    /// VipsForeignLoadUhdrFile (uhdrload), load a UHDR image (.jpg, .jpeg, .jpe, .jfif), priority=100, is_a, get_flags, header, load
15904    /// returns `VipsImage` - Output image
15905    ///
15906    /// filename: `&str` -> Filename to load from
15907    pub fn uhdrload(filename: &str) -> Result<VipsImage> {
15908        let mut out_out = VipsImage::from(null_mut());
15909        let vips_op_response = call(
15910            "uhdrload",
15911            VOption::new()
15912                .set(
15913                    "filename",
15914                    filename,
15915                )
15916                .set(
15917                    "out",
15918                    &mut out_out,
15919                ),
15920        )?;
15921        utils::result(
15922            vips_op_response,
15923            out_out,
15924            Error::OperationError("Uhdrload (vips_uhdrload) failed".to_string()),
15925        )
15926    }
15927
15928    /// VipsForeignLoadUhdrFile (uhdrload), load a UHDR image (.jpg, .jpeg, .jpe, .jfif), priority=100, is_a, get_flags, header, load
15929    /// returns `VipsImage` - Output image
15930    ///
15931    /// filename: `&str` -> Filename to load from
15932    ///
15933    /// <ins>Optional arguments</ins>
15934    ///
15935    /// shrink: `i32` -> Shrink factor on load
15936    ///
15937    /// flags: [`ForeignFlags`] -> Flags for this file
15938    ///
15939    /// memory: `bool` -> Force open via memory
15940    ///
15941    /// access: [`Access`] -> Required access pattern for this file
15942    ///
15943    /// fail_on: [`FailOn`] -> Error level to fail on
15944    ///
15945    /// revalidate: `bool` -> Don't use a cached result for this operation
15946    pub fn uhdrload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
15947        let mut out_out = VipsImage::from(null_mut());
15948        let vips_op_response = call(
15949            "uhdrload",
15950            option
15951                .set(
15952                    "filename",
15953                    filename,
15954                )
15955                .set(
15956                    "out",
15957                    &mut out_out,
15958                ),
15959        )?;
15960        utils::result(
15961            vips_op_response,
15962            out_out,
15963            Error::OperationError("Uhdrload (vips_uhdrload) failed".to_string()),
15964        )
15965    }
15966
15967    /// VipsForeignLoadUhdrBuffer (uhdrload_buffer), load a UHDR image, priority=100, is_a_buffer, get_flags, header, load
15968    /// returns `VipsImage` - Output image
15969    ///
15970    /// buffer: `&[u8]` -> Buffer to load from
15971    pub fn uhdrload_buffer(buffer: &[u8]) -> Result<VipsImage> {
15972        let mut out_out = VipsImage::from(null_mut());
15973        let vips_op_response = call(
15974            "uhdrload_buffer",
15975            VOption::new()
15976                .set(
15977                    "buffer",
15978                    buffer,
15979                )
15980                .set(
15981                    "out",
15982                    &mut out_out,
15983                ),
15984        )?;
15985        utils::result(
15986            vips_op_response,
15987            out_out,
15988            Error::OperationError("UhdrloadBuffer (vips_uhdrload_buffer) failed".to_string()),
15989        )
15990    }
15991
15992    /// VipsForeignLoadUhdrBuffer (uhdrload_buffer), load a UHDR image, priority=100, is_a_buffer, get_flags, header, load
15993    /// returns `VipsImage` - Output image
15994    ///
15995    /// buffer: `&[u8]` -> Buffer to load from
15996    ///
15997    /// <ins>Optional arguments</ins>
15998    ///
15999    /// shrink: `i32` -> Shrink factor on load
16000    ///
16001    /// flags: [`ForeignFlags`] -> Flags for this file
16002    ///
16003    /// memory: `bool` -> Force open via memory
16004    ///
16005    /// access: [`Access`] -> Required access pattern for this file
16006    ///
16007    /// fail_on: [`FailOn`] -> Error level to fail on
16008    ///
16009    /// revalidate: `bool` -> Don't use a cached result for this operation
16010    pub fn uhdrload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
16011        let mut out_out = VipsImage::from(null_mut());
16012        let vips_op_response = call(
16013            "uhdrload_buffer",
16014            option
16015                .set(
16016                    "buffer",
16017                    buffer,
16018                )
16019                .set(
16020                    "out",
16021                    &mut out_out,
16022                ),
16023        )?;
16024        utils::result(
16025            vips_op_response,
16026            out_out,
16027            Error::OperationError("UhdrloadBuffer (vips_uhdrload_buffer) failed".to_string()),
16028        )
16029    }
16030
16031    /// VipsForeignLoadUhdrSource (uhdrload_source), load a UHDR image, nocache, priority=100, is_a_source, get_flags, header, load
16032    /// returns `VipsImage` - Output image
16033    ///
16034    /// source: `&VipsSource` -> Source to load from
16035    pub fn uhdrload_source(source: &VipsSource) -> Result<VipsImage> {
16036        let mut out_out = VipsImage::from(null_mut());
16037        let vips_op_response = call(
16038            "uhdrload_source",
16039            VOption::new()
16040                .set(
16041                    "source",
16042                    source,
16043                )
16044                .set(
16045                    "out",
16046                    &mut out_out,
16047                ),
16048        )?;
16049        utils::result(
16050            vips_op_response,
16051            out_out,
16052            Error::OperationError("UhdrloadSource (vips_uhdrload_source) failed".to_string()),
16053        )
16054    }
16055
16056    /// VipsForeignLoadUhdrSource (uhdrload_source), load a UHDR image, nocache, priority=100, is_a_source, get_flags, header, load
16057    /// returns `VipsImage` - Output image
16058    ///
16059    /// source: `&VipsSource` -> Source to load from
16060    ///
16061    /// <ins>Optional arguments</ins>
16062    ///
16063    /// shrink: `i32` -> Shrink factor on load
16064    ///
16065    /// flags: [`ForeignFlags`] -> Flags for this file
16066    ///
16067    /// memory: `bool` -> Force open via memory
16068    ///
16069    /// access: [`Access`] -> Required access pattern for this file
16070    ///
16071    /// fail_on: [`FailOn`] -> Error level to fail on
16072    ///
16073    /// revalidate: `bool` -> Don't use a cached result for this operation
16074    pub fn uhdrload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
16075        let mut out_out = VipsImage::from(null_mut());
16076        let vips_op_response = call(
16077            "uhdrload_source",
16078            option
16079                .set(
16080                    "source",
16081                    source,
16082                )
16083                .set(
16084                    "out",
16085                    &mut out_out,
16086                ),
16087        )?;
16088        utils::result(
16089            vips_op_response,
16090            out_out,
16091            Error::OperationError("UhdrloadSource (vips_uhdrload_source) failed".to_string()),
16092        )
16093    }
16094
16095    /// VipsForeignSaveUhdrFile (uhdrsave), save image in UltraHDR format, nocache (), priority=0,
16096    ///
16097    /// filename: `&str` -> Filename to save to
16098    pub fn uhdrsave(&self, filename: &str) -> Result<()> {
16099        let vips_op_response = call(
16100            "uhdrsave",
16101            VOption::new()
16102                .set("in", self)
16103                .set(
16104                    "filename",
16105                    filename,
16106                ),
16107        )?;
16108        utils::result(
16109            vips_op_response,
16110            (),
16111            Error::OperationError("Uhdrsave (vips_uhdrsave) failed".to_string()),
16112        )
16113    }
16114
16115    /// VipsForeignSaveUhdrFile (uhdrsave), save image in UltraHDR format, nocache (), priority=0,
16116    ///
16117    /// filename: `&str` -> Filename to save to
16118    ///
16119    /// <ins>Optional arguments</ins>
16120    ///
16121    /// Q: `i32` -> Q factor
16122    ///
16123    /// gainmap_scale_factor: `i32` -> The scale factor of base image to gainmap image
16124    ///
16125    /// keep: [`ForeignKeep`] -> Which metadata to retain
16126    ///
16127    /// background: `&[f64]` -> Background value
16128    ///
16129    /// page_height: `i32` -> Set page height for multipage save
16130    ///
16131    /// profile: `&str` -> Filename of ICC profile to embed
16132    pub fn uhdrsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
16133        let vips_op_response = call(
16134            "uhdrsave",
16135            option
16136                .set("in", self)
16137                .set(
16138                    "filename",
16139                    filename,
16140                ),
16141        )?;
16142        utils::result(
16143            vips_op_response,
16144            (),
16145            Error::OperationError("Uhdrsave (vips_uhdrsave) failed".to_string()),
16146        )
16147    }
16148
16149    /// VipsForeignSaveUhdrBuffer (uhdrsave_buffer), save image in UltraHDR format, nocache (), priority=0,
16150    /// returns `Vec<u8>` - Buffer to save to
16151    pub fn uhdrsave_buffer(&self) -> Result<Vec<u8>> {
16152        let mut buffer_out = Vec::new();
16153        let vips_op_response = call(
16154            "uhdrsave_buffer",
16155            VOption::new()
16156                .set("in", self)
16157                .set(
16158                    "buffer",
16159                    &mut buffer_out,
16160                ),
16161        )?;
16162        utils::result(
16163            vips_op_response,
16164            buffer_out,
16165            Error::OperationError("UhdrsaveBuffer (vips_uhdrsave_buffer) failed".to_string()),
16166        )
16167    }
16168
16169    /// VipsForeignSaveUhdrBuffer (uhdrsave_buffer), save image in UltraHDR format, nocache (), priority=0,
16170    /// returns `Vec<u8>` - Buffer to save to
16171    ///
16172    /// <ins>Optional arguments</ins>
16173    ///
16174    /// Q: `i32` -> Q factor
16175    ///
16176    /// gainmap_scale_factor: `i32` -> The scale factor of base image to gainmap image
16177    ///
16178    /// keep: [`ForeignKeep`] -> Which metadata to retain
16179    ///
16180    /// background: `&[f64]` -> Background value
16181    ///
16182    /// page_height: `i32` -> Set page height for multipage save
16183    ///
16184    /// profile: `&str` -> Filename of ICC profile to embed
16185    pub fn uhdrsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
16186        let mut buffer_out = Vec::new();
16187        let vips_op_response = call(
16188            "uhdrsave_buffer",
16189            option
16190                .set("in", self)
16191                .set(
16192                    "buffer",
16193                    &mut buffer_out,
16194                ),
16195        )?;
16196        utils::result(
16197            vips_op_response,
16198            buffer_out,
16199            Error::OperationError("UhdrsaveBuffer (vips_uhdrsave_buffer) failed".to_string()),
16200        )
16201    }
16202
16203    /// VipsForeignSaveUhdrTarget (uhdrsave_target), save image in UltraHDR format, nocache (), priority=0,
16204    ///
16205    /// target: `&VipsTarget` -> Target to save to
16206    pub fn uhdrsave_target(&self, target: &VipsTarget) -> Result<()> {
16207        let vips_op_response = call(
16208            "uhdrsave_target",
16209            VOption::new()
16210                .set("in", self)
16211                .set(
16212                    "target",
16213                    target,
16214                ),
16215        )?;
16216        utils::result(
16217            vips_op_response,
16218            (),
16219            Error::OperationError("UhdrsaveTarget (vips_uhdrsave_target) failed".to_string()),
16220        )
16221    }
16222
16223    /// VipsForeignSaveUhdrTarget (uhdrsave_target), save image in UltraHDR format, nocache (), priority=0,
16224    ///
16225    /// target: `&VipsTarget` -> Target to save to
16226    ///
16227    /// <ins>Optional arguments</ins>
16228    ///
16229    /// Q: `i32` -> Q factor
16230    ///
16231    /// gainmap_scale_factor: `i32` -> The scale factor of base image to gainmap image
16232    ///
16233    /// keep: [`ForeignKeep`] -> Which metadata to retain
16234    ///
16235    /// background: `&[f64]` -> Background value
16236    ///
16237    /// page_height: `i32` -> Set page height for multipage save
16238    ///
16239    /// profile: `&str` -> Filename of ICC profile to embed
16240    pub fn uhdrsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
16241        let vips_op_response = call(
16242            "uhdrsave_target",
16243            option
16244                .set("in", self)
16245                .set(
16246                    "target",
16247                    target,
16248                ),
16249        )?;
16250        utils::result(
16251            vips_op_response,
16252            (),
16253            Error::OperationError("UhdrsaveTarget (vips_uhdrsave_target) failed".to_string()),
16254        )
16255    }
16256
16257    /// VipsUnpremultiply (unpremultiply), unpremultiply image alpha
16258    /// returns `VipsImage` - Output image
16259    pub fn unpremultiply(&self) -> Result<VipsImage> {
16260        let mut out_out = VipsImage::from(null_mut());
16261        let vips_op_response = call(
16262            "unpremultiply",
16263            VOption::new()
16264                .set("in", self)
16265                .set(
16266                    "out",
16267                    &mut out_out,
16268                ),
16269        )?;
16270        utils::result(
16271            vips_op_response,
16272            out_out,
16273            Error::OperationError("Unpremultiply (vips_unpremultiply) failed".to_string()),
16274        )
16275    }
16276
16277    /// VipsUnpremultiply (unpremultiply), unpremultiply image alpha
16278    /// returns `VipsImage` - Output image
16279    ///
16280    /// <ins>Optional arguments</ins>
16281    ///
16282    /// max_alpha: `f64` -> Maximum value of alpha channel
16283    ///
16284    /// alpha_band: `i32` -> Unpremultiply with this alpha
16285    pub fn unpremultiply_with_opts(&self, option: VOption) -> Result<VipsImage> {
16286        let mut out_out = VipsImage::from(null_mut());
16287        let vips_op_response = call(
16288            "unpremultiply",
16289            option
16290                .set("in", self)
16291                .set(
16292                    "out",
16293                    &mut out_out,
16294                ),
16295        )?;
16296        utils::result(
16297            vips_op_response,
16298            out_out,
16299            Error::OperationError("Unpremultiply (vips_unpremultiply) failed".to_string()),
16300        )
16301    }
16302
16303    /// VipsForeignLoadVipsFile (vipsload), load vips from file (.v, .vips), priority=200, untrusted, is_a, get_flags, get_flags_filename, header
16304    /// returns `VipsImage` - Output image
16305    ///
16306    /// filename: `&str` -> Filename to load from
16307    pub fn vipsload(filename: &str) -> Result<VipsImage> {
16308        let mut out_out = VipsImage::from(null_mut());
16309        let vips_op_response = call(
16310            "vipsload",
16311            VOption::new()
16312                .set(
16313                    "filename",
16314                    filename,
16315                )
16316                .set(
16317                    "out",
16318                    &mut out_out,
16319                ),
16320        )?;
16321        utils::result(
16322            vips_op_response,
16323            out_out,
16324            Error::OperationError("Vipsload (vips_vipsload) failed".to_string()),
16325        )
16326    }
16327
16328    /// VipsForeignLoadVipsFile (vipsload), load vips from file (.v, .vips), priority=200, untrusted, is_a, get_flags, get_flags_filename, header
16329    /// returns `VipsImage` - Output image
16330    ///
16331    /// filename: `&str` -> Filename to load from
16332    ///
16333    /// <ins>Optional arguments</ins>
16334    ///
16335    /// flags: [`ForeignFlags`] -> Flags for this file
16336    ///
16337    /// memory: `bool` -> Force open via memory
16338    ///
16339    /// access: [`Access`] -> Required access pattern for this file
16340    ///
16341    /// fail_on: [`FailOn`] -> Error level to fail on
16342    ///
16343    /// revalidate: `bool` -> Don't use a cached result for this operation
16344    pub fn vipsload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
16345        let mut out_out = VipsImage::from(null_mut());
16346        let vips_op_response = call(
16347            "vipsload",
16348            option
16349                .set(
16350                    "filename",
16351                    filename,
16352                )
16353                .set(
16354                    "out",
16355                    &mut out_out,
16356                ),
16357        )?;
16358        utils::result(
16359            vips_op_response,
16360            out_out,
16361            Error::OperationError("Vipsload (vips_vipsload) failed".to_string()),
16362        )
16363    }
16364
16365    /// VipsForeignLoadVipsSource (vipsload_source), load vips from source, nocache, priority=200, untrusted, is_a_source, get_flags, get_flags_filename, header
16366    /// returns `VipsImage` - Output image
16367    ///
16368    /// source: `&VipsSource` -> Source to load from
16369    pub fn vipsload_source(source: &VipsSource) -> Result<VipsImage> {
16370        let mut out_out = VipsImage::from(null_mut());
16371        let vips_op_response = call(
16372            "vipsload_source",
16373            VOption::new()
16374                .set(
16375                    "source",
16376                    source,
16377                )
16378                .set(
16379                    "out",
16380                    &mut out_out,
16381                ),
16382        )?;
16383        utils::result(
16384            vips_op_response,
16385            out_out,
16386            Error::OperationError("VipsloadSource (vips_vipsload_source) failed".to_string()),
16387        )
16388    }
16389
16390    /// VipsForeignLoadVipsSource (vipsload_source), load vips from source, nocache, priority=200, untrusted, is_a_source, get_flags, get_flags_filename, header
16391    /// returns `VipsImage` - Output image
16392    ///
16393    /// source: `&VipsSource` -> Source to load from
16394    ///
16395    /// <ins>Optional arguments</ins>
16396    ///
16397    /// flags: [`ForeignFlags`] -> Flags for this file
16398    ///
16399    /// memory: `bool` -> Force open via memory
16400    ///
16401    /// access: [`Access`] -> Required access pattern for this file
16402    ///
16403    /// fail_on: [`FailOn`] -> Error level to fail on
16404    ///
16405    /// revalidate: `bool` -> Don't use a cached result for this operation
16406    pub fn vipsload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
16407        let mut out_out = VipsImage::from(null_mut());
16408        let vips_op_response = call(
16409            "vipsload_source",
16410            option
16411                .set(
16412                    "source",
16413                    source,
16414                )
16415                .set(
16416                    "out",
16417                    &mut out_out,
16418                ),
16419        )?;
16420        utils::result(
16421            vips_op_response,
16422            out_out,
16423            Error::OperationError("VipsloadSource (vips_vipsload_source) failed".to_string()),
16424        )
16425    }
16426
16427    /// VipsForeignSaveVipsFile (vipssave), save image to file in vips format, nocache (.v, .vips), priority=0,
16428    ///
16429    /// filename: `&str` -> Filename to save to
16430    pub fn vipssave(&self, filename: &str) -> Result<()> {
16431        let vips_op_response = call(
16432            "vipssave",
16433            VOption::new()
16434                .set("in", self)
16435                .set(
16436                    "filename",
16437                    filename,
16438                ),
16439        )?;
16440        utils::result(
16441            vips_op_response,
16442            (),
16443            Error::OperationError("Vipssave (vips_vipssave) failed".to_string()),
16444        )
16445    }
16446
16447    /// VipsForeignSaveVipsFile (vipssave), save image to file in vips format, nocache (.v, .vips), priority=0,
16448    ///
16449    /// filename: `&str` -> Filename to save to
16450    ///
16451    /// <ins>Optional arguments</ins>
16452    ///
16453    /// keep: [`ForeignKeep`] -> Which metadata to retain
16454    ///
16455    /// background: `&[f64]` -> Background value
16456    ///
16457    /// page_height: `i32` -> Set page height for multipage save
16458    ///
16459    /// profile: `&str` -> Filename of ICC profile to embed
16460    pub fn vipssave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
16461        let vips_op_response = call(
16462            "vipssave",
16463            option
16464                .set("in", self)
16465                .set(
16466                    "filename",
16467                    filename,
16468                ),
16469        )?;
16470        utils::result(
16471            vips_op_response,
16472            (),
16473            Error::OperationError("Vipssave (vips_vipssave) failed".to_string()),
16474        )
16475    }
16476
16477    /// VipsForeignSaveVipsTarget (vipssave_target), save image to target in vips format, nocache (.v, .vips), priority=0,
16478    ///
16479    /// target: `&VipsTarget` -> Target to save to
16480    pub fn vipssave_target(&self, target: &VipsTarget) -> Result<()> {
16481        let vips_op_response = call(
16482            "vipssave_target",
16483            VOption::new()
16484                .set("in", self)
16485                .set(
16486                    "target",
16487                    target,
16488                ),
16489        )?;
16490        utils::result(
16491            vips_op_response,
16492            (),
16493            Error::OperationError("VipssaveTarget (vips_vipssave_target) failed".to_string()),
16494        )
16495    }
16496
16497    /// VipsForeignSaveVipsTarget (vipssave_target), save image to target in vips format, nocache (.v, .vips), priority=0,
16498    ///
16499    /// target: `&VipsTarget` -> Target to save to
16500    ///
16501    /// <ins>Optional arguments</ins>
16502    ///
16503    /// keep: [`ForeignKeep`] -> Which metadata to retain
16504    ///
16505    /// background: `&[f64]` -> Background value
16506    ///
16507    /// page_height: `i32` -> Set page height for multipage save
16508    ///
16509    /// profile: `&str` -> Filename of ICC profile to embed
16510    pub fn vipssave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
16511        let vips_op_response = call(
16512            "vipssave_target",
16513            option
16514                .set("in", self)
16515                .set(
16516                    "target",
16517                    target,
16518                ),
16519        )?;
16520        utils::result(
16521            vips_op_response,
16522            (),
16523            Error::OperationError("VipssaveTarget (vips_vipssave_target) failed".to_string()),
16524        )
16525    }
16526
16527    /// VipsForeignLoadWebpFile (webpload), load webp from file (.webp), priority=200, is_a, get_flags, get_flags_filename, header, load
16528    /// returns `VipsImage` - Output image
16529    ///
16530    /// filename: `&str` -> Filename to load from
16531    pub fn webpload(filename: &str) -> Result<VipsImage> {
16532        let mut out_out = VipsImage::from(null_mut());
16533        let vips_op_response = call(
16534            "webpload",
16535            VOption::new()
16536                .set(
16537                    "filename",
16538                    filename,
16539                )
16540                .set(
16541                    "out",
16542                    &mut out_out,
16543                ),
16544        )?;
16545        utils::result(
16546            vips_op_response,
16547            out_out,
16548            Error::OperationError("Webpload (vips_webpload) failed".to_string()),
16549        )
16550    }
16551
16552    /// VipsForeignLoadWebpFile (webpload), load webp from file (.webp), priority=200, is_a, get_flags, get_flags_filename, header, load
16553    /// returns `VipsImage` - Output image
16554    ///
16555    /// filename: `&str` -> Filename to load from
16556    ///
16557    /// <ins>Optional arguments</ins>
16558    ///
16559    /// page: `i32` -> First page to load
16560    ///
16561    /// n: `i32` -> Number of pages to load, -1 for all
16562    ///
16563    /// scale: `f64` -> Factor to scale by
16564    ///
16565    /// flags: [`ForeignFlags`] -> Flags for this file
16566    ///
16567    /// memory: `bool` -> Force open via memory
16568    ///
16569    /// access: [`Access`] -> Required access pattern for this file
16570    ///
16571    /// fail_on: [`FailOn`] -> Error level to fail on
16572    ///
16573    /// revalidate: `bool` -> Don't use a cached result for this operation
16574    pub fn webpload_with_opts(filename: &str, option: VOption) -> Result<VipsImage> {
16575        let mut out_out = VipsImage::from(null_mut());
16576        let vips_op_response = call(
16577            "webpload",
16578            option
16579                .set(
16580                    "filename",
16581                    filename,
16582                )
16583                .set(
16584                    "out",
16585                    &mut out_out,
16586                ),
16587        )?;
16588        utils::result(
16589            vips_op_response,
16590            out_out,
16591            Error::OperationError("Webpload (vips_webpload) failed".to_string()),
16592        )
16593    }
16594
16595    /// VipsForeignLoadWebpBuffer (webpload_buffer), load webp from buffer, priority=200, is_a_buffer, get_flags, get_flags_filename, header, load
16596    /// returns `VipsImage` - Output image
16597    ///
16598    /// buffer: `&[u8]` -> Buffer to load from
16599    pub fn webpload_buffer(buffer: &[u8]) -> Result<VipsImage> {
16600        let mut out_out = VipsImage::from(null_mut());
16601        let vips_op_response = call(
16602            "webpload_buffer",
16603            VOption::new()
16604                .set(
16605                    "buffer",
16606                    buffer,
16607                )
16608                .set(
16609                    "out",
16610                    &mut out_out,
16611                ),
16612        )?;
16613        utils::result(
16614            vips_op_response,
16615            out_out,
16616            Error::OperationError("WebploadBuffer (vips_webpload_buffer) failed".to_string()),
16617        )
16618    }
16619
16620    /// VipsForeignLoadWebpBuffer (webpload_buffer), load webp from buffer, priority=200, is_a_buffer, get_flags, get_flags_filename, header, load
16621    /// returns `VipsImage` - Output image
16622    ///
16623    /// buffer: `&[u8]` -> Buffer to load from
16624    ///
16625    /// <ins>Optional arguments</ins>
16626    ///
16627    /// page: `i32` -> First page to load
16628    ///
16629    /// n: `i32` -> Number of pages to load, -1 for all
16630    ///
16631    /// scale: `f64` -> Factor to scale by
16632    ///
16633    /// flags: [`ForeignFlags`] -> Flags for this file
16634    ///
16635    /// memory: `bool` -> Force open via memory
16636    ///
16637    /// access: [`Access`] -> Required access pattern for this file
16638    ///
16639    /// fail_on: [`FailOn`] -> Error level to fail on
16640    ///
16641    /// revalidate: `bool` -> Don't use a cached result for this operation
16642    pub fn webpload_buffer_with_opts(buffer: &[u8], option: VOption) -> Result<VipsImage> {
16643        let mut out_out = VipsImage::from(null_mut());
16644        let vips_op_response = call(
16645            "webpload_buffer",
16646            option
16647                .set(
16648                    "buffer",
16649                    buffer,
16650                )
16651                .set(
16652                    "out",
16653                    &mut out_out,
16654                ),
16655        )?;
16656        utils::result(
16657            vips_op_response,
16658            out_out,
16659            Error::OperationError("WebploadBuffer (vips_webpload_buffer) failed".to_string()),
16660        )
16661    }
16662
16663    /// VipsForeignLoadWebpSource (webpload_source), load webp from source, nocache, priority=200, is_a_source, get_flags, get_flags_filename, header, load
16664    /// returns `VipsImage` - Output image
16665    ///
16666    /// source: `&VipsSource` -> Source to load from
16667    pub fn webpload_source(source: &VipsSource) -> Result<VipsImage> {
16668        let mut out_out = VipsImage::from(null_mut());
16669        let vips_op_response = call(
16670            "webpload_source",
16671            VOption::new()
16672                .set(
16673                    "source",
16674                    source,
16675                )
16676                .set(
16677                    "out",
16678                    &mut out_out,
16679                ),
16680        )?;
16681        utils::result(
16682            vips_op_response,
16683            out_out,
16684            Error::OperationError("WebploadSource (vips_webpload_source) failed".to_string()),
16685        )
16686    }
16687
16688    /// VipsForeignLoadWebpSource (webpload_source), load webp from source, nocache, priority=200, is_a_source, get_flags, get_flags_filename, header, load
16689    /// returns `VipsImage` - Output image
16690    ///
16691    /// source: `&VipsSource` -> Source to load from
16692    ///
16693    /// <ins>Optional arguments</ins>
16694    ///
16695    /// page: `i32` -> First page to load
16696    ///
16697    /// n: `i32` -> Number of pages to load, -1 for all
16698    ///
16699    /// scale: `f64` -> Factor to scale by
16700    ///
16701    /// flags: [`ForeignFlags`] -> Flags for this file
16702    ///
16703    /// memory: `bool` -> Force open via memory
16704    ///
16705    /// access: [`Access`] -> Required access pattern for this file
16706    ///
16707    /// fail_on: [`FailOn`] -> Error level to fail on
16708    ///
16709    /// revalidate: `bool` -> Don't use a cached result for this operation
16710    pub fn webpload_source_with_opts(source: &VipsSource, option: VOption) -> Result<VipsImage> {
16711        let mut out_out = VipsImage::from(null_mut());
16712        let vips_op_response = call(
16713            "webpload_source",
16714            option
16715                .set(
16716                    "source",
16717                    source,
16718                )
16719                .set(
16720                    "out",
16721                    &mut out_out,
16722                ),
16723        )?;
16724        utils::result(
16725            vips_op_response,
16726            out_out,
16727            Error::OperationError("WebploadSource (vips_webpload_source) failed".to_string()),
16728        )
16729    }
16730
16731    /// VipsForeignSaveWebpFile (webpsave), save as WebP, nocache (.webp), priority=0, rgb alpha
16732    ///
16733    /// filename: `&str` -> Filename to save to
16734    pub fn webpsave(&self, filename: &str) -> Result<()> {
16735        let vips_op_response = call(
16736            "webpsave",
16737            VOption::new()
16738                .set("in", self)
16739                .set(
16740                    "filename",
16741                    filename,
16742                ),
16743        )?;
16744        utils::result(
16745            vips_op_response,
16746            (),
16747            Error::OperationError("Webpsave (vips_webpsave) failed".to_string()),
16748        )
16749    }
16750
16751    /// VipsForeignSaveWebpFile (webpsave), save as WebP, nocache (.webp), priority=0, rgb alpha
16752    ///
16753    /// filename: `&str` -> Filename to save to
16754    ///
16755    /// <ins>Optional arguments</ins>
16756    ///
16757    /// Q: `i32` -> Q factor
16758    ///
16759    /// lossless: `bool` -> Enable lossless compression
16760    ///
16761    /// exact: `bool` -> Preserve color values from transparent pixels
16762    ///
16763    /// preset: [`ForeignWebpPreset`] -> Preset for lossy compression
16764    ///
16765    /// smart_subsample: `bool` -> Enable high quality chroma subsampling
16766    ///
16767    /// near_lossless: `bool` -> Enable preprocessing in lossless mode (uses Q)
16768    ///
16769    /// alpha_q: `i32` -> Change alpha plane fidelity for lossy compression
16770    ///
16771    /// min_size: `bool` -> Optimise for minimum size
16772    ///
16773    /// kmin: `i32` -> Minimum number of frames between key frames
16774    ///
16775    /// kmax: `i32` -> Maximum number of frames between key frames
16776    ///
16777    /// effort: `i32` -> Level of CPU effort to reduce file size
16778    ///
16779    /// target_size: `i32` -> Desired target size in bytes
16780    ///
16781    /// mixed: `bool` -> Allow mixed encoding (might reduce file size)
16782    ///
16783    /// smart_deblock: `bool` -> Enable auto-adjusting of the deblocking filter
16784    ///
16785    /// passes: `i32` -> Number of entropy-analysis passes (in [1..10])
16786    ///
16787    /// keep: [`ForeignKeep`] -> Which metadata to retain
16788    ///
16789    /// background: `&[f64]` -> Background value
16790    ///
16791    /// page_height: `i32` -> Set page height for multipage save
16792    ///
16793    /// profile: `&str` -> Filename of ICC profile to embed
16794    pub fn webpsave_with_opts(&self, filename: &str, option: VOption) -> Result<()> {
16795        let vips_op_response = call(
16796            "webpsave",
16797            option
16798                .set("in", self)
16799                .set(
16800                    "filename",
16801                    filename,
16802                ),
16803        )?;
16804        utils::result(
16805            vips_op_response,
16806            (),
16807            Error::OperationError("Webpsave (vips_webpsave) failed".to_string()),
16808        )
16809    }
16810
16811    /// VipsForeignSaveWebpBuffer (webpsave_buffer), save as WebP, nocache (.webp), priority=0, rgb alpha
16812    /// returns `Vec<u8>` - Buffer to save to
16813    pub fn webpsave_buffer(&self) -> Result<Vec<u8>> {
16814        let mut buffer_out = Vec::new();
16815        let vips_op_response = call(
16816            "webpsave_buffer",
16817            VOption::new()
16818                .set("in", self)
16819                .set(
16820                    "buffer",
16821                    &mut buffer_out,
16822                ),
16823        )?;
16824        utils::result(
16825            vips_op_response,
16826            buffer_out,
16827            Error::OperationError("WebpsaveBuffer (vips_webpsave_buffer) failed".to_string()),
16828        )
16829    }
16830
16831    /// VipsForeignSaveWebpBuffer (webpsave_buffer), save as WebP, nocache (.webp), priority=0, rgb alpha
16832    /// returns `Vec<u8>` - Buffer to save to
16833    ///
16834    /// <ins>Optional arguments</ins>
16835    ///
16836    /// Q: `i32` -> Q factor
16837    ///
16838    /// lossless: `bool` -> Enable lossless compression
16839    ///
16840    /// exact: `bool` -> Preserve color values from transparent pixels
16841    ///
16842    /// preset: [`ForeignWebpPreset`] -> Preset for lossy compression
16843    ///
16844    /// smart_subsample: `bool` -> Enable high quality chroma subsampling
16845    ///
16846    /// near_lossless: `bool` -> Enable preprocessing in lossless mode (uses Q)
16847    ///
16848    /// alpha_q: `i32` -> Change alpha plane fidelity for lossy compression
16849    ///
16850    /// min_size: `bool` -> Optimise for minimum size
16851    ///
16852    /// kmin: `i32` -> Minimum number of frames between key frames
16853    ///
16854    /// kmax: `i32` -> Maximum number of frames between key frames
16855    ///
16856    /// effort: `i32` -> Level of CPU effort to reduce file size
16857    ///
16858    /// target_size: `i32` -> Desired target size in bytes
16859    ///
16860    /// mixed: `bool` -> Allow mixed encoding (might reduce file size)
16861    ///
16862    /// smart_deblock: `bool` -> Enable auto-adjusting of the deblocking filter
16863    ///
16864    /// passes: `i32` -> Number of entropy-analysis passes (in [1..10])
16865    ///
16866    /// keep: [`ForeignKeep`] -> Which metadata to retain
16867    ///
16868    /// background: `&[f64]` -> Background value
16869    ///
16870    /// page_height: `i32` -> Set page height for multipage save
16871    ///
16872    /// profile: `&str` -> Filename of ICC profile to embed
16873    pub fn webpsave_buffer_with_opts(&self, option: VOption) -> Result<Vec<u8>> {
16874        let mut buffer_out = Vec::new();
16875        let vips_op_response = call(
16876            "webpsave_buffer",
16877            option
16878                .set("in", self)
16879                .set(
16880                    "buffer",
16881                    &mut buffer_out,
16882                ),
16883        )?;
16884        utils::result(
16885            vips_op_response,
16886            buffer_out,
16887            Error::OperationError("WebpsaveBuffer (vips_webpsave_buffer) failed".to_string()),
16888        )
16889    }
16890
16891    /// VipsForeignSaveWebpMime (webpsave_mime), save image to webp mime, nocache (.webp), priority=0, rgb alpha
16892    pub fn webpsave_mime(&self) -> Result<()> {
16893        let vips_op_response = call(
16894            "webpsave_mime",
16895            VOption::new().set("in", self),
16896        )?;
16897        utils::result(
16898            vips_op_response,
16899            (),
16900            Error::OperationError("WebpsaveMime (vips_webpsave_mime) failed".to_string()),
16901        )
16902    }
16903
16904    /// VipsForeignSaveWebpMime (webpsave_mime), save image to webp mime, nocache (.webp), priority=0, rgb alpha
16905    ///
16906    /// <ins>Optional arguments</ins>
16907    ///
16908    /// Q: `i32` -> Q factor
16909    ///
16910    /// lossless: `bool` -> Enable lossless compression
16911    ///
16912    /// exact: `bool` -> Preserve color values from transparent pixels
16913    ///
16914    /// preset: [`ForeignWebpPreset`] -> Preset for lossy compression
16915    ///
16916    /// smart_subsample: `bool` -> Enable high quality chroma subsampling
16917    ///
16918    /// near_lossless: `bool` -> Enable preprocessing in lossless mode (uses Q)
16919    ///
16920    /// alpha_q: `i32` -> Change alpha plane fidelity for lossy compression
16921    ///
16922    /// min_size: `bool` -> Optimise for minimum size
16923    ///
16924    /// kmin: `i32` -> Minimum number of frames between key frames
16925    ///
16926    /// kmax: `i32` -> Maximum number of frames between key frames
16927    ///
16928    /// effort: `i32` -> Level of CPU effort to reduce file size
16929    ///
16930    /// target_size: `i32` -> Desired target size in bytes
16931    ///
16932    /// mixed: `bool` -> Allow mixed encoding (might reduce file size)
16933    ///
16934    /// smart_deblock: `bool` -> Enable auto-adjusting of the deblocking filter
16935    ///
16936    /// passes: `i32` -> Number of entropy-analysis passes (in [1..10])
16937    ///
16938    /// keep: [`ForeignKeep`] -> Which metadata to retain
16939    ///
16940    /// background: `&[f64]` -> Background value
16941    ///
16942    /// page_height: `i32` -> Set page height for multipage save
16943    ///
16944    /// profile: `&str` -> Filename of ICC profile to embed
16945    pub fn webpsave_mime_with_opts(&self, option: VOption) -> Result<()> {
16946        let vips_op_response = call(
16947            "webpsave_mime",
16948            option.set("in", self),
16949        )?;
16950        utils::result(
16951            vips_op_response,
16952            (),
16953            Error::OperationError("WebpsaveMime (vips_webpsave_mime) failed".to_string()),
16954        )
16955    }
16956
16957    /// VipsForeignSaveWebpTarget (webpsave_target), save as WebP, nocache (.webp), priority=0, rgb alpha
16958    ///
16959    /// target: `&VipsTarget` -> Target to save to
16960    pub fn webpsave_target(&self, target: &VipsTarget) -> Result<()> {
16961        let vips_op_response = call(
16962            "webpsave_target",
16963            VOption::new()
16964                .set("in", self)
16965                .set(
16966                    "target",
16967                    target,
16968                ),
16969        )?;
16970        utils::result(
16971            vips_op_response,
16972            (),
16973            Error::OperationError("WebpsaveTarget (vips_webpsave_target) failed".to_string()),
16974        )
16975    }
16976
16977    /// VipsForeignSaveWebpTarget (webpsave_target), save as WebP, nocache (.webp), priority=0, rgb alpha
16978    ///
16979    /// target: `&VipsTarget` -> Target to save to
16980    ///
16981    /// <ins>Optional arguments</ins>
16982    ///
16983    /// Q: `i32` -> Q factor
16984    ///
16985    /// lossless: `bool` -> Enable lossless compression
16986    ///
16987    /// exact: `bool` -> Preserve color values from transparent pixels
16988    ///
16989    /// preset: [`ForeignWebpPreset`] -> Preset for lossy compression
16990    ///
16991    /// smart_subsample: `bool` -> Enable high quality chroma subsampling
16992    ///
16993    /// near_lossless: `bool` -> Enable preprocessing in lossless mode (uses Q)
16994    ///
16995    /// alpha_q: `i32` -> Change alpha plane fidelity for lossy compression
16996    ///
16997    /// min_size: `bool` -> Optimise for minimum size
16998    ///
16999    /// kmin: `i32` -> Minimum number of frames between key frames
17000    ///
17001    /// kmax: `i32` -> Maximum number of frames between key frames
17002    ///
17003    /// effort: `i32` -> Level of CPU effort to reduce file size
17004    ///
17005    /// target_size: `i32` -> Desired target size in bytes
17006    ///
17007    /// mixed: `bool` -> Allow mixed encoding (might reduce file size)
17008    ///
17009    /// smart_deblock: `bool` -> Enable auto-adjusting of the deblocking filter
17010    ///
17011    /// passes: `i32` -> Number of entropy-analysis passes (in [1..10])
17012    ///
17013    /// keep: [`ForeignKeep`] -> Which metadata to retain
17014    ///
17015    /// background: `&[f64]` -> Background value
17016    ///
17017    /// page_height: `i32` -> Set page height for multipage save
17018    ///
17019    /// profile: `&str` -> Filename of ICC profile to embed
17020    pub fn webpsave_target_with_opts(&self, target: &VipsTarget, option: VOption) -> Result<()> {
17021        let vips_op_response = call(
17022            "webpsave_target",
17023            option
17024                .set("in", self)
17025                .set(
17026                    "target",
17027                    target,
17028                ),
17029        )?;
17030        utils::result(
17031            vips_op_response,
17032            (),
17033            Error::OperationError("WebpsaveTarget (vips_webpsave_target) failed".to_string()),
17034        )
17035    }
17036
17037    /// VipsWorley (worley), make a worley noise image
17038    /// returns `VipsImage` - Output image
17039    ///
17040    /// width: `i32` -> Image width in pixels
17041    ///
17042    /// height: `i32` -> Image height in pixels
17043    pub fn worley(width: i32, height: i32) -> Result<VipsImage> {
17044        let mut out_out = VipsImage::from(null_mut());
17045        let vips_op_response = call(
17046            "worley",
17047            VOption::new()
17048                .set(
17049                    "out",
17050                    &mut out_out,
17051                )
17052                .set(
17053                    "width",
17054                    width,
17055                )
17056                .set(
17057                    "height",
17058                    height,
17059                ),
17060        )?;
17061        utils::result(
17062            vips_op_response,
17063            out_out,
17064            Error::OperationError("Worley (vips_worley) failed".to_string()),
17065        )
17066    }
17067
17068    /// VipsWorley (worley), make a worley noise image
17069    /// returns `VipsImage` - Output image
17070    ///
17071    /// width: `i32` -> Image width in pixels
17072    ///
17073    /// height: `i32` -> Image height in pixels
17074    ///
17075    /// <ins>Optional arguments</ins>
17076    ///
17077    /// cell_size: `i32` -> Size of Worley cells
17078    ///
17079    /// seed: `i32` -> Random number seed
17080    pub fn worley_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
17081        let mut out_out = VipsImage::from(null_mut());
17082        let vips_op_response = call(
17083            "worley",
17084            option
17085                .set(
17086                    "out",
17087                    &mut out_out,
17088                )
17089                .set(
17090                    "width",
17091                    width,
17092                )
17093                .set(
17094                    "height",
17095                    height,
17096                ),
17097        )?;
17098        utils::result(
17099            vips_op_response,
17100            out_out,
17101            Error::OperationError("Worley (vips_worley) failed".to_string()),
17102        )
17103    }
17104
17105    /// VipsWrap (wrap), wrap image origin
17106    /// returns `VipsImage` - Output image
17107    pub fn wrap(&self) -> Result<VipsImage> {
17108        let mut out_out = VipsImage::from(null_mut());
17109        let vips_op_response = call(
17110            "wrap",
17111            VOption::new()
17112                .set("in", self)
17113                .set(
17114                    "out",
17115                    &mut out_out,
17116                ),
17117        )?;
17118        utils::result(
17119            vips_op_response,
17120            out_out,
17121            Error::OperationError("Wrap (vips_wrap) failed".to_string()),
17122        )
17123    }
17124
17125    /// VipsWrap (wrap), wrap image origin
17126    /// returns `VipsImage` - Output image
17127    ///
17128    /// <ins>Optional arguments</ins>
17129    ///
17130    /// x: `i32` -> Left edge of input in output
17131    ///
17132    /// y: `i32` -> Top edge of input in output
17133    pub fn wrap_with_opts(&self, option: VOption) -> Result<VipsImage> {
17134        let mut out_out = VipsImage::from(null_mut());
17135        let vips_op_response = call(
17136            "wrap",
17137            option
17138                .set("in", self)
17139                .set(
17140                    "out",
17141                    &mut out_out,
17142                ),
17143        )?;
17144        utils::result(
17145            vips_op_response,
17146            out_out,
17147            Error::OperationError("Wrap (vips_wrap) failed".to_string()),
17148        )
17149    }
17150
17151    /// VipsXyz (xyz), make an image where pixel values are coordinates
17152    /// returns `VipsImage` - Output image
17153    ///
17154    /// width: `i32` -> Image width in pixels
17155    ///
17156    /// height: `i32` -> Image height in pixels
17157    pub fn xyz(width: i32, height: i32) -> Result<VipsImage> {
17158        let mut out_out = VipsImage::from(null_mut());
17159        let vips_op_response = call(
17160            "xyz",
17161            VOption::new()
17162                .set(
17163                    "out",
17164                    &mut out_out,
17165                )
17166                .set(
17167                    "width",
17168                    width,
17169                )
17170                .set(
17171                    "height",
17172                    height,
17173                ),
17174        )?;
17175        utils::result(
17176            vips_op_response,
17177            out_out,
17178            Error::OperationError("Xyz (vips_xyz) failed".to_string()),
17179        )
17180    }
17181
17182    /// VipsXyz (xyz), make an image where pixel values are coordinates
17183    /// returns `VipsImage` - Output image
17184    ///
17185    /// width: `i32` -> Image width in pixels
17186    ///
17187    /// height: `i32` -> Image height in pixels
17188    ///
17189    /// <ins>Optional arguments</ins>
17190    ///
17191    /// csize: `i32` -> Size of third dimension
17192    ///
17193    /// dsize: `i32` -> Size of fourth dimension
17194    ///
17195    /// esize: `i32` -> Size of fifth dimension
17196    pub fn xyz_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
17197        let mut out_out = VipsImage::from(null_mut());
17198        let vips_op_response = call(
17199            "xyz",
17200            option
17201                .set(
17202                    "out",
17203                    &mut out_out,
17204                )
17205                .set(
17206                    "width",
17207                    width,
17208                )
17209                .set(
17210                    "height",
17211                    height,
17212                ),
17213        )?;
17214        utils::result(
17215            vips_op_response,
17216            out_out,
17217            Error::OperationError("Xyz (vips_xyz) failed".to_string()),
17218        )
17219    }
17220
17221    /// VipsZone (zone), make a zone plate
17222    /// returns `VipsImage` - Output image
17223    ///
17224    /// width: `i32` -> Image width in pixels
17225    ///
17226    /// height: `i32` -> Image height in pixels
17227    pub fn zone(width: i32, height: i32) -> Result<VipsImage> {
17228        let mut out_out = VipsImage::from(null_mut());
17229        let vips_op_response = call(
17230            "zone",
17231            VOption::new()
17232                .set(
17233                    "out",
17234                    &mut out_out,
17235                )
17236                .set(
17237                    "width",
17238                    width,
17239                )
17240                .set(
17241                    "height",
17242                    height,
17243                ),
17244        )?;
17245        utils::result(
17246            vips_op_response,
17247            out_out,
17248            Error::OperationError("Zone (vips_zone) failed".to_string()),
17249        )
17250    }
17251
17252    /// VipsZone (zone), make a zone plate
17253    /// returns `VipsImage` - Output image
17254    ///
17255    /// width: `i32` -> Image width in pixels
17256    ///
17257    /// height: `i32` -> Image height in pixels
17258    ///
17259    /// <ins>Optional arguments</ins>
17260    ///
17261    /// uchar: `bool` -> Output an unsigned char image
17262    pub fn zone_with_opts(width: i32, height: i32, option: VOption) -> Result<VipsImage> {
17263        let mut out_out = VipsImage::from(null_mut());
17264        let vips_op_response = call(
17265            "zone",
17266            option
17267                .set(
17268                    "out",
17269                    &mut out_out,
17270                )
17271                .set(
17272                    "width",
17273                    width,
17274                )
17275                .set(
17276                    "height",
17277                    height,
17278                ),
17279        )?;
17280        utils::result(
17281            vips_op_response,
17282            out_out,
17283            Error::OperationError("Zone (vips_zone) failed".to_string()),
17284        )
17285    }
17286
17287    /// VipsZoom (zoom), zoom an image
17288    /// returns `VipsImage` - Output image
17289    ///
17290    /// xfac: `i32` -> Horizontal zoom factor
17291    ///
17292    /// yfac: `i32` -> Vertical zoom factor
17293    pub fn zoom(&self, xfac: i32, yfac: i32) -> Result<VipsImage> {
17294        let mut out_out = VipsImage::from(null_mut());
17295        let vips_op_response = call(
17296            "zoom",
17297            VOption::new()
17298                .set(
17299                    "input",
17300                    self,
17301                )
17302                .set(
17303                    "out",
17304                    &mut out_out,
17305                )
17306                .set(
17307                    "xfac",
17308                    xfac,
17309                )
17310                .set(
17311                    "yfac",
17312                    yfac,
17313                ),
17314        )?;
17315        utils::result(
17316            vips_op_response,
17317            out_out,
17318            Error::OperationError("Zoom (vips_zoom) failed".to_string()),
17319        )
17320    }
17321
17322    // Alias for operator overload
17323    pub(crate) fn add_image(&self, right: &VipsImage) -> Result<VipsImage> {
17324        self.add(right)
17325    }
17326
17327    /// VipsBandjoin (bandjoin), bandwise join two images
17328    /// returns `VipsImage` - Output image
17329    ///
17330    /// other: `VipsImage` -> Input images
17331    pub fn bandjoin_with(self, other: VipsImage) -> Result<VipsImage> {
17332        Self::bandjoin(&[self, other])
17333    }
17334
17335    /// VipsMedian (median), median filter of the specified size.
17336    pub fn median(&self, size: i32) -> Result<VipsImage> {
17337        self.rank(
17338            size,
17339            size,
17340            (size * size) / 2,
17341        )
17342    }
17343}