Page 1 of 1

Saving Files

Posted: Mon Feb 14, 2005 2:38 am
by glima
Whenever I try to save a page to a file I keep getting the error ERR_DI_INVALID_FORMAT_VALUE. This only happens when I try to save to anything but a BMP file.


This code works -

Code: Select all


      e# = IMG_PageSetFormatLongParameter(L:hPage, FP_ID_FORMAT, FMT_BMP_ID)
      e# = IMG_PageSetFormatLongParameter(L:hPage, FP_ID_COMP_TYPE, IComp_NONE)

      e# = IMG_ImageCreateEmpty(Address(L:hImage))
      L:OutFilename = '.\BPage'&format(L:Page,@n05)&'.BMP' & chr(0)
      e# = IMG_ImageInsertPage(L:hImage, -1, L:hPage)
      e# = IMG_ImageSaveToFile(L:hImage, L:OutFileName, 2)

This code DOES NOT work -

Code: Select all



      e# = IMG_PageSetFormatLongParameter(L:hPage, FP_ID_FORMAT, FMT_JPEG_ID)

      e# = IMG_PageSetFormatLongParameter(L:hPage, FP_ID_COMP_TYPE, IComp_JPEG)
      e# = IMG_PageSetFormatLongParameter(L:hPage, FP_ID_JPEG_QUALITY, 75)
      e# = IMG_ImageCreateEmpty(Address(L:hImage))
      L:OutFilename = '.\BPage'&format(L:Page,@n05)&'.JPG' & chr(0)
      e# = IMG_ImageInsertPage(L:hImage, -1, L:hPage)
      e# = IMG_ImageSaveToFile(L:hImage, L:OutFileName, 2)


Posted: Mon Feb 14, 2005 11:15 am
by John - Tracker Supp
Hi,

your code looks fine - I suspect from the information given - you do not have the rest of our dll's located with your application exe (in the same folder)

Specifically for the functionality required fm30base.dll. The library DLL's must be in the same folder as ixclib30.dll and your .exe.


Hope that helps

Posted: Mon Feb 14, 2005 3:44 pm
by glima
I do have the DLL's in the directory. The DLL's that I am using are from the latest PDF-XChange libraries because I use them also.

After doing additional tests I was able to create PCX, PNG, BMP, TIF, and even JPG (The equate for FMT_JPEG_ID was wrong)

But I am still having problems creating a WMF file. This would be the preferred format.

Posted: Tue Feb 15, 2005 12:11 pm
by John - Tracker Supp
Hi,

Image-XChange supports the reading of .xMF files - but supports only the writing/saving of Raster format files - therefore xMF is not supported as a write format - at this time.