LEADTOOLS Support
Imaging
Imaging SDK Questions
How to Count the Pages of tif using LEADDlg1
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, April 8, 2009 11:34:04 PM(UTC)
Groups: Registered
Posts: 5
version 11.5
enviorment:vb6
=============================================
i use LEAD1 to count the pages of tif, the rate of getting pages is too slow
LEAD1.Load "C:\x.tif", 0, 0, -1
PageNum = LEAD1.InfoTotalPages
------------------------------
so how could i get pages of tif by LEADDlg1?
please...
#2
Posted
:
Thursday, April 9, 2009 4:53:00 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Since you are loading all pages in the file then calling the LEAD1.InfoTotalPages property, this process will be slow.
If you want to know the total number of pages in a multi-page file without loading all pages, use the Lead1.GetFileInfo function to check the total number of pages.
#3
Posted
:
Thursday, April 9, 2009 3:17:39 PM(UTC)
Groups: Registered
Posts: 5
if I want to convert tif(LZW) in a multi-page file to tif(without compress),
how could i use the lead1 in a efficient way?
------------------------------------------------------------------------------
LEAD1.GetFileInfo "c:\temp.tif", 0
PageNum = LEAD1.InfoTotalPages
For i = 1 To PageNum
LEAD1.Load "c:\temp.tif", 0, i, 1
If i = 1 Then
LEAD1.Save tSF, FILE_TIF, 8, 1, SAVE_OVERWRITE
Else
LEAD1.Save tSF, FILE_TIF, 8, 1, SAVE_APPEND
End If
---------------------------------------------------------------------------------
how could i convert a filer in an efficient way? thanks a lot ^^"
#4
Posted
:
Sunday, April 12, 2009 1:01:44 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The loop appears to be correct, but you are not passing the right parameters to the GetFileInfo() method. You are only getting 1 page of your file because you are passing 0 for the number of pages.
In version 11 of LEADTOOLS, you should pass a large number, such as 30000 so that the InfoTotalPages property gets updated.
LEADTOOLS Support
Imaging
Imaging SDK Questions
How to Count the Pages of tif using LEADDlg1
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.