|
DISPLAY.CPP Code |
//--------------------------------------------------------------------------- #pragma hdrstop #include "graphics.hpp" #include "tiffclass.h" #include "tifbitmap.h" //--------------------------------------------------------------------------- #pragma package(smart_init) //Here's your basic, simple file. I wrote a more complicated one, doing my //entire descendant from TGraphic,
but since I want to use and manipulate my //graphic as a Bitmap in any case, I changed and created
this TBitmap descendant //All we need to add is the TIFFFile,
and use it to load and save the Bitmap. //Note again that I don't modify the clipboard stuff,
because I use CF_BITMAP //on the clipboard. //--------------------------------------------------------------------------- __fastcall eneTIFFBitmap::eneTIFFBitmap(void)
: TBitmap() { //Unless
someone is trying to debug the file, these warnings can get
//excessive. We'll only see
errors. tifFile.ClearWarningHandler(); } //--------------------------------------------------------------------------- void __fastcall eneTIFFBitmap::LoadFromStream(Classes::TStream*
Stream) { tifFile.Load(Stream,this); } //--------------------------------------------------------------------------- void __fastcall eneTIFFBitmap::SaveToStream(Classes::TStream*
Stream) { tifFile.SaveStream(Stream,this); } //--------------------------------------------------------------------------- |
Links to project files: Project file and modified tiffio.h/tiffiop.h files for building libtiff with BCB6 Project group, project files and all support for the eneTIFFBitmap object |
|