J2KSetDefaults example for Visual Basic
Dim x As Integer
Dim IO As New LEADRasterIO
Dim msg$
LEADRasterView1.Raster.UnlockSupport L_SUPPORT_J2K, L_KEY_J2K
' Display all the default JPEG2000 advanced options
IO.J2KSetDefaults
msg$ = msg$ + "J2KUseColorTransform = " + CStr(IO.J2KUseColorTransform) + vbCrLf
msg$ = msg$ + "J2KDerivedQuantization = " + CStr(IO.J2KDerivedQuantization) + vbCrLf
msg$ = msg$ + "J2KXOsiz = " + CStr(IO.J2KXOsiz) + vbCrLf
msg$ = msg$ + "J2KYOsiz = " + CStr(IO.J2KYOsiz) + vbCrLf
msg$ = msg$ + "J2KXTsiz = " + CStr(IO.J2KXTsiz) + vbCrLf
msg$ = msg$ + "J2KYTsiz = " + CStr(IO.J2KYTsiz) + vbCrLf
msg$ = msg$ + "J2KXTOsiz = " + CStr(IO.J2KXTOsiz) + vbCrLf
msg$ = msg$ + "J2KYTOsiz = " + CStr(IO.J2KYTOsiz) + vbCrLf
msg$ = msg$ + "J2KDecompLevel = " + CStr(IO.J2KDecompLevel) + vbCrLf
msg$ = msg$ + "J2KProgressOrder = " + CStr(IO.J2KProgressOrder) + vbCrLf
msg$ = msg$ + "J2KCodBlockWidth = " + CStr(IO.J2KCodBlockWidth) + vbCrLf
msg$ = msg$ + "J2KCodBlockHeight = " + CStr(IO.J2KCodBlockHeight) + vbCrLf
msg$ = msg$ + "J2KCBS_SelectiveACBypass = " + CStr(IO.J2KCBS_SelectiveACBypass) + vbCrLf
msg$ = msg$ + "J2KCBS_ResetContextOnBoundaries = " + CStr(IO.J2KCBS_ResetContextOnBoundaries) + vbCrLf
msg$ = msg$ + "J2KCBS_TerminationOnEachPass = " + CStr(IO.J2KCBS_TerminationOnEachPass) + vbCrLf
msg$ = msg$ + "J2KCBS_VerticallyCausalContext = " + CStr(IO.J2KCBS_VerticallyCausalContext) + vbCrLf
msg$ = msg$ + "J2KCBS_PredictableTermination = " + CStr(IO.J2KCBS_PredictableTermination) + vbCrLf
msg$ = msg$ + "J2KCBS_ErrorResilienceSymbol = " + CStr(IO.J2KCBS_ErrorResilienceSymbol) + vbCrLf
msg$ = msg$ + "J2KGuardBits = " + CStr(IO.J2KGuardBits) + vbCrLf
msg$ = msg$ + "J2KDerivedBaseMantissa = " + CStr(IO.J2KDerivedBaseMantissa) + vbCrLf
msg$ = msg$ + "J2KDerivedBaseExponent = " + CStr(IO.J2KDerivedBaseExponent) + vbCrLf
msg$ = msg$ + "J2KUseSOPMarker = " + CStr(IO.J2KUseSOPMarker) + vbCrLf
msg$ = msg$ + "J2KUseEPHMarker = " + CStr(IO.J2KUseEPHMarker) + vbCrLf
MsgBox msg$