mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-17 14:29:48 +02:00
Common APIs for chunks metadata and color profile.
Change-Id: Ie105ce913c0b56e34cc26fd7ec397103354f268a
This commit is contained in:
committed by
Gerrit Code Review
parent
2a3117a1e6
commit
1c04a0d438
@ -73,6 +73,16 @@ WebPChunkId ChunkGetIdFromTag(uint32_t tag) {
|
||||
return WEBP_CHUNK_NIL;
|
||||
}
|
||||
|
||||
uint32_t ChunkGetTagFromFourCC(const char fourcc[4]) {
|
||||
return MKFOURCC(fourcc[0], fourcc[1], fourcc[2], fourcc[3]);
|
||||
}
|
||||
|
||||
CHUNK_INDEX ChunkGetIndexFromFourCC(const char fourcc[4]) {
|
||||
const uint32_t tag = ChunkGetTagFromFourCC(fourcc);
|
||||
const CHUNK_INDEX idx = ChunkGetIndexFromTag(tag);
|
||||
return (idx == IDX_NIL) ? IDX_UNKNOWN : idx;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Chunk search methods.
|
||||
|
||||
|
Reference in New Issue
Block a user