VB APIs

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

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

Post Reply
fpie
User
Posts: 16
Joined: Thu Jan 13, 2005 9:17 pm

VB APIs

Post by fpie » Wed Dec 21, 2005 8:52 pm

Hi there,
We have the registered copy of Image X-Change but we don't have a module with all the APIs and Constants Declarations for VB.
Is there somewhere where we can download it.

What we're doing is,
Step 1 -> Scan
Step 2 -> Save To JPG
Step 3 -> Get Barcodes with another component
Step 4 -> Insert into a PDF.

We need the APIs so we can save the image in memory to a jpg file, without the SaveAs Dialog.

Thanks,

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

Post by John - Tracker Supp » Wed Dec 21, 2005 11:06 pm

Hi,

are you using our PDF SDK creations Tools in conjunction with Image-XChange - or those of another party ?

The method employed will differ depending on your answer and if you have licensed versions of both PDF-XChange or Tools SDK's and Image-XChange - is a lot more efficient.
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

fpie
User
Posts: 16
Joined: Thu Jan 13, 2005 9:17 pm

Post by fpie » Thu Dec 22, 2005 2:11 pm

Yes, I'm using the PDF X-change and we have license for both.
Image and PDF.

I first did:
1-> Scan
2-> PDF

But now I need to do the barcode part, and need to do it with a JPG.

Appart Question:
If I import into a PDF with PDFXchng from a JPG, the output PDF will be smaller than if I do it with the import from image X change that the PDX has?

Cause another thing we are trying is to make our PDFs the smaller we can.

Thanx

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

Post by John - Tracker Supp » Thu Dec 22, 2005 2:37 pm

Hi,

The function you require is 'IMG_ImageSaveToFile' - this will allow you to save directly from memory to an image file without using a dialog box.

Hope that helps.

You appear to already be using the most efficient scan2PDF method - assuming always you have the compression/optimisation options correctly setup
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

fpie
User
Posts: 16
Joined: Thu Jan 13, 2005 9:17 pm

Post by fpie » Thu Dec 22, 2005 2:44 pm

Hi, I'm using this.

res = IMG_ImageSaveToFileA(image, strFName, 2)

How do I setup to save in JPG, or I just need to specify jpg as extension of the file name.??

Thanx

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

Post by John - Tracker Supp » Thu Dec 22, 2005 2:59 pm

Hi,

public const fmt_id = &h4a504547 ' JPEG
public const ttype = 16 'True color 8 bpp

IMG_PageSetFormatLongParameter(vPages(k), FP_ID_FORMAT, fmt_id);
IMG_PageSetFormatLongParameter(vPages(k), FP_ID_ITYPE, ttype);
IMG_ImageSaveToFile(img, fname_tosave, action);

You can see a full list of the id & type definitions if you run the ImageTest (c++) demo (menu View->Encoders List -)

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

fpie
User
Posts: 16
Joined: Thu Jan 13, 2005 9:17 pm

Post by fpie » Thu Dec 22, 2005 3:32 pm

Great this helps me a lot.
What I still not have are this declarations.

- FP_ID_FORMAT
- IMG_PageSetFormatLongParameter

I searched all the Example projects and I did find then.

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

Post by John - Tracker Supp » Fri Dec 23, 2005 1:39 pm

Sorry - I do not understand ?

the code example already given provides these:

public const fmt_id = &h4a504547 ' JPEG
public const ttype = 16 'True color 8 bpp

IMG_PageSetFormatLongParameter(vPages(k), FP_ID_FORMAT, fmt_id);
IMG_PageSetFormatLongParameter(vPages(k), FP_ID_ITYPE, ttype);
IMG_ImageSaveToFile(img, fname_tosave, action);

If you are still having problems - please provide a small sample application (compiled and exe - zipped) and we will endeavour to correct/assist.
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

fpie
User
Posts: 16
Joined: Thu Jan 13, 2005 9:17 pm

Post by fpie » Fri Dec 23, 2005 2:00 pm

Tracker Support wrote: IMG_PageSetFormatLongParameter(vPages(k), FP_ID_FORMAT, fmt_id);
IMG_PageSetFormatLongParameter(vPages(k), FP_ID_ITYPE, ttype);
IMG_ImageSaveToFile(img, fname_tosave, action);
Hi,
The code above is C. and I'm using VB, In the VB Examples, I don't have the API declaration for the function
IMG_PageSetFormatLongParameter
and for the Constants

- FP_ID_FORMAT
- FP_ID_ITYPE


Also, when I opened the ScannerDEMO and ran it, It says that are some include files missing.


#include <uxtheme.h>
#include <tmschema.h>



Thanx.
PS: Is there a module for VB with all the API/Constants/Types declarations?

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

Post by John - Tracker Supp » Tue Dec 27, 2005 1:48 pm

Hi,

We provide an ActiveX and example app to make use of Image-Xchange simple for VB users - not entirely sure why you have chosen to ignore/not use this ?

However :

the function IMG_PageSetFormatLongParameter is described in our help file for all users and in VB the declaration of this function would be:

Public Declare Function IMG_PageSetFomatParameters lib "ixclib30" (ByVal page as Long, ByVal id as Long, ByVal val as Long) as Long

If you are not going to use the supplied ActiveX - you are going to struggle a little I would guess with the Library as a whole should you choose to use only the direct DLL method - I would strongly advise you reconsider.
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