|
@@ -137,7 +137,7 @@ type
|
|
public
|
|
public
|
|
IFDStart: SizeUInt; // tiff position
|
|
IFDStart: SizeUInt; // tiff position
|
|
IFDNext: SizeUInt; // tiff position
|
|
IFDNext: SizeUInt; // tiff position
|
|
- Artist: String;
|
|
|
|
|
|
+ Artist: AnsiString;
|
|
BitsPerSample: SizeUInt; // tiff position of entry
|
|
BitsPerSample: SizeUInt; // tiff position of entry
|
|
BitsPerSampleArray: array of Word;
|
|
BitsPerSampleArray: array of Word;
|
|
CellLength: DWord;
|
|
CellLength: DWord;
|
|
@@ -145,30 +145,30 @@ type
|
|
ColorMap: SizeUInt;// tiff position of entry
|
|
ColorMap: SizeUInt;// tiff position of entry
|
|
Compression: DWord;
|
|
Compression: DWord;
|
|
Predictor: Word;
|
|
Predictor: Word;
|
|
- Copyright: string;
|
|
|
|
- DateAndTime: string;
|
|
|
|
- DocumentName: string;
|
|
|
|
|
|
+ Copyright: AnsiString;
|
|
|
|
+ DateAndTime: AnsiString;
|
|
|
|
+ DocumentName: AnsiString;
|
|
ExtraSamples: SizeUInt;// tiff position of entry
|
|
ExtraSamples: SizeUInt;// tiff position of entry
|
|
FillOrder: DWord;
|
|
FillOrder: DWord;
|
|
- HostComputer: string;
|
|
|
|
- ImageDescription: string;
|
|
|
|
|
|
+ HostComputer: AnsiString;
|
|
|
|
+ ImageDescription: AnsiString;
|
|
ImageHeight: DWord;
|
|
ImageHeight: DWord;
|
|
ImageIsMask: Boolean;
|
|
ImageIsMask: Boolean;
|
|
ImageIsPage: Boolean;
|
|
ImageIsPage: Boolean;
|
|
ImageIsThumbNail: Boolean;
|
|
ImageIsThumbNail: Boolean;
|
|
ImageWidth: DWord;
|
|
ImageWidth: DWord;
|
|
- Make_ScannerManufacturer: string;
|
|
|
|
- Model_Scanner: string;
|
|
|
|
|
|
+ Make_ScannerManufacturer: AnsiString;
|
|
|
|
+ Model_Scanner: AnsiString;
|
|
Orientation: DWord;
|
|
Orientation: DWord;
|
|
PageNumber: word; // the page number starting at 0, the total number of pages is PageCount
|
|
PageNumber: word; // the page number starting at 0, the total number of pages is PageCount
|
|
PageCount: word; // see PageNumber
|
|
PageCount: word; // see PageNumber
|
|
- PageName: string;
|
|
|
|
|
|
+ PageName: AnsiString;
|
|
PhotoMetricInterpretation: DWord;
|
|
PhotoMetricInterpretation: DWord;
|
|
PlanarConfiguration: DWord;
|
|
PlanarConfiguration: DWord;
|
|
ResolutionUnit: DWord;
|
|
ResolutionUnit: DWord;
|
|
RowsPerStrip: DWord;
|
|
RowsPerStrip: DWord;
|
|
SamplesPerPixel: DWord;
|
|
SamplesPerPixel: DWord;
|
|
- Software: string;
|
|
|
|
|
|
+ Software: AnsiString;
|
|
StripByteCounts: SizeUInt;// tiff position of entry
|
|
StripByteCounts: SizeUInt;// tiff position of entry
|
|
StripOffsets: SizeUInt; // tiff position of entry
|
|
StripOffsets: SizeUInt; // tiff position of entry
|
|
TileWidth: DWord;
|
|
TileWidth: DWord;
|
|
@@ -195,24 +195,24 @@ type
|
|
destructor Destroy; override;
|
|
destructor Destroy; override;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TiffRationalToStr(const r: TTiffRational): string;
|
|
|
|
-function StrToTiffRationalDef(const s: string; const Def: TTiffRational): TTiffRational;
|
|
|
|
|
|
+function TiffRationalToStr(const r: TTiffRational): AnsiString;
|
|
|
|
+function StrToTiffRationalDef(const s: AnsiString; const Def: TTiffRational): TTiffRational;
|
|
procedure ClearTiffExtras(Img: TFPCustomImage);
|
|
procedure ClearTiffExtras(Img: TFPCustomImage);
|
|
procedure CopyTiffExtras(SrcImg, DestImg: TFPCustomImage);
|
|
procedure CopyTiffExtras(SrcImg, DestImg: TFPCustomImage);
|
|
-procedure WriteTiffExtras(Msg: string; Img: TFPCustomImage);
|
|
|
|
-function TiffCompressionName(c: Word): string;
|
|
|
|
|
|
+procedure WriteTiffExtras(Msg: AnsiString; Img: TFPCustomImage);
|
|
|
|
+function TiffCompressionName(c: Word): AnsiString;
|
|
|
|
|
|
function TifResolutionUnitToResolutionUnit(ATifResolutionUnit: DWord): TResolutionUnit;
|
|
function TifResolutionUnitToResolutionUnit(ATifResolutionUnit: DWord): TResolutionUnit;
|
|
function ResolutionUnitToTifResolutionUnit(AResolutionUnit: TResolutionUnit): DWord;
|
|
function ResolutionUnitToTifResolutionUnit(AResolutionUnit: TResolutionUnit): DWord;
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
-function TiffRationalToStr(const r: TTiffRational): string;
|
|
|
|
|
|
+function TiffRationalToStr(const r: TTiffRational): AnsiString;
|
|
begin
|
|
begin
|
|
Result:=IntToStr(r.Numerator)+'/'+IntToStr(r.Denominator);
|
|
Result:=IntToStr(r.Numerator)+'/'+IntToStr(r.Denominator);
|
|
end;
|
|
end;
|
|
|
|
|
|
-function StrToTiffRationalDef(const s: string; const Def: TTiffRational
|
|
|
|
|
|
+function StrToTiffRationalDef(const s: AnsiString; const Def: TTiffRational
|
|
): TTiffRational;
|
|
): TTiffRational;
|
|
var
|
|
var
|
|
p: LongInt;
|
|
p: LongInt;
|
|
@@ -243,7 +243,7 @@ begin
|
|
DestImg.Extra[SrcImg.ExtraKey[i]]:=SrcImg.ExtraValue[i];
|
|
DestImg.Extra[SrcImg.ExtraKey[i]]:=SrcImg.ExtraValue[i];
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure WriteTiffExtras(Msg: string; Img: TFPCustomImage);
|
|
|
|
|
|
+procedure WriteTiffExtras(Msg: AnsiString; Img: TFPCustomImage);
|
|
var
|
|
var
|
|
i: Integer;
|
|
i: Integer;
|
|
begin
|
|
begin
|
|
@@ -253,7 +253,7 @@ begin
|
|
writeln(' ',i,' ',Img.ExtraKey[i],'=',Img.ExtraValue[i]);
|
|
writeln(' ',i,' ',Img.ExtraKey[i],'=',Img.ExtraValue[i]);
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TiffCompressionName(c: Word): string;
|
|
|
|
|
|
+function TiffCompressionName(c: Word): AnsiString;
|
|
begin
|
|
begin
|
|
case c of
|
|
case c of
|
|
1: Result:='no compression';
|
|
1: Result:='no compression';
|