ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 UserData and UserDataVect example

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
lzehnder Posted - Nov 16 2012 : 02:45:38
Hello,

with the UserDataVect delphi example it's not possible to save a Tif file. I have Zstream format error.

I have made this modification for test with Tiff File, the Annotation is Save and Load but not the ObjUserData:

// Open
procedure TMainForm.Button1Click(Sender: TObject);
var
filename:string;
begin
if OpenDialog1.Execute then
begin
filename:=OpenDialog1.FileName;
if IsKnownFormat(filename) then
begin
ImageEnVect1.IO.LoadFromFile(filename);
ImageEnvect1.Fit;
// load annotations
ImageEnVect1.RemoveAllObjects;
ImageEnVect1.IO.Params.ImagingAnnot.CopyToTImageEnVect(ImageEnVect1);
end
else
ImageEnVect1.LoadFromFileAll(filename);
end;
end;

// Save
procedure TMainForm.Button2Click(Sender: TObject);
begin
if SaveDialog1.Execute then
begin
ImageEnVect1.IO.Params.ImagingAnnot.CopyFromTImageEnVect(ImageEnVect1);
ImageEnVect1.IO.SaveToFile(SaveDialog1.FileName);
ImageEnVect1.SaveObjectsToTIFF(SaveDialog1.FileName);
end;
end;

Thank you
2   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Nov 22 2012 : 00:30:53
Wang Annotations (ImagingAnnot) support a subset of TImageEnVect properties. ObjUserData (and many others) is not supported by Want Annotations.
lzehnder Posted - Nov 19 2012 : 06:35:19

For Tiff image :

Load :
ImageEnVect1.IO.LoadFromFile(filename);
ImageEnvect1.Fit;
// load annotations
ImageEnVect1.RemoveAllObjects;
ImageEnVect1.LoadObjectsFromTIFF(filename);

Save :
ImageEnVect1.IO.SaveToFile(SaveDialog1.FileName);
ImageEnVect1.SaveObjectsToTIFF(SaveDialog1.FileName);