Properties · Methods · Demos · Examples
Declaration
TIETIFFHandler = class;
Description
This class allows you to read all TIFF tags, edit/add tags and pages, delete pages, and finally save back the modified TIFF.
TIETIFFHandler is an older class, so you may find it easier to work with
TIEMultiBitmap.
Because it only loads pages as needed, it offers good performance when working very large TIFF files.
Note:
◼TIETIFFHandler does not support the BigTIFF format, as well as some OLD-JPEG tiff files (OLD-JPEG compression is no longer supported by the TIFF standard)
◼You can also use a
TIEMultiBitmap to modify all TIFF images
| Demos\InputOutput\TiffHandler\TiffHandler.dpr |
| Demos\InputOutput\TiffHandler2\TiffHandler2.dpr |
// add a custom tag (65000 with 'Hello World') at page 0
mytif := TIETIFFHandler.Create('input.tif');
mytif.SetValue(0, 65000, ttAscii, 'Hello World!');
mytif.WriteFile('output.tif');
mytif.free;
// delete second page (indexed 1) of a multipage tiff
mytif := TIETIFFHandler.Create('input.tif');
mytif.DeletePage(1);
mytif.WriteFile('output.tif');
mytif.free;
// insert a new page from an external file
mytif := TIETIFFHandler.Create('input.tif');
mytif.InsertPageAsFile('external.jpg', 0);
mytif.WriteFile('output.tif');
mytif.free;
// merge two tiff (even they are multipage files..)
mytif := TIETIFFHandler.Create('input-1.tif');
mytif.InsertTIFFFile('input-2.tif', mytif.PagesCount-1);
mytif.WriteFile('output.tif');
mytif.free;
// read tag 305 ('software')
mytif := TIETIFFHandler.Create('input-1.tif');
software := mytif.GetString(0, mytif.FindTag(0, 305));
mytif.free;
GeneralInput/OutputMeta InformationTag InformationTag ReadingTag WritingTag CopyingPage Handling