Record Class JpegHeader
java.lang.Object
java.lang.Record
cloud.opencode.base.image.codec.jpeg.JpegHeader
- Record Components:
width- image width in pixels (positive) | 图像宽度(像素,正整数)height- image height in pixels (positive) | 图像高度(像素,正整数)subsampling- chroma subsampling mode | 色度下采样模式
JPEG header information returned by
JpegCodec.readHeader(byte[]).
JpegCodec.readHeader(byte[]) 返回的 JPEG 头信息。
Carries the dimensions and chroma subsampling mode encoded in the JPEG stream, without performing any pixel decode.
携带 JPEG 流中编码的尺寸与色度下采样模式,不执行任何像素解码。
Security | 安全性:
- Thread-safe: Yes - record is immutable. - 线程安全: 是 - record 不可变。
- Since:
- JDK 25, opencode-base-image-codec V1.0.4
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJpegHeader(int width, int height, JpegSubsampling subsampling) Creates an instance of aJpegHeaderrecord class. -
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.Returns the value of thesubsamplingrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
JpegHeader
Creates an instance of aJpegHeaderrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentsubsampling- the value for thesubsamplingrecord component
-
-
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
-
subsampling
Returns the value of thesubsamplingrecord component.- Returns:
- the value of the
subsamplingrecord component
-