Made a small Lepton test program using Tomxe's Lepton Reader Writer at
https://github.com/Xelitan/Lepton-reader-and-writer-for-Delphi-LazarusI noticed
LeptonImage.pas was missing
procedure DecodeLepton(InStr, OutStr: TStream);
procedure EncodeLepton(InStr, OutStr: TStream); here:
interface
uses Classes, Graphics, SysUtils, Math, Types, Dialogs;
const LIB_LEPTON = 'lepton.dll';
function WrapperDecompressImage(input_buffer: Pointer; input_buffer_size: UInt64;
output_buffer: Pointer; output_buffer_size: UInt64; number_of_threads: Integer;
result_size: PUInt64): Integer; cdecl; external LIB_LEPTON;
function WrapperCompressImage(input_buffer: PByte; input_buffer_size: UInt64;
output_buffer: PByte; output_buffer_size: UInt64; number_of_threads: Int32;
result_size: PUInt64): Int32; cdecl; external LIB_LEPTON;
procedure DecodeLepton(InStr, OutStr: TStream);
procedure EncodeLepton(InStr, OutStr: TStream);
{ TLeptonImage }
type
TLeptonImage = class(TGraphic)
Now I can do Packing and unpacking of JPEGs using TFileStream
Attached is a small Lazarus Test program
The
469 kb test.bmp gets reduced in size to a
10 kb test.lep picture file.
Thanks Tomxe for the Lepton magic.