Image Xchange V1.1

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
Vadim
User
Posts: 2
Joined: Tue Jan 24, 2006 11:21 am
Contact:

Image Xchange V1.1

Post by Vadim » Tue Jan 24, 2006 11:36 am

I can not get information about file format....
Function IMG1.GetPageFormat() is not valid...
Sample(Clarion):

IMG1 ImageSDKTools
AA Ulong
Rtn Ulong
Code
IMG1.ReadImageFromFile('c:\1.gif')
rtn = IMG1.GetLastError()
IF rtn = DI_OK
AA=IMG1.GetPageFormat(1)
..........

^^^^ variable AA not eq IMG_FMT_GIF or another format.. is =0 !!!!
help me..please

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 Jan 24, 2006 1:51 pm

passed to Craig -: craigr@tracker-software.com

under review.
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

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Tue Jan 24, 2006 3:05 pm

Hi Vadim!

Checking now.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Tue Jan 24, 2006 6:59 pm

Hi Vadim!

The prototype for GetPageFormat is:

Code: Select all

GetPageFormat PROCEDURE(*LONG pf, <LONG indx>),LONG
First, LONG shold be used, not ULONG:

Code: Select all

AA Long
Rtn Long 
The way you use it would be:

Code: Select all

Ret = IMG1.GetPageFormat(AA, 1) 
If successful, AA will contain the proper Page format, and Ret = 0 which
indicates success. If Ret <> 0 then it is an error code and you should refer to
the list of error codes in the IXCLib30Help.chm help file for a description of
the error.

However, and this is where it gets tricky, the Page format is never going to be
IMG_FMT_GIF, because that is a FILE format. A list of the Page formats is given
in the IXCLib30Help.chm help file under the IMG_PageConvertToFormat function
definition.

To obtain the File format, you may use the following after reading the file:

Code: Select all

ret = IMG1.GetPageFormatLongParameter(IXC_FP_ID_FORMAT, AA, 1)
Now AA will contain the IMG_FMT_ code for the type of file.

N.B. the GetPageFormatLongParameter method may not exist in your version of ixctls35 class files. It will shortly.

Other parameters may be accessed either by using specified methods, such as
GetPageSize(...) and GetPageDPI(...).

A list of IXC_FP_ID_ parameters that you can access appears in ixcdef35.inc.

Later:
One other thing I just noticed - the class name is now IXCTools35Class.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Tue Jan 24, 2006 9:10 pm

Hi Vadim!

Just to amuse you, here's a small sample program that will report the file format of any image file you give it, and post error codes if it isn't a valid image file.

Enjoy!
Attachments
myprog.zip
myprog.prj
myprog.clw
Displays File Formats using ixclib30.
(814 Bytes) Downloaded 298 times
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Vadim
User
Posts: 2
Joined: Tue Jan 24, 2006 11:21 am
Contact:

Post by Vadim » Wed Jan 25, 2006 4:19 am

I have Image Xchange version 1.1 ..is not ver 3.XX!!!
This is simple help files-
Function IMG_GetSrcFormat retrieves the format information of the loaded image page.
HRESULT IMG_GetSrcFormat(
IMAGE_HANDLER img,
int pageNumber,
DWORD* format
);

Retreives the format of the page while decoding. May be any one of the following values: Hex Value Meaning
0x504E4720 PNG format.
0x424D5020 BMP format.
0x47494620 GIF format.
........
I use- ImageSDKTools CLASS,TYPE,MODULE('imgxtool.clw'),LINK('imgxtool.clw')

and method to manipulate the image

ImageSDKTools.GetPageFormat PROCEDURE(<LONG pPage>) ! one-based paging
pg LONG
fmt LONG
CODE
pg = CHOOSE(~OMITTED(2),pPage,SELF.CurrentPage)-1
SELF.ErrorCode = IMG_GetSrcFormat(SELF.hImage,pg,fmt)
IF SELF.ErrorCode <> 0 THEN fmt = SELF.ErrorCode.!0.
RETURN fmt

Please look my Simple.rar
Attachments
Simple.rar
(355.82 KiB) Downloaded 284 times

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 Jan 25, 2006 2:31 pm

The problem is Vadim that the codecs in the files being used is not supported in Version 1 - but is supported in Version 3.5 as the codec list was extended dramatically.

The only way to reliably resolve this is to upgrade to Version 3.5 - which is a free upgrade anyway - no charge is made.

Version 1.1 is now something like 3 years old or more and no feature enhancement or remedial work is possible.

Please send your original purchase info to upgrades@tracker-software.com for your free upgrade - please do not post here.
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