Fix not using LSBBitReader

This commit is contained in:
Simon Kammermeier 2022-08-29 15:50:17 +02:00
parent 190fe87ee9
commit b856ce07af
2 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ final class WebPImageReader extends ImageReaderBase {
Rectangle bounds = new Rectangle(x, y, w, h);
// TODO: Expose duration/flags in image metadata
int duration = (int) imageInput.readBits(24);
int duration = (int) lsbBitReader.readBits(24);
int flags = imageInput.readUnsignedByte(); // 6 bit reserved + blend mode + disposal mode
frames.add(new AnimationFrame(chunkLength, chunkStart, bounds, duration, flags));

View File

@ -155,7 +155,7 @@ public final class VP8LDecoder {
System.err.println("transformType: COLOR_INDEXING_TRANSFORM");
// 8 bit value for color table size
int colorTableSize = imageInput.readUnsignedByte() + 1; // 1-256
int colorTableSize = ((int) lsbBitReader.readBits(8)) + 1; // 1-256
System.err.println("colorTableSize: " + colorTableSize);
// If the index is equal or larger than color_table_size,