mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +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:
@@ -1640,3 +1640,9 @@ defilter :: proc(img: ^Image, filter_bytes: ^bytes.Buffer, header: ^image.PNG_IH
|
||||
}
|
||||
|
||||
load :: proc{load_from_file, load_from_slice, load_from_context}
|
||||
|
||||
|
||||
@(init, private)
|
||||
_register :: proc() {
|
||||
image.register_loader(.PNG, load_from_slice)
|
||||
}
|
||||
Reference in New Issue
Block a user