J2K-Codec ™

News
Overview
Download
Order
F.A.Q.
More info
Support
Links

Welcome
QuickStart

ActiveX Control

C++ Wrapper
J2K_Image
open
easyDecode
selectTiles
getMetaData
decode
close
J2K_Frames
open
getFrames
getFrame
operators
close

API Reference
General
getVersion
getLastError
getErrorStr
getLastErrorStr
Unlock
Open / Close
Open
Close
Info
GetInfo
GetInfoEx
GetResolutions
GetResDimensions
GetMetaData
Decoding
EasyDecode
SelectTiles
Decode
Cancel
Debug
StartLogging
StopLogging


ActiveX control


To use J2K-Control in your VisualBasic application you need to:


1. Register the control
Execute the following command:

   regsvr32.exe j2k-control.dll

To unregister the control you need to use regsvr32.exe /u j2k-control.dll

2. Add component to your VB toolbox
Right click on the toolbox, select "Components"



and mark the "J2K_Control 1.0 Type Library" check-box:



3. Place the control on your form
Using "J2" button,



draw a rectangle on your form, where the images will be displayed. You should see a white area with "J2K-Control" text in the center.

4. A little coding
Assuming your form has Form1 name and the J2K-Control has J2K_Codec1 name, add the following 3 lines into the Form_Load():
Private Sub Form_Load()
    J2K_Codec1.Key = "[Your personal key]"
    J2K_Codec1.OpenFile "test.j2k"
    Form1.Caption = "J2K: " + CStr(J2K_Codec1.ImageWidth) + "x" + CStr(J2K_Codec1.ImageHeight) + "x" + CStr(J2K_Codec1.ImageComponents)
End Sub
That's it! Now you can try to run your application and you should see the test.j2k image.

For more information, please see our example, as well as a test image, in the "VBasic\a_ActiveX" folder.

5. Ordering
If this ActiveX control suites your needs, you must purchase the full version prior to using it in any publicly distributed software.

You can do it right here: http://j2k-codec.com/order.html


If it doesn't - then, please, email us with any ideas of how to improve it at: support@j2k-codec.com

Thank you!



2004-2008 © Alex Saveliev