ImagXpress™ v8 ActiveX FAQ

Contact Support



Q1What is the difference between ImagXpress Document, Standard, View & Photo Editions?
Q2How can I determine if I have the latest version of a Pegasus control?
Q3What DLLs do I need to distribute with my application?
Q4How do I distribute my application in VB, Delphi, C++ etc.?
Q5How do I load images into the ImagXpress v8 control?
Q6How do I save images in the ImagXpress 8 control?
Q7How do I create a multipage TIFF file and load certain pages of a multi-page TIFF file?
Q8How do I handle errors with the control?
Q9How do I print images with the control?
Q10I tried to open a PDF in ImagXpress and got a -1062 message. Why?
Q11I see that ThumbnailXpress and ImagXpress have had vulnerabilities reported on the NIST database. What does this mean?

Q1: What is the difference between ImagXpress Document, Standard, View & Photo Editions?
Please refer to the link listed below:
Comparison of ImagXpress Editions

Q2: How can I determine if I have the latest version of a Pegasus control?
Please download the PegConnect utility program from the following link: PegConnect
or reference the Latest Builds page.

Q3: What DLLs do I need to distribute with my application?
PegasusImaging.ActiveX.ImagXpress8.dll
PegasusImaging.Advanced.ImagXpress8.dll
PegasusImaging.Resources.ImagXpress8.dll

Please Note: You must register the PegasusImaging.ActiveX.ImagXpress8.dll either via your installation program or manually via the regsvr32.exe utility.

Q4: How do I distribute my application in VB, Delphi, C++ etc.?
PLEASE NOTE: You must have received unlock codes in order to distribute applications. These are received when runtimes are purchased. If you have not received them you should Contact Sales.

A) Unlock Run-Time Licenses when using ImagXpress at design time in VB:

1) Add the UnlockRuntime method as the first call in your application before using any other functionality in the control. For example:

ImagXpress1.UnlockRuntime 1234,1234,1234,1234

B) Unlock Run-Time Licenses when using the ImagXpress as a COM Object in VB:

1) Add a reference to the ImagXpress 8 control via Project|References.

2) Declare the UnlockControl function as follows:

Private Declare Sub IX_Unlock Lib "PegasusImaging.ActiveX.ImagXpress8.dll" Alias "UnlockControl" (ByVal pw1 As Long, ByVal pw2 As Long, ByVal pw3 As Long, ByVal pw4 As Long)

3) Dim an ImagXpress 8 control object: Dim ix As PegasusImagingActiveXImagXpress8.ImagXpress

4) Call the unlock method with your unlock codes: ControlUnlock 1234, 1234, 1234, 1234

5) Create the ImagXpress 8 Object: Set ix = New PegasusImagingActiveXImagXpress8.ImagXpress

6) Add the UnlockRuntime method as the first call in your application before using any other functionality in the control. For example: ImagXpress1.UnlockRuntime 1234,1234,1234,1234

C) Unlock Run-Time Licenses when using the ImagXpress control at design time in Delphi:

1) Add the UnlockRuntime method as the first call in your application before using any other functionality in the control. For example:

ImagXpress1.UnlockRuntime 1234,1234,1234,1234

D) Unlock Run-Time Licenses when using the ImagXpress COM Object in VC++:

1) The ix8_open.cpp is included with ImagXpress to handle licensing for the COM Object. You can find ix8_open.cpp in the ImagXpress VCCOM\Include directory.

2) In the IX_Open () function, locate the call to UnlockControl. Replace the four parameters in that call with the four registration codes you obtained when you registered ImagXpress 8.

3) Add the UnlockRuntime method as the first call in your application before using any other functionality in the control. For example: ImagXpress1.UnlockRuntime 1234,1234,1234,1234

E) Web Client application

If you are using the control within HTML you must obtain a web license string. This web license string is received from our sales department when the web license is purchased. The web license string is passed as the parameter to the UnlockWeb method. Please refer to http://www.pegasusimaging.com/weblicfaq.htm for more information on using the control within a web environment.

Q5: How do I load images into the ImagXpress v8 control?
There are 2 main ways to load an image. You can load an image via a filename/URL, from memory and from a byte array containing the image data. Please see below for specific examples. The code is written in Visual Basic as an example, but if you need additional assistance in other languages please Contact Support.

A) Load image data the FileName property:

ImagXpress1.FileName = “C:\image.tif”
If ImagXpress1.ImagError <> 0 then
   Msgbox ImagXpress1.ImagError
End If

B) Load image data via the LoadBlob method:

Dim filesize1 As Long
filesize1 = FileLen("C:\benefits.tif")
FileNum = FreeFile
Dim bBlob() As Byte
Open "C:\benefits.tif" For Binary As #FileNum
ReDim bBlob(filesize1) As Byte
'reads into a variable bblob
Get #FileNum, , bBlob

