@@ -21,25 +21,72 @@ extension vImage {
21
21
22
22
/// Error codes returned by vImage operations.
23
23
public enum Error : Int , Swift . Error {
24
+ /// The vImage function completed without error.
24
25
case noError = 0
26
+
27
+ // The region of interest, as specified by the `srcOffsetToROI_X` and
28
+ // `srcOffsetToROI_Y` parameters and the height and width of the destination
29
+ // buffer, extends beyond the bottom edge or right edge of the source buffer.
25
30
case roiLargerThanInputBuffer = - 21766
31
+
32
+ /// Either the kernel height, the kernel width, or both, are even.
26
33
case invalidKernelSize = - 21767
34
+
35
+ /// The edge style specified is invalid.
27
36
case invalidEdgeStyle = - 21768
37
+
38
+ /// The `srcOffsetToROI_X` parameter that specifies the left edge of
39
+ /// the region of interest is greater than the width of the source image.
28
40
case invalidOffset_X = - 21769
41
+
42
+ /// The `srcOffsetToROI_X` parameter that specifies the left edge of
43
+ /// the region of interest is greater than the height of the source image.
29
44
case invalidOffset_Y = - 21770
45
+
46
+ /// An attempt to allocate memory failed.
30
47
case memoryAllocationError = - 21771
48
+
49
+ /// A pointer parameter is NULL and it must not be.
31
50
case nullPointerArgument = - 21772
51
+
52
+ /// Invalid parameter.
32
53
case invalidParameter = - 21773
54
+
55
+ /// The function requires the source and destination buffers to have
56
+ /// the same height and the same width, but they do not.
33
57
case bufferSizeMismatch = - 21774
58
+
59
+ /// The flag is not recognized.
34
60
case unknownFlagsBit = - 21775
61
+
62
+ /// A serious error occured inside vImage, which prevented vImage
63
+ /// from continuing.
35
64
case internalError = - 21776
65
+
66
+ /// The vImage_Buffer.rowBytes field is invalid.
36
67
case invalidRowBytes = - 21777
68
+
69
+ /// a `vImage_CGImageFormat` or `vImageCVImageFormatRef` contains
70
+ /// an invalid format.
37
71
case invalidImageFormat = - 21778
72
+
73
+ /// ColorSync.framework is completely missing.
38
74
case colorSyncIsAbsent = - 21779
75
+
76
+ /// The source images and destination images may not alias the same image data.
39
77
case outOfPlaceOperationRequired = - 21780
78
+
79
+ /// An invalid `CGImageRef` or `CVPixelBufferRef` was passed to the function.
40
80
case invalidImageObject = - 21781
81
+
82
+ /// A `vImageCVImageFormatRef` contains an invalid format.
41
83
case invalidCVImageFormat = - 21782
84
+
85
+ /// Some lower level conversion APIs only support conversion among a
86
+ /// sparse matrix of image formats.
42
87
case unsupportedConversion = - 21783
88
+
89
+ /// Core Video is absent.
43
90
case coreVideoIsAbsent = - 21784
44
91
45
92
public init ( vImageError: vImage_Error ) {
0 commit comments