+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Rsv|I|L|E|X|A|R| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R|A|X|E|L|I|Rsv| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Hi,I feel maybe there is an issue in bits order below.+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Rsv|I|L|E|X|A|R| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+in libwebp code, when try to get the animation bit, the code below issrc/webp/mux_types.h: ANIMATION_FLAG = 0x00000002,According to the definition in code, perhaps the bit order for flags should be reversed as below?
The first 28 bits of the bitstream specify the width and height of the image. Width and height are decoded as 14-bit integers as follows:
int image_width = ReadBits(14) + 1;
int image_height = ReadBits(14) + 1;
The 14-bit dynamics for image size limit the maximum size of a WebP lossless image to 16384✕16384 pixels.
The alpha_is_used bit is a hint only, and should not impact decoding. It should be set to 0 when all alpha values are 255 in the picture, and 1 otherwise.
int alpha_is_used = ReadBits(1);
The version_number is a 3 bit code that must be set to 0. Any other value should be treated as an error. [AMENDED]
int version_number = ReadBits(3);
--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss+unsubscribe@webmproject.org.
To post to this group, send email to webp-d...@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/webp-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.
Hi James,Thank you for reminding me.Maybe it make me confused, that this bit numbering definition does not keep consistent with other field.For example, In the definitions for Chunk Size/Canvas Width Minus One, etc, I feel, these integer with LSB written first.
And in lossless specification, the definitions for image width/height/alpha bit of image, also start at 0 for LSB 0 as below.Maybe the definitions for integer/string are of LSB first. all the lefts are of MSB first.
Thank you,SolanThe first 28 bits of the bitstream specify the width and height of the image. Width and height are decoded as 14-bit integers as follows:
int image_width = ReadBits(14) + 1;
int image_height = ReadBits(14) + 1;The 14-bit dynamics for image size limit the maximum size of a WebP lossless image to 16384✕16384 pixels.