LEADTOOLS Support
General
General Questions
L_LoadBitmapList: progress bar and abort wanted
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, November 4, 2011 2:52:29 AM(UTC)
Groups: Registered
Posts: 10
L_LoadBitmapList can take some time for large image lists. Is there a way to set up a callback function that will be called for every page, so that I can display a progress bar.
I would also like to be able to cancel the operation, for example by returning a certain value from the callback.
I found a callback feature in LOADFILEOPTION, but it seems only meant for JPEG and CMP files. The FILEREADCALLBACK function is suitable for L_LoadFile but can't be used with image lists AFAIK.
#2
Posted
:
Tuesday, November 8, 2011 10:08:02 AM(UTC)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Hello,
As you've noted, the L_LoadBitmapList method doesn't have a callback. I've also checked this, and I noted that L_LoadBitmap doesn't provide a callback either.
As I see it, there's two ways that you can implement this. You could use
L_LoadBitmap, and specify a single page to load at a time. By doing so, you can create your own loop. Since you'll know how many pages you're loading at one time, you could update your progress bar by setting it's value to be (number of pages loaded/total pages) * 100. You can set which page to load using a copy of LOADFILEOPTION with LOADFILEOPTION.PageNumber
Using
L_LoadFile, you can use the
FILEREADCALLBACK to get each individual page, and you can pass the total number of pages in the user data (if necessary). Similiarly with L_LoadBitmap, you can use your own count to update a progress bar.
Whichever method you use, you can create your own list with
L_CreateBitmapList, and then add each BITMAPHANDLE using
L_InsertBitmapListItem.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
General
General Questions
L_LoadBitmapList: progress bar and abort wanted
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.