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:
1 parent
2ef6544ca2
commit
01e8e682c0
5 files changed
+63
No files matched your search
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user