Class WebPChunkVp8
java.lang.Object
org.apache.commons.imaging.common.BinaryFileParser
org.apache.commons.imaging.formats.webp.chunks.AbstractWebPChunk
org.apache.commons.imaging.formats.webp.chunks.WebPChunkVp8
VP8 (bitstream) chunk.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ChunkHeader('VP8 ') |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
: VP8 data :
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Since:
- 1.0.0-alpha4
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final intprivate final intprivate final intFields inherited from class AbstractWebPChunk
bytes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(PrintWriter pw, int offset) Print the chunk to the given stream.intintintintintgetWidth()Methods inherited from class AbstractWebPChunk
getBytes, getChunkSize, getPayloadSize, getType, getTypeDescriptionMethods inherited from class BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
Field Details
-
versionNumber
private final int versionNumber -
width
private final int width -
height
private final int height -
horizontalScale
private final int horizontalScale -
verticalScale
private final int verticalScale
-
-
Constructor Details
-
WebPChunkVp8
Create a VP8 chunk.- Parameters:
type- chunk type.size- chunk size.bytes- chunk data.- Throws:
ImagingException- if the chunk data and the size provided do not match.
-
-
Method Details
-
dump
Description copied from class:AbstractWebPChunkPrint the chunk to the given stream.- Overrides:
dumpin classAbstractWebPChunk- Parameters:
pw- a stream to write to.offset- chunk offset.- Throws:
ImagingException- if the image is invalid.IOException- if it fails to write to the given stream.
-
getHeight
public int getHeight()- Returns:
- the height.
-
getHorizontalScale
public int getHorizontalScale()- Returns:
- the horizontal scale.
-
getVersionNumber
public int getVersionNumber()- Returns:
- the version number.
-
getVerticalScale
public int getVerticalScale()- Returns:
- the vertical scale.
-
getWidth
public int getWidth()- Returns:
- the width.
-