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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Best way to use TImageEnIO in console application?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

982 Posts

Posted - Apr 14 2016 :  05:25:37  Show Profile  Reply
Hello! I need to use TImageEnIO in a windowless console application. What is the most "cheap" (in the sense of resource and memory consumption) to do this? Currently I use this code in the console application:

IEV := TImageEnView.Create(nil);
try
  ThisImageMetadataText := GetAllMetaDataTextFromImage;
  DoSomethingWith(ThisImageMetadataText);  
finally
  IEV.Free;
end;


However, I am not sure if there isn't a "cheaper" class than TImageEnView to use TImageEnIO?

xequte

39053 Posts

Posted - Apr 14 2016 :  15:45:49  Show Profile  Reply
Hi Peter

Well the cheapest way to use a TImageEnIO, is simply to create a TImageEnIO object (TImageEnView is not needed).

IO := TImageEnIO.Create(nil);
try
  IO.ParamsFromFile( sFilename );
  DoSomethingWith( IO.IOParams );  
finally
  IO.Free;
end;



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

PeterPanino

982 Posts

Posted - Apr 14 2016 :  16:35:12  Show Profile  Reply
Nigel, I asked my question because the ImageEn help file states:

 
Generally you will not add a TImageEnIO component directly to your project.

Ensure you do not call any TImageEnIO methods before it is actually attached to an image container.


Go to Top of Page

xequte

39053 Posts

Posted - Apr 17 2016 :  16:45:32  Show Profile  Reply
Hi Peter

That wording should be improved. It is true in practical terms 99% of the time, but it is not a requirement (as TImageEnIO has its own fallback image container). It is also not true when you just want the params.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: