Changeset 14 for trunk/ColorFormats/UColorGray4.pas
- Timestamp:
- Sep 22, 2014, 5:40:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ColorFormats/UColorGray4.pas
r10 r14 12 12 13 13 TGColorFormatGray4 = class(TGColorFormat) 14 function GetPixelSize: Integer; override; 15 function GetBitDepth: Integer; override; 16 function GetName: string; override; 17 function GetChannelBitPos(Channel: TGColorChannel): Integer; override; 18 function GetChannelBitWidth(Channel: TGColorChannel): Integer; override; 14 constructor Create; override; 19 15 end; 20 16 … … 23 19 { TGColorFormatGray4 } 24 20 25 function TGColorFormatGray4.GetPixelSize: Integer; 21 22 23 constructor TGColorFormatGray4.Create; 26 24 begin 27 Result := 4; 25 inherited Create; 26 inherited; 27 Name := 'Gray4'; 28 BitDepth := 4; 29 Channels[ccGray].Position := 0; 30 Channels[ccGray].BitWidth := 4; 28 31 end; 29 30 function TGColorFormatGray4.GetBitDepth: Integer;31 begin32 Result := 4;33 end;34 35 function TGColorFormatGray4.GetName: string;36 begin37 Result := 'Gray4';38 end;39 40 function TGColorFormatGray4.GetChannelBitPos(Channel: TGColorChannel): Integer;41 begin42 case Channel of43 ccGray: Result := 0;44 else Result := 0;45 end;46 end;47 48 function TGColorFormatGray4.GetChannelBitWidth(Channel: TGColorChannel49 ): Integer;50 begin51 if Channel = ccGray then52 Result := 4 else Result := 0;53 end;54 55 32 56 33 end.
Note:
See TracChangeset
for help on using the changeset viewer.