Commit Graph

69 Commits

Author SHA1 Message Date
gingerBill
f7b18cd86e Add DjVu 2022-05-14 15:32:28 +01:00
gingerBill
d74e4b427d Remove bool return on image.destroy 2022-05-14 15:16:56 +01:00
gingerBill
22dc020647 Destroy pixel buffer 2022-05-14 15:16:14 +01:00
gingerBill
e8485ee7e7 Correction to image.destroy 2022-05-14 15:15:04 +01: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
4e080057fb Rename load_from_buffer to load_from_bytes 2022-05-14 15:01:17 +01:00
gingerBill
9c1f270bd5 Rename load_from_slice to load_from_bytes across core 2022-05-14 14:55:15 +01:00
gingerBill
e46d87b221 Fix type and keep -vet happy 2022-05-14 14:47:58 +01:00
gingerBill
5af7004f44 Add image packages to examples/all 2022-05-14 14:43:50 +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
7057f5fc11 Add PAM and PFM to format detection. 2022-05-14 15:17:37 +02:00
gingerBill
f17a9dd5e7 Add even more file formats 2022-05-14 13:59:49 +01:00
gingerBill
0cca42a1f4 Add image.which file format testing procedures 2022-05-14 13:46:10 +01:00
WalterPlinge
74d3bcec05 Fixed the depth values in the doc file, made some info more clear 2022-05-01 21:29:09 +01:00
Jeroen van Rijn
6ade9acc4d [pbm] Remove stray comment. 2022-04-30 22:54:53 +02:00
Jeroen van Rijn
694c13fe86 Merge branch 'master' into pr/1726 2022-04-30 21:01:04 +02:00
Jeroen van Rijn
8bd16c32f3 [pbm] Fixes. 2022-04-30 21:00:32 +02:00
Jeroen van Rijn
dd8b71e353 [pbm] WIP unit tests. 2022-04-30 17:52:23 +02:00
Jeroen van Rijn
d6a8216ce4 [pbm] Normalize some errors, correct .depth 2022-04-30 14:34:07 +02:00
Jeroen van Rijn
ae3deea153 Merge branch 'master' into pr/1726 2022-04-30 12:29:28 +02:00
hikari
0ad448f1c7 sys/windows: add a couple of procedures and types 2022-04-30 11:21:37 +03:00
Jeroen van Rijn
fdd24f787f [image/tga] Writer for RGB(A) 8-bit images. 2022-04-18 23:28:34 +02:00
WalterPlinge
b6abd691f4 Image: Fix implicit enum error 2022-04-18 20:42:50 +01:00
WalterPlinge
8d370fabdd Added initial Netpbm image format support 2022-04-18 20:29:37 +01: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
ab9457346d [PNG] Remove debug printf. 2022-04-12 18:26:10 +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
gingerBill
17e36bd5e1 Utilize union #shared_nil to core:image Error 2022-03-24 12:06:18 +00:00
gingerBill
3d7d347192 Convert ODIN_OS and ODIN_ARCH to use enums rather than use strings 2022-01-20 19:56:05 +00:00
gingerBill
c85ac955f7 Simplify docs to hide the copyright 2022-01-17 19:00:47 +00:00
gingerBill
f0529535e0 ODIN_ENDIAN changed to an enum constant; ODIN_ENUM_STRING is the new string version of the old constant 2022-01-15 17:53:18 +00:00
Jeroen van Rijn
b4b53aeb71 png: Channel helper metadata. 2021-10-06 22:47:40 +02:00
Jeroen van Rijn
c4b4a841d6 png: Move metadata. 2021-10-06 22:43:33 +02:00
Jeroen van Rijn
263d63aa56 png: Add more OOM checks. 2021-10-06 22:09:32 +02:00
Jeroen van Rijn
8fcd1794a6 png: Add sane compile-time maximums for dimensions + chunk sizes. 2021-10-06 21:48:22 +02:00
Jeroen van Rijn
9b5ae95677 png + compress: Rearrange error unions. 2021-10-06 20:45:29 +02:00
Jeroen van Rijn
21c6d691d8 Add additional error checking to helpers. 2021-10-06 20:10:37 +02:00
Jeroen van Rijn
72fe1e88a3 Make sure to delete on the right allocator. 2021-09-19 12:19:01 +02:00
gingerBill
f57201bbd1 Remove unneeded semicolons from the core library 2021-08-31 22:32:53 +01:00
gingerBill
251da264ed Remove unneeded semicolons from the core library 2021-08-31 22:21:13 +01:00
gingerBill
4035fec784 Add more uses of or_return 2021-08-15 18:13:56 +01:00
Jeroen van Rijn
d949d5a046 ZLIB: cleanup. 2021-06-27 16:48:12 +02:00
Jeroen van Rijn
064516bf0b PNG: Inform inflate about expected output size for extra speed. 2021-06-27 13:57:12 +02:00
Jeroen van Rijn
eaf88bcc4d PNG: Let PNG use the new compress I/O routines. 2021-06-27 13:51:52 +02:00
Jeroen van Rijn
342adb627d All reads now skip stream if in memory. 2021-06-23 16:32:48 +02:00
Jeroen van Rijn
8663c64e47 Refactor ZLIB structs. 2021-06-23 16:32:47 +02:00
Jeroen van Rijn
ae0b8fce44 Move bytes utils back to EXR code for the time being.
Also, allow PNG example to be run directly from `core:image/png` directory.
2021-06-22 16:39:00 +02:00
Jeroen van Rijn
d5e2b387fa PNG: Fix leak if you don't ask for metadata. 2021-06-21 22:47:54 +02:00
Jeroen van Rijn
1e8c12c2a3 Comment out tracy imports. 2021-06-21 21:41:56 +02:00