Forum

Image X-Change v 3.0

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, Lesya - Tracker, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Tracker - Clarion Support, Tracker Supp-Stefan, John - Tracker Supp, Ivan - Tracker Software, moderators, Support Staff

Image X-Change v 3.0

Postby glima on Thu Feb 03, 2005 2:02 pm

I am posting this to this forum because there is no version 3.0 forum.

I am converting an application to use the new 3.0 version.

The old application did this

IMG_CreateEmptyImage
IMG_InsertNewPage
IMG_CreatePageDC
// Paint stuff to the DC
IMG_ReleasePageDC
IMG_SetCompression
IMG_SetSaveParam
IMG_SetSaveFormat
IMG_AppendPageToFile


The converted

IMG_PageCreateNew
IMG_PageGetDC
// Paint stuff to the DC
IMG_PageReleaseDC
IMG_ImageCreateEmpty
IMG_ImageInsertPage

???? How do I save the image to a file as I did above???
glima
User
 
Posts: 68
Joined: Mon Sep 20, 2004 4:27 pm
Location: Phoenix, AZ

Postby John - Tracker Supp on Thu Feb 03, 2005 2:54 pm

Hi,

not quite sure if you wish to append an image to a file or save an image to a new file - but here is one option - which may or may not be the most efficient - if you care to be a little more specific - would be pleased to advise further:

to continue from where you left off - the functions/code would look like this :

// set file format (required, all other settings may be ommited)
IMG_PageSetFormatLongParameter(page, FP_ID_FORMAT, ...)
// set page format in file (specific for most file fomats, may be ommited)
IMG_PageSetFormatLongParameter(page, FP_ID_ITYPE, ...)
// set compression type
IMG_PageSetFormatLongParameter(page, FP_ID_COMP_TYPE, ...)
// set compression level
IMG_PageSetFormatLongParameter(page, FP_ID_COMP_LEVEL, ...)
// or for jpeg compression
IMG_PageSetFormatLongParameter(page, FP_ID_JPEG_QUALITY, ...)

and :

// to insert all pages from image:
IMG_ImageInsertPagesToFile(image, file_name, insert_pos)

// to save image:
IMG_ImageSaveToFile(image, file_name, saving_flags)
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
John - Tracker Supp
Site Admin
 
Posts: 7802
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada

Image Xchange v3.0

Postby glima on Thu Feb 03, 2005 5:00 pm

Thanks thats exactly what I was looking for.


In another part of the code I actually load and existing image, but the

IMG_ImageCreateNew(&hImage)
IMG_ImageLoad(hImage, szFilename, 1)

The IMG_ImageLoad function returns 17. From what I deduce from the errorcodes is this is an internal error.

Attached is the file causing the error.
Attachments
3-6 tiff test.zip
Test file
(685.41 KiB) Downloaded 119 times
glima
User
 
Posts: 68
Joined: Mon Sep 20, 2004 4:27 pm
Location: Phoenix, AZ

Postby John - Tracker Supp on Thu Feb 03, 2005 5:14 pm

Will look into - thanks.

It does load into the ActiveX for viewing ok - so the issue is not with the file or codec's - maybe we will need some more sample code - but will advise.

Also please ZIP files sent/posted .

thanks
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
John - Tracker Supp
Site Admin
 
Posts: 7802
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada

Postby John - Tracker Supp on Thu Feb 03, 2005 5:25 pm

Hi,

if you can advise your development tool we have some new demo's not yet released which may assist as I am 99% sure the problem is in your code

Or perhaps you would prefer to put together your own small sample app and post the project (zipped) and we will look into and advise.

Also an Addendum from our ImageX product manager :

In all the Image-XChange libraries codes below 0x80000000 - positive integers, or the equivelent numeric values from 0 to 2147483647 does not indicate error.

Values up to 0x3FFFFFFF (1073741823 decimal) are valid results and do not indicate an error or warning.

Numbers in the range 0x40000000-0x7FFFFFFF (1073741823 - 2147483647 decimal) indicate a warning - non-critical in nature (an incomplete image, for example), but it is not critical and the application can continue.

Hope that helps - apparently this is in the help
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
John - Tracker Supp
Site Admin
 
Posts: 7802
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada

Postby glima on Fri Feb 04, 2005 5:55 am

According to the HELP for IMG_ImageLoad

Return Values
If the function succeeds, the return value is DI_OK.
If the function fails, the return value is an error code.

In the img_errors.h DI_OK is defined as DS_OK. This is not defined in any headers that come with Image X-Change. Knowing that you use this library in your PDF XChange product, which I also use, I found it in the DS_ERROR_MAKER.H.

// Common Errors and Success codes
#define DS_OK 0

If a positive number is valid then you may want to change your documentation. All other library functions that I am using in my application return 0 when successful.


My development environment is Clarion but use the API calls an NO template code. (Completely hand written)

This is a routine that opens the file
Code: Select all
  e# = IMG_ImageCreateEmpty(Address(L:FileHandle))
  if ~e#
    i# = IMG_ImageLoad(L:FileHandle, L:InFileName, 1)
    if ~i#
      exit
    end
  end
  ErrorLog('BATCHENG_Process - Picture Open File error = '&e# &' - '& i#)
  L:Generating = GEN:DONE
  exit


Prototypes used:
<B>IMG_ImageCreateEmpty(LONG),LONG,PASCAL,RAW
IMG_ImageLoad(IMAGE_HANDLE,*CSTRING,ULONG),HRESULT,PASCAL,RAW,Name('IMG_ImageLoadA')
</B>

I will try the application and check for negatives only and post the results here.
glima
User
 
Posts: 68
Joined: Mon Sep 20, 2004 4:27 pm
Location: Phoenix, AZ

Postby John - Tracker Supp on Fri Feb 04, 2005 11:41 am

Agreed there is some abiguity about the doc's in this area and I have requested we update accordingly.

thanks
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
John - Tracker Supp
Site Admin
 
Posts: 7802
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada


Return to Image-XChange SDK Version 1 and 3

Who is online

Users browsing this forum: No registered users and 1 guest