Class TTiffFile (unit Tifffile) |
Inherits from
TComponent
constructor create(owner:TComponent);
- Protected declarations
----------------------------- admin crap -----------------------------
function readbitmap:HBitMap;
Public declarations
destructor destroy;
function AddimageMap(i:word):PTiffImageMap;
function checkheader(f:tfilestream):boolean;
else tag will be deleted / ignored
function decoderow(s,t:tbitstream; spacer:boolean; w:word):word;
adds rl bits of white/black to t
function findbytes(i:word; f:tfilestream; p:PTiffImageMap):longint;
function findoffset(i:word; f:tfilestream; p:PTiffImageMap):longint;
function getcurrentimagemap:PTiffImageMap;
function getImageType:et_imagetype;
function getinvertcolour:boolean;
function getlength:word;
function getResUnits:string;
function getwidth:word;
function getXres:real;
function getYres:real;
function longintfrom4byte(b:byte4):longint;
problem: this should really return a 32bit cardinal unsigned
integer.
procedure parseIFD(f:tfilestream; var os:longint; ifdkey:word);
function parseTiff:word;
function read2byte(f:tfilestream):byte2;
-------------------- tiff parsing procedures --------------------------} { 1.
function read4byte(f:tfilestream):byte4;
procedure readcompressedmono(f:tfilestream; var p:PTiffImageMap;
mem:pointer; memsize:longint);
----------------------- read tiff file routines -----------------------
procedure readstripinfo(i:word; f:tfilestream; q:PTiffImageMap);
procedure readtiff(p:PTiffImageMap; mem:pointer; memsize:longint);
function readtifftag(f:tfilestream; os:longint; i:word):TTiffTag;
procedure readuncompressedmono(f:tfilestream; var p:PTiffImageMap;
mem:pointer; memsize:longint);
ok.
procedure resetdata;
--------------- internal datastructure maintainance -------------------
procedure SetCurrentImage(v:word);
procedure setFilename(v:string);
------------------------- property servers ----------------------------
function wordfrom2byte(b:byte2):word;
function wordfrom4byte(b:byte4):word;
property CurrentImage : word
property Filename : string
Published declarations
property ImageCount : word
property ImageType : et_imagetype
property InvertColour : boolean
property Length : word
property Width : word
FBigEndian : boolean;
FCurrImage : word;
FFilename : string;
FImageCount : word;
Private declarations
FImageMaps : PTiffImageMap;
constructor create(owner:TComponent);
Protected declarations
----------------------------- admin crap -----------------------------
function readbitmap:HBitMap;
Public declarations
destructor destroy;
function AddimageMap(i:word):PTiffImageMap;
function checkheader(f:tfilestream):boolean;
else tag will be deleted / ignored
function decoderow(s,t:tbitstream; spacer:boolean; w:word):word;
adds rl bits of white/black to t
function findbytes(i:word; f:tfilestream; p:PTiffImageMap):longint;
function findoffset(i:word; f:tfilestream; p:PTiffImageMap):longint;
function getcurrentimagemap:PTiffImageMap;
function getImageType:et_imagetype;
function getinvertcolour:boolean;
function getlength:word;
function getResUnits:string;
function getwidth:word;
function getXres:real;
function getYres:real;
function longintfrom4byte(b:byte4):longint;
problem: this should really return a 32bit cardinal unsigned
integer. This is not possible in 16bit. Raise an error in this case.
This should only occur when really big files are used. And it doesn't
bother me that I can only read files as big as 2Gb!
procedure parseIFD(f:tfilestream; var os:longint; ifdkey:word);
function parseTiff:word;
function read2byte(f:tfilestream):byte2;
-------------------- tiff parsing procedures --------------------------} { 1. low level readers / converters
function read4byte(f:tfilestream):byte4;
procedure readcompressedmono(f:tfilestream; var p:PTiffImageMap;
mem:pointer; memsize:longint);
----------------------- read tiff file routines -----------------------
procedure readstripinfo(i:word; f:tfilestream; q:PTiffImageMap);
procedure readtiff(p:PTiffImageMap; mem:pointer; memsize:longint);
function readtifftag(f:tfilestream; os:longint; i:word):TTiffTag;
procedure readuncompressedmono(f:tfilestream; var p:PTiffImageMap;
mem:pointer; memsize:longint);
ok. now we have the compressed bits in b. we have to decompress them
into mem. in the ccitt specs, rows are padded to end on a byte. And rows have an
error check built in, so these are administered here
procedure resetdata;
--------------- internal datastructure maintainance -------------------
procedure SetCurrentImage(v:word);
procedure setFilename(v:string);
------------------------- property servers ----------------------------
function wordfrom2byte(b:byte2):word;
function wordfrom4byte(b:byte4):word;
property CurrentImage : word
property Filename : string
Published declarations
property ImageCount : word
property ImageType : et_imagetype
property InvertColour : boolean
property Length : word
property Width : word
FBigEndian : boolean;
FCurrImage : word;
FFilename : string;
FImageCount : word;
Private declarations
FImageMaps : PTiffImageMap;