Generalized core:image loader

```odin
import "core:image"
import "core:image/png"

...

img, err := image.load_from_file("path.png")
```
This commit is contained in:
gingerBill
2022-05-14 14:38:26 +01:00
parent 2ef6544ca2
commit 01e8e682c0
5 changed files with 63 additions and 0 deletions
+5
View File
@@ -403,4 +403,9 @@ qoi_hash :: #force_inline proc(pixel: RGBA_Pixel) -> (index: u8) {
i4 := u16(pixel.a) * 11
return u8((i1 + i2 + i3 + i4) & 63)
}
@(init, private)
_register :: proc() {
image.register_loader(.QOI, load_from_slice)
}