ImagXpress1.LoadBlob bBlob, filesize1
If ImagXpress1.ImagError <> 0 Then
   MsgBox ImagXpress1.ImagError
End If

C) Load image data via the LoadBufferPtr method:

Dim filesize1 As Long
filesize1 = FileLen("C:\benefits.tif")
FileNum = FreeFile
Dim bBlob() As Byte
Open "C:\benefits.tif" For Binary As #FileNum
ReDim bBlob(filesize1) As Byte
'reads into a variable bblob
Get #FileNum, , bBlob

ImagXpress1.LoadBufferPtr bBlob(0), filesize1
If ImagXpress1.ImagError <> 0 Then
   MsgBox ImagXpress1.ImagError
End If

D) Load image data via the LoadBuffer method:

1) Save the Image data to a buffer so it is accessible via the SaveBufferHandle property:

ImagXpress1.SaveToBuffer = True
ImagXpress1.SaveFileType = FT_TIFF
ImagXpress1.SaveFile

2) Load the SaveBufferHandle into a 2nd ImagXpress control:

ImagXpress2.LoadBuffer xpress1.SaveBufferHandle

3) Delete the SaveBufferHandle:

ImagXpress1.DeleteSaveBuffer


Q6: How do I save images in the ImagXpress 8 control?
To save an image, set the SaveFileName property and then call the SaveFile method. ImagXpress will automatically save the image as the type specified by the file extension if the SaveFileType property is set to 0 (FT_DEFAULT).

ImagXpress1.SaveFileName = "C:\IMAGXPRESS\XYZ.JPG"
ImagXpress1.SaveFile

Note that for some formats (JPEG, ePIC, TIFF, etc.) there are other properties that can be set that affect the way the file is saved. For example, if you are saving TIFF image data you will likely want to set the SaveTIFFCompression property. If you are saving JPG image data you will want to set the following properties as outlined below depending on the desired quality and image compression you need to achieve.

When saving to a JPEG or ePIC file type you can change the compression / quality level using the SaveJPGLumFactor, SaveJPGChromFactor, and SaveJPGSubSampling properties.

You can also set the type of JPEG using the SaveJPGProgressive and SaveJPGGrayscale properties.

See the help file for additional details.

For higher quality and lower compression I set SaveJPGLumFactor and SaveJPGChromFactor in the low teens and set SaveJPGSubSampling to 1:1:1 compression.

For higher compression and lower quality I set SaveJPGLumFactor and SaveJPGChromFactor in the low 30s and set SaveJPGSubSampling to 4:1:1 compression.

Q7: How do I create a multipage TIFF file and load certain pages of a multi-page TIFF file?
You need to set the SaveMultiPage property = True before using the SaveFile method. For example:

ImagXpress1.SaveMultiPage = True
ImagXpress1.SaveFileName = “C:\multi.tif”
ImagXpress1.SaveTIFFCompression = TIFF_CCITTFAX4
ImagXpress1.SaveFile

To load a particular page set the PageNbr property before loading the image. If you need to determine the number of pages in the file use the Pages property.

Q8: How do I handle errors with the control?
There are a couple of ways that errors can be handled in the ImagXpress 8 control.

1) The RaiseExceptions property can be set to True and then Error Handling added to trap any errors that errors. For example:

ImagXpress1.RaiseExceptions = True

On Error GoTo errhandler
ImagXpress1.FileName = "C:\benefitsgdgd.tif"

errhandler:

MsgBox ImagXpress1.ImagError & Err.Description

2) The DisplayError property can be set to True and then the ImagError property queried to see if there is an error. For example:

ImagXpress1.FileName = "C:\benefitsgdgd.tif"
If ImagXpress1.ImagError <> 0 then
   MsgBox ImagXpress1.ImagError
End If


Q9: How do I print images with the control?
Please refer to the VB and VC++ printing samples that are included with the toolkit. If you need an advanced printer interface please refer to the PrintPRO toolkit.

Q10: I tried to open a PDF in ImagXpress and got a -1062 message. Why?
ImagXpress supports a subset of PDFs. If you want full Adobe PDF Support you will need to add on the PDFXpress toolkit. ImagXpress will save b&w and color images to PDF, and will open up the PDFs it creates. Most other PDFs have non image data inside them so ImagXpress will not open these. PDFXpress is available as an add on to ImagXpress for a discount.

Q11: I see that ThumbnailXpress and ImagXpress have had vulnerabilities reported on the NIST database. What does this mean?
This issue was addressed in an ImagXpress v8 service pack released on January 15, 2008. This Service Pack of ImagXpress v8 includes changes to the ActiveX control’s file writing behaviors when running from script in unsafe zones. This modification provides additional security measures to protect against unsanctioned file writing. Customers using the ActiveX edition of ImagXpress v8 should download this complimentary service pack. Customers using a previous version are encouraged to upgrade.


Sitemap | © 2008 Pegasus Imaging Corporation. All Rights Reserved. | Privacy Statement.