Repository navigation
Expand file tree
/
Copy pathpkg.generated.mbti
More file actions
343 lines (297 loc) · 9.73 KB
/
Copy pathpkg.generated.mbti
File metadata and controls
343 lines (297 loc) · 9.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
// Generated using `moon info`, DON'T EDIT IT
package "0717lee/pixelforge"
// Values
pub fn avif_decode(Array[Byte]) -> Image?
pub fn avif_encode(Image) -> Array[Byte]
pub fn bmp_decode(Array[Byte]) -> Image?
pub fn bmp_encode(Image, Bool) -> Array[Byte]
pub fn clamp_byte(Int32) -> Byte
pub fn detect_image_format(Array[Byte]) -> ImageFormat?
pub fn gif_decode(Array[Byte]) -> Image?
pub fn gif_decode_all(Array[Byte]) -> Array[GifFrame]?
pub fn gif_encode(Image) -> Array[Byte]
pub fn hamming_distance(UInt64, UInt64) -> Int32
pub fn hsl_to_rgb(Double, Double, Double) -> (Int32, Int32, Int32)
pub fn hsv_to_rgb(Double, Double, Double) -> (Int32, Int32, Int32)
pub fn image_metadata(Array[Byte]) -> ImageMetadata?
pub fn jpeg_decode(Array[Byte]) -> Image?
pub fn jpeg_encode(Image, Int32) -> Array[Byte]
pub fn png_decode(Array[Byte]) -> Image?
pub fn png_encode(Image) -> Array[Byte]
pub fn qoi_decode(Array[Byte]) -> Image?
pub fn qoi_encode(Image) -> Array[Byte]
pub fn rgb_to_hsl(Int32, Int32, Int32) -> (Double, Double, Double)
pub fn rgb_to_hsv(Int32, Int32, Int32) -> (Double, Double, Double)
pub fn rgb_to_ycbcr(Int32, Int32, Int32) -> (Int32, Int32, Int32)
pub fn tiff_decode(Array[Byte]) -> Image?
pub fn webp_decode(Array[Byte]) -> Image?
pub fn webp_encode(Image) -> Array[Byte]
pub fn ycbcr_to_rgb(Int32, Int32, Int32) -> (Int32, Int32, Int32)
// Errors
// Types and methods
pub(all) struct Affine {
a : Double
b : Double
c : Double
d : Double
e : Double
f : Double
}
pub fn Affine::apply(Self, Double, Double) -> (Double, Double)
pub fn Affine::identity() -> Self
pub fn Affine::invert(Self) -> Self?
pub fn Affine::rotation(Double) -> Self
pub fn Affine::scaling(Double, Double) -> Self
pub fn Affine::shear(Double, Double) -> Self
pub fn Affine::then(Self, Self) -> Self
pub fn Affine::translation(Double, Double) -> Self
pub(all) enum BlendMode {
Normal
Multiply
Screen
Overlay
Darken
Lighten
Difference
Add
}
pub(all) struct BoundingBox {
min_x : Int32
min_y : Int32
max_x : Int32
max_y : Int32
}
pub(all) struct ComponentStats {
label : Int32
area : Int32
bbox : BoundingBox
centroid : (Double, Double)
min_x : Int32
min_y : Int32
max_x : Int32
max_y : Int32
centroid_x : Double
centroid_y : Double
}
pub(all) struct ContourPoint {
x : Int32
y : Int32
}
pub(all) struct Corner {
x : Int32
y : Int32
response : Double
}
pub(all) enum Filter {
Grayscale
Invert
Brightness(Int32)
Contrast(Double)
Blur
Sharpen
Emboss
Edges
Sobel
Sepia
Threshold(Int32)
Pixelate(Int32)
Median
HistogramEqualize
FlipHorizontal
FlipVertical
Posterize(Int32)
Gamma(Double)
Vignette(Double)
Scharr
Canny(Int32)
Otsu
DitherMono
}
pub(all) struct GifFrame {
image : Image
left : Int32
top : Int32
delay_cs : Int32
disposal : Int32
transparent_index : Int32
}
pub(all) struct Image {
width : Int32
height : Int32
data : FixedArray[Byte]
}
pub fn Image::adaptive_mean(Self, Int32, Int32) -> Self
pub fn Image::add_gaussian_noise(Self, UInt64, Double) -> Self
pub fn Image::add_salt_pepper(Self, UInt64, Double) -> Self
pub fn Image::adjust_lightness(Self, Double) -> Self
pub fn Image::affine(Self, Affine) -> Self
pub fn Image::apply_filter_id(Self, Int32, Double) -> Self
pub fn Image::apply_pipeline(Self, Pipeline) -> Self
pub fn Image::auto_contrast(Self) -> Self
pub fn Image::average_hash(Self) -> UInt64
pub fn Image::bilateral(Self, Int32, Double, Double) -> Self
pub fn Image::blur(Self) -> Self
pub fn Image::box_blur(Self, Int32) -> Self
pub fn Image::brightness(Self, Int32) -> Self
pub fn Image::canny(Self, Int32, Int32) -> Self
pub fn Image::composite(Self, Self, BlendMode) -> Self
pub fn Image::contours(Self, Int32) -> Array[Array[ContourPoint]]
pub fn Image::contrast(Self, Double) -> Self
pub fn Image::convolve(Self, Kernel) -> Self
pub fn Image::copy(Self) -> Self
pub fn Image::count_components(Self, Int32) -> Int32
pub fn Image::crop(Self, Int32, Int32, Int32, Int32) -> Self
pub fn Image::difference_hash(Self) -> UInt64
pub fn Image::dilate(Self) -> Self
pub fn Image::distance_transform(Self, Int32) -> Self
pub fn Image::dither_grayscale(Self, Int32) -> Self
pub fn Image::dither_mono(Self) -> Self
pub fn Image::draw_char(Self, Int32, Int32, Char, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn Image::draw_circle(Self, Int32, Int32, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn Image::draw_line(Self, Int32, Int32, Int32, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn Image::draw_rect(Self, Int32, Int32, Int32, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn Image::draw_text(Self, Int32, Int32, String, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn Image::edges(Self) -> Self
pub fn Image::emboss(Self) -> Self
pub fn Image::erode(Self) -> Self
pub fn Image::fill_circle(Self, Int32, Int32, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn Image::fill_rect(Self, Int32, Int32, Int32, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn Image::flip_horizontal(Self) -> Self
pub fn Image::flip_vertical(Self) -> Self
pub fn Image::flood_fill(Self, Int32, Int32, Byte, Byte, Byte, Byte, Int32) -> Self
pub fn Image::for_each_row(Self, (ImageRow) -> Unit) -> Unit
pub fn Image::for_each_tile(Self, Int32, Int32, (ImageTile) -> Unit) -> Unit
pub fn Image::from_bytes(Int32, Int32, FixedArray[Byte]) -> Self
pub fn Image::gamma(Self, Double) -> Self
pub fn Image::gaussian(Self, Int32) -> Self
pub fn Image::get_pixel(Self, Int32, Int32) -> (Byte, Byte, Byte, Byte)
pub fn Image::grayscale(Self) -> Self
pub fn Image::harris_corners(Self, Double, Int32) -> Array[Corner]
pub fn Image::histogram_equalize(Self) -> Self
pub fn Image::histogram_luma(Self) -> FixedArray[Int32]
pub fn Image::histogram_rgb(Self) -> (FixedArray[Int32], FixedArray[Int32], FixedArray[Int32])
pub fn Image::hog(Self, Int32, Int32, Int32) -> Array[Double]
pub fn Image::hue_rotate(Self, Double) -> Self
pub fn Image::integral_image(Self) -> Integral
pub fn Image::invert(Self) -> Self
pub fn Image::label_components(Self, Int32) -> (Array[Int32], Int32)
pub fn Image::lbp_codes(Self) -> FixedArray[Byte]
pub fn Image::lbp_histogram(Self) -> FixedArray[Int32]
pub fn Image::levels(Self, Int32, Int32, Double) -> Self
pub fn Image::luma_mse(Self, Self) -> Double
pub fn Image::map_rgb(Self, (Int32, Int32, Int32) -> (Int32, Int32, Int32)) -> Self
pub fn Image::median(Self) -> Self
pub fn Image::morph_close(Self) -> Self
pub fn Image::morph_open(Self) -> Self
pub fn Image::mse(Self, Self) -> Double
pub fn Image::new(Int32, Int32) -> Self
pub fn Image::otsu(Self) -> Self
pub fn Image::otsu_threshold(Self) -> Int32
pub fn Image::pad(Self, Int32, Int32, Int32, Int32, Byte, Byte, Byte, Byte) -> Self
pub fn Image::pixel_count(Self) -> Int32
pub fn Image::pixelate(Self, Int32) -> Self
pub fn Image::posterize(Self, Int32) -> Self
pub fn Image::psnr(Self, Self) -> Double
pub fn Image::regionprops(Self, Int32) -> Array[ComponentStats]
pub fn Image::resize_bicubic(Self, Int32, Int32) -> Self
pub fn Image::resize_bilinear(Self, Int32, Int32, alpha_weighted? : Bool) -> Self
pub fn Image::resize_nearest(Self, Int32, Int32) -> Self
pub fn Image::rotate(Self, Double) -> Self
pub fn Image::rotate90(Self) -> Self
pub fn Image::saturate(Self, Double) -> Self
pub fn Image::sauvola(Self, Int32, Double, Int32) -> Self
pub fn Image::scharr(Self) -> Self
pub fn Image::sepia(Self) -> Self
pub fn Image::set_pixel(Self, Int32, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn Image::sharpen(Self) -> Self
pub fn Image::skeletonize(Self, Int32, Int32) -> Self
pub fn Image::sobel(Self) -> Self
pub fn Image::ssim(Self, Self) -> Double
pub fn Image::stats(Self) -> Stats
pub fn Image::threshold(Self, Int32) -> Self
pub fn Image::thumbnail(Self, Int32, Int32) -> Self
pub fn Image::translate(Self, Double, Double) -> Self
pub fn Image::unsharp_mask(Self, Int32, Double) -> Self
pub fn Image::vignette(Self, Double) -> Self
pub(all) enum ImageFormat {
Png
Gif
Qoi
Bmp
Jpeg
Webp
Avif
Tiff
}
pub fn ImageFormat::name(Self) -> String
pub(all) struct ImageMetadata {
format : ImageFormat
width : Int32
height : Int32
animated : Bool
}
pub(all) struct ImageRow {
image : Image
row_y : Int32
}
pub fn ImageRow::get_pixel(Self, Int32) -> (Byte, Byte, Byte, Byte)
pub fn ImageRow::width(Self) -> Int32
pub fn ImageRow::y(Self) -> Int32
pub(all) struct ImageTile {
image : Image
origin_x : Int32
origin_y : Int32
tile_width : Int32
tile_height : Int32
}
pub fn ImageTile::copy(Self) -> Image
pub fn ImageTile::get_pixel(Self, Int32, Int32) -> (Byte, Byte, Byte, Byte)
pub fn ImageTile::height(Self) -> Int32
pub fn ImageTile::set_pixel(Self, Int32, Int32, Byte, Byte, Byte, Byte) -> Unit
pub fn ImageTile::width(Self) -> Int32
pub fn ImageTile::x(Self) -> Int32
pub fn ImageTile::y(Self) -> Int32
pub(all) struct Integral {
width : Int32
height : Int32
sat : Array[Int64]
}
pub fn Integral::rect_sum(Self, Int32, Int32, Int32, Int32, Int32) -> Int64
pub(all) struct Kernel {
size : Int32
weights : Array[Double]
divisor : Double
bias : Double
}
pub fn Kernel::box_blur() -> Self
pub fn Kernel::edges() -> Self
pub fn Kernel::emboss() -> Self
pub fn Kernel::gaussian_blur() -> Self
pub fn Kernel::new(Int32, Array[Double], Double, Double) -> Self
pub fn Kernel::sharpen() -> Self
pub struct Pipeline {
operations : Array[Filter]
}
pub fn Pipeline::append(Self, Filter) -> Self
pub fn Pipeline::apply(Self, Image) -> Image
pub fn Pipeline::from_filter(Filter) -> Self
pub fn Pipeline::is_empty(Self) -> Bool
pub fn Pipeline::length(Self) -> Int32
pub fn Pipeline::new() -> Self
pub fn Pipeline::then(Self, Self) -> Self
pub struct Stats {
min_r : Int32
max_r : Int32
mean_r : Int32
min_g : Int32
max_g : Int32
mean_g : Int32
min_b : Int32
max_b : Int32
mean_b : Int32
luma_min : Int32
luma_max : Int32
luma_mean : Int32
}
// Type aliases
// Traits