Record Class DecodedGif
java.lang.Object
java.lang.Record
cloud.opencode.base.image.codec.gif.DecodedGif
- Record Components:
width- image width in pixels | 图像宽度(像素)height- image height in pixels | 图像高度(像素)rgba- interleaved RGBA bytes, length = width*height*4 | 交错的 RGBA 字节,长度 = width*height*4
Result of
GifCodec.decodeFirstFrame(byte[]).
GifCodec.decodeFirstFrame(byte[]) 的结果。
The rgba array stores 4 bytes per pixel in row-major order
(top-left to bottom-right). Each pixel is R-G-B-A; pixels marked
transparent by the GIF graphic control extension have alpha = 0,
everything else is fully opaque (alpha = 0xFF).
rgba 数组按行优先顺序(左上到右下)存储 4 字节像素,
每像素为 R-G-B-A。GIF 图形控制扩展中标记为透明的像素 alpha = 0,
其余完全不透明(alpha = 0xFF)。
- Since:
- JDK 25, opencode-base-image-codec V1.0.4
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDecodedGif(int width, int height, byte[] rgba) Canonical constructor with strict argument validation. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.byte[]rgba()Returns the value of thergbarecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
DecodedGif
public DecodedGif(int width, int height, byte[] rgba) Canonical constructor with strict argument validation. 带严格参数校验的标准构造器。- Throws:
IllegalArgumentException- ifrgbais null or its length does not match width*height*4 | 当rgba为 null 或长度不等于 width*height*4 时抛出
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
width
-
height
-
rgba
-