mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
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:
@@ -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