png: Move metadata.

This commit is contained in:
Jeroen van Rijn
2021-10-06 22:43:33 +02:00
parent 263d63aa56
commit c4b4a841d6
5 changed files with 218 additions and 222 deletions
+1 -3
View File
@@ -1504,10 +1504,8 @@ run_png_suite :: proc(t: ^testing.T, suite: []PNG_Test) -> (subtotal: int) {
passed &= test.hash == hash
if .return_metadata in test.options {
v: ^png.Info
if img.metadata_ptr != nil && img.metadata_type == png.Info {
v = (^png.Info)(img.metadata_ptr)
if v, ok := img.metadata.(^image.PNG_Info); ok {
for c in v.chunks {
#partial switch(c.header.type) {
case .gAMA: