Menu

VB Help with AppendPage

Help
drudo
2005-01-13
2012-10-31
  • drudo

    drudo - 2005-01-13

    I'm trying to merge several tiff files into one multipage tiff. The code I've got is below. Every time it doesn't like the appendpage line. It keeps saying "expected =". Can anyone help? Thanks.

    Dim mult As New FIMULTIBITMAP
    Dim tiff As New FIBITMAP
    Dim x As Integer
    mult = FreeImage_OpenMultiBitmap(FIF_TIFF, File1.path & "\tmp.tif", True, False)
    x = 0
    While x < File1.ListCount
    File1.Selected(x) = True
    tiff = FreeImage_Load(FIF_TIFF, File1.path & "\&quot; & File1.filename)
    FreeImage_AppendPage(mult, FreeImage_lockpage(tiff,0))
    FreeImage_Unload (tiff)
    x = x + 1
    Wend
    FreeImage.FreeImage_CloseMultiBitmap (mult)

     
    • Hervé Drolon

      Hervé Drolon - 2005-01-13

      Use this :
      FreeImage_AppendPage(mult, tiff)

      You cannot call FreeImage_LockPage with a FIBITMAP (wrong argument)

       
    • drudo

      drudo - 2005-01-13

      Sorry, I'd copied an experiment I tried. This is the code as it is now and it still doesn't work.

      Dim mult As New FIMULTIBITMAP
      Dim tiff As New FIBITMAP
      Dim x As Integer
      mult = FreeImage_OpenMultiBitmap(FIF_TIFF, File1.path & "\tmp.tif", True, False)
      x = 0
      While x < File1.ListCount
      File1.Selected(x) = True
      tiff = FreeImage_Load(FIF_TIFF, File1.path & "\&quot; & File1.filename)
      FreeImage_AppendPage(mult, tiff)
      FreeImage_Unload (tiff)
      x = x + 1
      Wend
      FreeImage.FreeImage_CloseMultiBitmap (mult)

       

Log in to post a comment.