correct newly found vets

This commit is contained in:
Laytan Laats
2024-04-03 00:52:58 +02:00
parent 21fcf7c874
commit 3a0df80066
18 changed files with 56 additions and 62 deletions
+6 -6
View File
@@ -199,8 +199,8 @@ save_to_buffer :: proc(img: ^Image, custom_info: Info = {}, allocator := context
for x in 0 ..< img.width {
i := y * img.width + x
for c in 0 ..< img.channels {
i := i * img.channels + c
fmt.sbprintf(&data, "%i ", pixels[i])
j := i * img.channels + c
fmt.sbprintf(&data, "%i ", pixels[j])
}
fmt.sbprint(&data, "\n")
}
@@ -213,8 +213,8 @@ save_to_buffer :: proc(img: ^Image, custom_info: Info = {}, allocator := context
for x in 0 ..< img.width {
i := y * img.width + x
for c in 0 ..< img.channels {
i := i * img.channels + c
fmt.sbprintf(&data, "%i ", pixels[i])
j := i * img.channels + c
fmt.sbprintf(&data, "%i ", pixels[j])
}
fmt.sbprint(&data, "\n")
}
@@ -283,7 +283,7 @@ _parse_header_pnm :: proc(data: []byte) -> (header: Header, length: int, err: Er
current_field := 0
current_value := header_fields[0]
parse_loop: for d, i in data[SIG_LENGTH:] {
parse_loop: for d in data[SIG_LENGTH:] {
length += 1
// handle comments
@@ -728,4 +728,4 @@ _register :: proc() {
_ = destroy(img)
}
image.register(.NetPBM, loader, destroyer)
}
}