diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-06-21 21:05:52 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-06-21 21:05:52 +0200 |
| commit | 352494cbb4ad2ddb650b59ce8102da3ea0942e79 (patch) | |
| tree | 26e0d545c17b6bc64a40550e493a2ba1da648070 /core/image | |
| parent | 797c41950a90f75a279a48195baf733903e23ca3 (diff) | |
ZLIB: Start optimization.
Diffstat (limited to 'core/image')
| -rw-r--r-- | core/image/common.odin | 17 | ||||
| -rw-r--r-- | core/image/png/example.odin | 11 | ||||
| -rw-r--r-- | core/image/png/helpers.odin | 15 | ||||
| -rw-r--r-- | core/image/png/png.odin | 9 |
4 files changed, 44 insertions, 8 deletions
diff --git a/core/image/common.odin b/core/image/common.odin index 8443a2d22..7a678f5b0 100644 --- a/core/image/common.odin +++ b/core/image/common.odin @@ -1,5 +1,14 @@ package image +/* + Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. + Made available under Odin's BSD-2 license. + + List of contributors: + Jeroen van Rijn: Initial implementation, optimization. + Ginger Bill: Cosmetic changes. +*/ + import "core:bytes" import "core:mem" @@ -66,10 +75,10 @@ Image_Option: If the image has an alpha channel, drop it. You may want to use `.alpha_premultiply` in this case. - NOTE: For PNG, this also skips handling of the tRNS chunk, if present, - unless you select `alpha_premultiply`. - In this case it'll premultiply the specified pixels in question only, - as the others are implicitly fully opaque. + NOTE: For PNG, this also skips handling of the tRNS chunk, if present, + unless you select `alpha_premultiply`. + In this case it'll premultiply the specified pixels in question only, + as the others are implicitly fully opaque. `.alpha_premultiply` If the image has an alpha channel, returns image data as follows: diff --git a/core/image/png/example.odin b/core/image/png/example.odin index 3dd4af2ff..3891a88e5 100644 --- a/core/image/png/example.odin +++ b/core/image/png/example.odin @@ -1,6 +1,17 @@ //+ignore package png +/* + Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. + Made available under Odin's BSD-2 license. + + List of contributors: + Jeroen van Rijn: Initial implementation. + Ginger Bill: Cosmetic changes. + + An example of how to use `png.load`. +*/ + import "core:compress" import "core:image" import "core:image/png" diff --git a/core/image/png/helpers.odin b/core/image/png/helpers.odin index 3a811f5c9..b28e4aead 100644 --- a/core/image/png/helpers.odin +++ b/core/image/png/helpers.odin @@ -1,5 +1,16 @@ package png +/* + Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. + Made available under Odin's BSD-2 license. + + List of contributors: + Jeroen van Rijn: Initial implementation. + Ginger Bill: Cosmetic changes. + + These are a few useful utility functions to work with PNG images. +*/ + import "core:image" import "core:compress/zlib" import coretime "core:time" @@ -8,10 +19,6 @@ import "core:bytes" import "core:mem" /* - These are a few useful utility functions to work with PNG images. -*/ - -/* Cleanup of image-specific data. There are other helpers for cleanup of PNG-specific data. Those are named *_destroy, where * is the name of the helper. diff --git a/core/image/png/png.odin b/core/image/png/png.odin index 18295793d..b4f25201f 100644 --- a/core/image/png/png.odin +++ b/core/image/png/png.odin @@ -1,5 +1,14 @@ package png +/* + Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. + Made available under Odin's BSD-2 license. + + List of contributors: + Jeroen van Rijn: Initial implementation. + Ginger Bill: Cosmetic changes. +*/ + import "core:compress" import "core:compress/zlib" import "core:image" |