Class WebPChunkVp8l
- java.lang.Object
-
- org.apache.commons.imaging.common.BinaryFileParser
-
- org.apache.commons.imaging.formats.webp.chunks.AbstractWebPChunk
-
- org.apache.commons.imaging.formats.webp.chunks.WebPChunkVp8l
-
public final class WebPChunkVp8l extends AbstractWebPChunk
VP8L (lossless 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('VP8L') | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : VP8L data : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Since:
- 1.0.0-alpha4
- See Also:
- Simple File Format (Lossless)
-
-
Field Summary
Fields Modifier and Type Field Description private booleanhasAlphaprivate intimageHeightprivate intimageWidthprivate intversionNumber-
Fields inherited from class org.apache.commons.imaging.formats.webp.chunks.AbstractWebPChunk
bytes
-
-
Constructor Summary
Constructors Constructor Description WebPChunkVp8l(int type, int size, byte[] bytes)Create a VP8L chunk.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(java.io.PrintWriter pw, int offset)Print the chunk to the given stream.intgetImageHeight()intgetImageWidth()intgetVersionNumber()booleanhasAlpha()-
Methods inherited from class org.apache.commons.imaging.formats.webp.chunks.AbstractWebPChunk
getBytes, getChunkSize, getPayloadSize, getType, getTypeDescription
-
Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
-
-
-
Constructor Detail
-
WebPChunkVp8l
public WebPChunkVp8l(int type, int size, byte[] bytes) throws ImagingExceptionCreate a VP8L 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 Detail
-
dump
public void dump(java.io.PrintWriter pw, int offset) throws ImagingException, java.io.IOExceptionDescription 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.java.io.IOException- if it fails to write to the given stream.
-
getImageHeight
public int getImageHeight()
- Returns:
- the image height.
-
getImageWidth
public int getImageWidth()
- Returns:
- the image width.
-
getVersionNumber
public int getVersionNumber()
- Returns:
- the version number.
-
hasAlpha
public boolean hasAlpha()
- Returns:
- whether the image has an alpha channel or not.
-
-