Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, February 20, 2007 10:35:55 PM(UTC)

VadimR  
VadimR

Groups: Registered
Posts: 20


How can we obtain the full list of images in the selected folder ( now we can see the first sixteenth images only)?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, February 25, 2007 6:23:07 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


How exactly are you retrieving the 16 images? If you are using one of our demos, please tell me which demo it is and the exact steps you take.
 
#3 Posted : Sunday, February 25, 2007 8:31:56 PM(UTC)

VadimR  
VadimR

Groups: Registered
Posts: 20


When I place there are 16 images on the folder I obtain there are 10 buttons for select an  image. When I place there are 68 images on the folder I obtain there are 15 buttons for select an  image.

This quantity of buttons I retrieve before code changing and after code changing .

CUserBitmapWin m_Image;(Class CUserBitmapWin in the attached file)

int  OnStitch()
{
   ActionName = "Stitch";
 int                 nRet = SUCCESS_DLG_OK ;
   GETDIRECTORYDLGPARAMS DirectoryDlgParams ;
  
   ZeroMemory ( &DirectoryDlgParams, sizeof (GETDIRECTORYDLGPARAMS)) ;

   DirectoryDlgParams.uStructSize  = sizeof (GETDIRECTORYDLGPARAMS);
   DirectoryDlgParams.pszDirectory = (L_TCHAR *) malloc ( L_MAXPATH * 2 ) ;
   DirectoryDlgParams.pszTitle     = _T("Select Images Folder") ;
   DirectoryDlgParams.nBuffSize    = L_MAXPATH ;
   DirectoryDlgParams.pszFilter    = NULL ;
   DirectoryDlgParams.nFilterIndex = 1 ;
   m_Image.DialogFile()->SetDirectoryParams(&DirectoryDlgParams) ;
   nRet = m_Image.DialogFile()->DoModalGetDirectory ( hWnd) ;
    int imgCount =1000;
   // Get the directory
   if ( nRet == SUCCESS_DLG_OK )
   {
      DLGBITMAPLIST BitmapList ;
      L_INT         i = 0 ;
      HCURSOR       hCursor;
     
      hCursor = SetCursor (LoadCursor (NULL, IDC_WAIT));
     
      BitmapList.pBitmapList = (DLGBITMAPLISTITEM *)  malloc ( sizeof ( DLGBITMAPLISTITEM ) * imgCount ) ;
      //BitmapList.nCount = imgCount;

      if ( NULL == BitmapList.pBitmapList )
      {
         SetCursor (hCursor);
         return FAILURE;
      }
      else
      {
         for ( i = 0 ; i < imgCount ; i++ )
         {
            BitmapList.pBitmapList [ i ].pBitmap        = (BITMAPHANDLE  *)  malloc ( sizeof ( BITMAPHANDLE ) ) ;
            BitmapList.pBitmapList [ i ].pszFileName    = (L_TCHAR *)  malloc ( sizeof ( L_TCHAR ) * L_MAXPATH ) ;
            BitmapList.pBitmapList [ i ].pszDescription = (L_TCHAR *)  malloc ( sizeof ( L_TCHAR ) * L_MAXPATH ) ;
           
           
            memset(BitmapList.pBitmapList [ i ].pBitmap,0, sizeof(BITMAPHANDLE));
            memset(BitmapList.pBitmapList [ i ].pszFileName,0, sizeof ( L_TCHAR ) * L_MAXPATH );
            memset(BitmapList.pBitmapList [ i ].pszDescription,0, sizeof ( L_TCHAR ) * L_MAXPATH );
         }
      }
      int t = BitmapList.nCount;

      if ( 1/*SUCCESS*/ == ( nRet = GenerateBitampList ( DirectoryDlgParams.pszDirectory, &BitmapList, FALSE )) )
      {
         STITCHDLGPARAMS DlgParams;

         memset ( &DlgParams, 0, sizeof ( STITCHDLGPARAMS ) ) ;
         DlgParams.uStructSize = sizeof ( STITCHDLGPARAMS );
         DlgParams.nResultingBitmapWidth        = 320 ;
         DlgParams.nResultingBitmapHeight       = 200 ;
         DlgParams.nResultingBitmapBitsPerPixel = 24 ;
         DlgParams.nRes                         = 72 ;
         DlgParams.crBackGround                 = RGB ( 255, 255, 255 ) ;
         DlgParams.pBitmapList                  = &BitmapList ;
         DlgParams.uDlgFlags                    = 0 ;
         DlgParams.nCmdShow                     = SW_SHOW ;

     
         m_Image.DialogImageEffect()->EnableCallBack(FALSE);
         m_Image.DialogImageEffect()->SetStitchParams(&DlgParams) ;
         SetCursor (hCursor);
         L_INT nTtt = m_Image.DialogImageEffect()->DoModalStitch(hWnd);

   if  (nTtt  == 103)  return 0;
      }
      else
         SetCursor (hCursor);
 
      // clean up
      for ( i = 0 ; i < imgCount ; i++ )
      {
         if ( NULL != BitmapList.pBitmapList [ i ].pBitmap )
         {
            if ( BitmapList.pBitmapList [ i ].pBitmap->Flags.Allocated )
            {
               LBitmap MyTmpBtmp;
               MyTmpBtmp.SetHandle(BitmapList.pBitmapList [ i ].pBitmap);
               MyTmpBtmp.Free();
            }

            free ( BitmapList.pBitmapList [ i ].pBitmap ) ;
         }
        
         if ( NULL != BitmapList.pBitmapList [ i ].pszFileName )
         {
            free ( BitmapList.pBitmapList [ i ].pszFileName ) ;
         }
        
         if ( NULL != BitmapList.pBitmapList [ i ].pszDescription )
         {
            free ( BitmapList.pBitmapList [ i ].pszDescription ) ;
         }
      }

      if ( NULL != BitmapList.pBitmapList )
      {
         free ( BitmapList.pBitmapList ) ;
      }
      if ( nRet == 0 ) return 0;

   return SUCCESS_DLG_OK ;     
   }
   else
   {
      return FAILURE;

   }
}

File Attachment(s):
Stitch.zip (46kb) downloaded 24 time(s).
 
#4 Posted : Wednesday, February 28, 2007 6:17:45 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


Since it's not one of our demos that has this problem,
please create a small working test project (not your full application) that shows the problem, and send it to me and I will check it for you.

 
#5 Posted : Wednesday, February 28, 2007 10:48:47 PM(UTC)

VadimR  
VadimR

Groups: Registered
Posts: 20


Hi, Ismail! I attached a project for test.
File Attachment(s):
Stitch_test.zip (36kb) downloaded 24 time(s).
 
#6 Posted : Monday, March 5, 2007 12:27:02 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

In the function MyFileBrowse::BrowseDirCallBack in the file BrowseFileDlg.cpp, the following condition limits the number of images:
if ( m_ImageCount >= 15 )

 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.190 seconds.