mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Add "#png: unsupported CgBI extension" status
This commit is contained in:
1 parent
a55e0a02a2
commit
03fd43cfcc
3 files changed
+13
No files matched your search
@@ -19,6 +19,7 @@ pub status "#bad filter"
|
||||
pub status "#bad header"
|
||||
pub status "#bad text chunk (not Latin-1)"
|
||||
pub status "#missing palette"
|
||||
pub status "#unsupported CgBI extension"
|
||||
pub status "#unsupported PNG compression method"
|
||||
pub status "#unsupported PNG file"
|
||||
|
||||
|
||||
@@ -219,6 +219,12 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
|
||||
}
|
||||
magic = args.src.read_u64le?()
|
||||
if magic <> '\x00\x00\x00\x0DIHDR'le {
|
||||
if magic == '\x00\x00\x00\x04CgBI'le {
|
||||
// TODO: add support for Apple's unofficial CgBI extension to
|
||||
// PNG, once there exists good documentation for it. See
|
||||
// https://github.com/w3c/PNG-spec/issues/45
|
||||
return "#unsupported CgBI extension"
|
||||
}
|
||||
return "#bad header"
|
||||
}
|
||||
this.chunk_type_array[0] = 'I'
|
||||
|
||||
Reference in new issue
Block a user