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
 Tiff pagecount without opening the file?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

stwizard

USA
39 Posts

Posted - Mar 19 2015 :  16:05:31  Show Profile  Reply
Greetings,

Delphi XE5
ImageEn 5.0.5

I thought from reading the help file that I could use TImageEnIO.ParamsFromFile to fetch the page count in a tiff file without having to open it, but it returns 0. What am I doing wrong?

var
ImageInfo: TImageEnIO;
iPageCnt: SmallInt;
begin
TRY
//* Fetch the page count for this tiff without actually loading the file
ImageInfo := TImageEnIO.Create(Self);
ImageInfo.ParamsFromFile(FileName);
iPageCnt := ImageInfo.Params.TIFF_PageCount;

FINALLY
END
end


w2m

USA
1990 Posts

Posted - Mar 19 2015 :  16:20:33  Show Profile  Reply
If all you need is the page count try IO.IEGetFileFramesCount...

function IEGetFileFramesCount(const FileName: WideString): Integer;

Description
A generic method to get the number of frames in a multi-page images and supported videos (GIF, TIFF, AVI, MPEG...).


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

stwizard

USA
39 Posts

Posted - Mar 20 2015 :  06:15:52  Show Profile  Reply
Thanks Bill,

When attempting to try your suggestion I found that it was a function in imageenio not io.

iPageCnt := imageenio.IEGetFileFramesCount(FileName);


All is well it works great.

Mike
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: