aboutsummaryrefslogtreecommitdiff
path: root/core/image/tga/tga.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2022-04-30 14:34:07 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2022-04-30 14:34:07 +0200
commitd6a8216ce48eb9478f307ccf70e5295424bd78ed (patch)
treed1c9dffcbc11e5bef0cf5b7acdec14f424d0ea53 /core/image/tga/tga.odin
parentae3deea1539588b53f827ebaf6d794afa4b6b454 (diff)
[pbm] Normalize some errors, correct .depth
Diffstat (limited to 'core/image/tga/tga.odin')
-rw-r--r--core/image/tga/tga.odin5
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