@@ -50,15 +50,18 @@ public static BmpMetadata FromFormatConnectingMetadata(FormatConnectingMetadata
5050 <= 8 => new BmpMetadata { BitsPerPixel = BmpBitsPerPixel . Pixel8 } ,
5151 <= 16 => new BmpMetadata
5252 {
53- BitsPerPixel = BmpBitsPerPixel . Pixel16 , InfoHeaderType = BmpInfoHeaderType . WinVersion3
53+ BitsPerPixel = BmpBitsPerPixel . Pixel16 ,
54+ InfoHeaderType = BmpInfoHeaderType . WinVersion3
5455 } ,
5556 <= 24 => new BmpMetadata
5657 {
57- BitsPerPixel = BmpBitsPerPixel . Pixel24 , InfoHeaderType = BmpInfoHeaderType . WinVersion4
58+ BitsPerPixel = BmpBitsPerPixel . Pixel24 ,
59+ InfoHeaderType = BmpInfoHeaderType . WinVersion4
5860 } ,
5961 _ => new BmpMetadata
6062 {
61- BitsPerPixel = BmpBitsPerPixel . Pixel32 , InfoHeaderType = BmpInfoHeaderType . WinVersion5
63+ BitsPerPixel = BmpBitsPerPixel . Pixel32 ,
64+ InfoHeaderType = BmpInfoHeaderType . WinVersion5
6265 }
6366 } ;
6467 }
@@ -68,7 +71,7 @@ public static BmpMetadata FromFormatConnectingFrameMetadata(FormatConnectingFram
6871 => new ( ) ;
6972
7073 /// <inheritdoc/>
71- public FormatConnectingMetadata ToFormatConnectingMetadata ( )
74+ public PixelTypeInfo GetPixelTypeInfo ( )
7275 {
7376 int bpp = ( int ) this . BitsPerPixel ;
7477
@@ -122,17 +125,21 @@ BmpInfoHeaderType.WinVersion5 or
122125 break ;
123126 }
124127
125- return new ( )
128+ return new PixelTypeInfo ( bpp )
126129 {
127- PixelTypeInfo = new PixelTypeInfo ( bpp )
128- {
129- AlphaRepresentation = alpha ,
130- ComponentInfo = info ,
131- ColorType = color
132- }
130+ AlphaRepresentation = alpha ,
131+ ComponentInfo = info ,
132+ ColorType = color
133133 } ;
134134 }
135135
136+ /// <inheritdoc/>
137+ public FormatConnectingMetadata ToFormatConnectingMetadata ( )
138+ => new ( )
139+ {
140+ PixelTypeInfo = this . GetPixelTypeInfo ( )
141+ } ;
142+
136143 /// <inheritdoc/>
137144 public FormatConnectingFrameMetadata ToFormatConnectingFrameMetadata ( )
138145 => new ( ) ;
0 commit comments