Commit Graph

11 Commits

Author SHA1 Message Date
gingerBill
49ab935ae9 Disallow for in in favour of for _ in 2023-08-08 14:56:12 +01:00
gingerBill
1e17f44991 Improve error handling for resize and reserve procedures 2023-05-22 11:47:36 +01:00
Jeroen van Rijn
bbf40bf318 Rename save_to_memory for consistency. 2023-03-24 10:47:33 +01:00
gingerBill
90c44c34a9 Make core:image packages work on js platform (wasm32) by not requiring core:os 2023-03-23 20:53:19 +00:00
gingerBill
c516fb947f Add image.destroy 2022-05-14 15:11:23 +01:00
gingerBill
3aa0a733f3 Add destroy with loader 2022-05-14 15:06:55 +01:00
gingerBill
9c1f270bd5 Rename load_from_slice to load_from_bytes across core 2022-05-14 14:55:15 +01:00
gingerBill
01e8e682c0 Generalized core:image loader
```odin
import "core:image"
import "core:image/png"

...

img, err := image.load_from_file("path.png")
```
2022-05-14 14:38:26 +01:00
Jeroen van Rijn
d6a8216ce4 [pbm] Normalize some errors, correct .depth 2022-04-30 14:34:07 +02:00
Jeroen van Rijn
bf712e9355 [QOI] Add support for RGB images (previously loader always output RGBA).
Also add QOI to CI test suite by roundtripping 8-bit RGB(A) through QOI and checking the hashes match.
2022-04-12 19:23:48 +02:00
Jeroen van Rijn
15b440c4f1 [image] Add QOI load/save.
Additionally:
- Firm up PNG loader with some additional checks.
- Add helper functions to `core:image` to expand grayscale to RGB(A), and so on.

TODO: Possibly replace PNG's post-processing steps with calls to the new helper functions.
2022-04-12 18:14:09 +02:00