mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Add std/tga package
This is just a placeholder decoder implementation (and all of the required plumbing) that produces a 1x1 reddish-purple image. Follow-up commits will add flesh to the metaphorical bones. TGA has no magic identifier, so MIME sniffers have to use heuristics. The test/data/cbor-rfc-7049-examples.cbor file (which is CBOR binary data, not a TGA image) is mistakenly sniffed as TGA. The /usr/bin/file program makes the same classification (a false positive). $ file test/data/cbor-rfc-7049-examples.cbor test/data/cbor-rfc-7049-examples.cbor: Targa image data - Map 59395 x 26 x 15 +6169 +6500 - 2-bit alpha - interleave "@\033" Some test/3pdata/tgasuite/*.tga test files, which are invalid TGA images, are also false positives for now. Updates #67
This commit is contained in:
1 parent
db0a5a4f3a
commit
4c09c77bb9
10 files changed
+1280
No files matched your search
@@ -85,6 +85,11 @@ DecodeImageCallbacks::SelectDecoder(uint32_t fourcc,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__TGA)
|
||||
case WUFFS_BASE__FOURCC__TGA:
|
||||
return wuffs_tga__decoder::alloc_as__wuffs_base__image_decoder();
|
||||
#endif
|
||||
|
||||
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__WBMP)
|
||||
case WUFFS_BASE__FOURCC__WBMP:
|
||||
return wuffs_wbmp__decoder::alloc_as__wuffs_base__image_decoder();
|
||||
|
||||
@@ -91,6 +91,7 @@ class DecodeImageCallbacks {
|
||||
// - WUFFS_BASE__FOURCC__GIF
|
||||
// - WUFFS_BASE__FOURCC__NIE
|
||||
// - WUFFS_BASE__FOURCC__PNG
|
||||
// - WUFFS_BASE__FOURCC__TGA
|
||||
// - WUFFS_BASE__FOURCC__WBMP
|
||||
virtual wuffs_base__image_decoder::unique_ptr //
|
||||
SelectDecoder(uint32_t fourcc,
|
||||
|
||||
Reference in new issue
Block a user