mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
[PNG] Remove debug printf.
This commit is contained in:
@@ -25,9 +25,6 @@ import "core:io"
|
|||||||
import "core:mem"
|
import "core:mem"
|
||||||
import "core:intrinsics"
|
import "core:intrinsics"
|
||||||
|
|
||||||
import "core:fmt"
|
|
||||||
|
|
||||||
|
|
||||||
// Limit chunk sizes.
|
// Limit chunk sizes.
|
||||||
// By default: IDAT = 8k x 8k x 16-bits + 8k filter bytes.
|
// By default: IDAT = 8k x 8k x 16-bits + 8k filter bytes.
|
||||||
// The total number of pixels defaults to 64 Megapixel and can be tuned in image/common.odin.
|
// The total number of pixels defaults to 64 Megapixel and can be tuned in image/common.odin.
|
||||||
@@ -600,16 +597,13 @@ load_from_context :: proc(ctx: ^$C, options := Options{}, allocator := context.a
|
|||||||
|
|
||||||
if .Paletted in header.color_type {
|
if .Paletted in header.color_type {
|
||||||
if len(c.data) > 256 {
|
if len(c.data) > 256 {
|
||||||
fmt.printf("[PLTE] tRNS length: %v\n", len(c.data))
|
|
||||||
return img, .TNRS_Invalid_Length
|
return img, .TNRS_Invalid_Length
|
||||||
}
|
}
|
||||||
} else if .Color in header.color_type {
|
} else if .Color in header.color_type {
|
||||||
if len(c.data) != 6 {
|
if len(c.data) != 6 {
|
||||||
fmt.printf("[COLOR] tRNS length: %v\n", len(c.data))
|
|
||||||
return img, .TNRS_Invalid_Length
|
return img, .TNRS_Invalid_Length
|
||||||
}
|
}
|
||||||
} else if len(c.data) != 2 {
|
} else if len(c.data) != 2 {
|
||||||
fmt.printf("[GRAY] tRNS length: %v\n", len(c.data))
|
|
||||||
return img, .TNRS_Invalid_Length
|
return img, .TNRS_Invalid_Length
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user