diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-04-30 14:34:07 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-04-30 14:34:07 +0200 |
| commit | d6a8216ce48eb9478f307ccf70e5295424bd78ed (patch) | |
| tree | d1c9dffcbc11e5bef0cf5b7acdec14f424d0ea53 /core/image/tga/tga.odin | |
| parent | ae3deea1539588b53f827ebaf6d794afa4b6b454 (diff) | |
[pbm] Normalize some errors, correct .depth
Diffstat (limited to 'core/image/tga/tga.odin')
| -rw-r--r-- | core/image/tga/tga.odin | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/image/tga/tga.odin b/core/image/tga/tga.odin index 3c860cb62..0539706b3 100644 --- a/core/image/tga/tga.odin +++ b/core/image/tga/tga.odin @@ -17,7 +17,6 @@ import "core:bytes" import "core:os" Error :: image.Error -General :: compress.General_Error Image :: image.Image Options :: image.Options @@ -55,7 +54,7 @@ save_to_memory :: proc(output: ^bytes.Buffer, img: ^Image, options := Options{} necessary := pixels * img.channels + size_of(image.TGA_Header) if !resize(&output.buf, necessary) { - return General.Resize_Failed + return .Unable_To_Allocate_Or_Resize } header := image.TGA_Header{ @@ -97,7 +96,7 @@ save_to_file :: proc(output: string, img: ^Image, options := Options{}, allocato save_to_memory(out, img, options) or_return write_ok := os.write_entire_file(output, out.buf[:]) - return nil if write_ok else General.Cannot_Open_File + return nil if write_ok else .Unable_To_Write_File } save :: proc{save_to_memory, save_to_file}
\ No newline at end of file |