Saving Files

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's Image-XChange Imaging SDK (only).

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker - Clarion Support, John - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Support Staff, moderators

Post Reply
glima
User
Posts: 84
Joined: Mon Sep 20, 2004 4:27 pm
Location: Phoenix, AZ

Saving Files

Post by glima » Mon Feb 14, 2005 2:38 am

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)


John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon Feb 14, 2005 11:15 am

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
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

glima
User
Posts: 84
Joined: Mon Sep 20, 2004 4:27 pm
Location: Phoenix, AZ

Post by glima » Mon Feb 14, 2005 3:44 pm

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.

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Feb 15, 2005 12:11 pm

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.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply