public class WebpRiffHandler extends Object implements RiffHandler
RiffHandler
specialising in WebP support.
Extracts data from chunk types:
"VP8X"
: width, height, is animation, has alpha"EXIF"
: full Exif data"ICCP"
: full ICC profile"XMP "
: full XMP dataConstructor and Description |
---|
WebpRiffHandler(Metadata metadata) |
Modifier and Type | Method and Description |
---|---|
void |
processChunk(String fourCC,
byte[] payload)
Perform whatever processing is necessary for the type of chunk with its
payload.
|
boolean |
shouldAcceptChunk(String fourCC)
Gets whether this handler is interested in the specific chunk type.
|
boolean |
shouldAcceptRiffIdentifier(String identifier)
Gets whether the specified RIFF identifier is of interest to this handler.
|
public WebpRiffHandler(Metadata metadata)
public boolean shouldAcceptRiffIdentifier(String identifier)
RiffHandler
false
causes processing to stop after reading only
the first twelve bytes of data.shouldAcceptRiffIdentifier
in interface RiffHandler
identifier
- The four character code identifying the type of RIFF datapublic boolean shouldAcceptChunk(String fourCC)
RiffHandler
true
if the data should be copied into an array and passed
to RiffHandler.processChunk(String, byte[])
, or false
to avoid
the copy and skip to the next chunk in the file, if any.shouldAcceptChunk
in interface RiffHandler
fourCC
- the four character code of this chunkRiffHandler.processChunk(String, byte[])
should be called, otherwise falsepublic void processChunk(String fourCC, byte[] payload)
RiffHandler
RiffHandler.shouldAcceptChunk(String)
with the same fourCC
returned true
.processChunk
in interface RiffHandler
fourCC
- the four character code of the chunkpayload
- they payload of the chunk as a byte arrayCopyright © 2019. All rights reserved.