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
 Tiff pagecount without opening the file?

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
stwizard Posted - Mar 19 2015 : 16:05:31
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


2   L A T E S T    R E P L I E S    (Newest First)
stwizard Posted - Mar 20 2015 : 06:15:52
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
w2m Posted - Mar 19 2015 : 16:20:33
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