J2KTargetFileSize example for Visual Basic
Dim IO As New LEADRasterIO
' compress a 30K JPEG2000 file
IO.J2KSetDefaults
IO.J2KCompressionControl = J2K_COMP_TARGETSIZE
IO.J2KTargetFileSize = 30 * 1024
IO.Save LEADRasterView1.Raster, "c:\temp\30k.j2k", FILE_J2K, 0, 0, SAVE_OVERWRITE