Record Class DecodedBmp
java.lang.Object
java.lang.Record
cloud.opencode.base.image.codec.bmp.DecodedBmp
- Record Components:
width- image width in pixels | 图像宽度(像素)height- image height in pixels | 图像高度(像素)rgb- interleaved RGB bytes, length = width*height*3 | 交错的 RGB 字节,长度 = width*height*3
Result of
BmpCodec.decode(byte[]).
BmpCodec.decode(byte[]) 的结果。
The rgb array stores 3 bytes per pixel in row-major order
top-down (top-left to bottom-right, R-G-B per pixel). The decoder
normalises bottom-up BMPs into this top-down representation, so callers
never need to flip rows themselves.
rgb 数组按行优先、自上而下的顺序(左上到右下,每像素 R-G-B)
存储 3 字节。解码器会将自下而上存储的 BMP 翻转为自上而下表示,
调用方无需自行翻转行。
- Since:
- JDK 25, opencode-base-image-codec V1.0.4
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDecodedBmp(int width, int height, byte[] rgb) 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[]rgb()Returns the value of thergbrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
DecodedBmp
public DecodedBmp(int width, int height, byte[] rgb) Canonical constructor with strict argument validation. 带严格参数校验的标准构造器。- Throws:
IllegalArgumentException- ifrgbis null or its length does not match width*height*3 | 当rgb为 null 或长度不等于 width*height*3 时抛出
-
-
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
-
rgb
-