J2KCompressionControl Example for Delphi
var
RasterIO: LEADRasterIO;
begin
RasterIO:= CreateComObject (CLASS_LEADRasterIO) as LEADRasterIO;
//compress a lossless file
RasterIO.J2KSetDefaults ();
RasterIO.J2KCompressionControl:= J2K_COMP_LOSSLESS;
RasterIO.Save (LEADRasterView1.Raster, WideString ('c:\temp\lossless.j2k'), FILE_J2K, 0, 0, SAVE_OVERWRITE);
end;