Available in the LEADTOOLS Imaging toolkit. |
J2KROIControl Example for Visual Basic
Private Sub Command1_Click()
LEAD1.J2KSetDefaults
' Set our options
LEAD1.J2KCompressionRatio = 1000
LEAD1.J2KCompressionControl = J2K_COMP_RATIO
LEAD1.J2KUseROI = True
LEAD1.J2KROIControl = J2K_USEOPTION_RECT
LEAD1.J2KROILeft = 200
LEAD1.J2KROITop = 200
LEAD1.J2KROIWidth = 600
LEAD1.J2KROIHeight = 600
LEAD1.J2KXTsiz = 100
LEAD1.J2KYTsiz = 100
' Save the bitmap to disk
LEAD1.Save "c:\image1.j2k", FILE_J2K, 24, 2, SAVE_OVERWRITE
End Sub