Hi-
I currently have a button on my form in order to save the current loaded image into another directory as a TIFF. The purpose of this is to save "snapshots" of the image so the user can restore later if need be. The problem I am having is Tiff images are working fine when saving but when I have an NEF file loaded, it does not save the image.
My code:
IMGVIEW2 is a TImageEnVect
procedure Tfrm_main.SNAPSHOT2SAVE;
var
PATH1: STRING;
FILE1: STRING;
IMGFILE: STRING;
IMGDIR: string;
ext1: string;
fName: string;
i: integer;
begin
PATH1:= SNAPSHOTDIRECTORY.Text;
FILE1:= (extractfilename(i2.Text));
ext1:= (extractfileext(i2.Text));
IMGFILE:= (PATH1+ '\'+ file1+ '\'+ timeTOSTR(time)+ ' SNAPSHOT '+ FILE1);
IMGDIR:= (PATH1+ '\'+ file1);
imgview2.Cursor := crDefault;
imgview2.Layers[0].Locked := false;
forcedirectories(imgdir);
imgview2.IO.Params.ImagingAnnot.CopyFromTImageEnVect(Imgview2);
//save image
imgview2.IO.SaveToFile(IMGFILE, iotiff);
//save layers from the image
if imgview2.LayersCount > 1 then
begin
imgview2.LayersSaveToFile(IMGFILE + '.lyr', -2);
end;
end;
Also, I am not 100% sure of the difference in these two forms of saving as well which could be part of my problem:
imgview2.IO.SaveToFile(IMGFILE, iotiff);
imgview2.io.savetofiletiff(imgfile);
Ive tried both ways and cannot get it to save the loaded images as tiff.
Any help would be greatly appreciated.