Lepton Test Program with Packing and unpacking of JPEGs lazarus / 39-Graphics ---------------------------------------------------------------------- Boleeman · 2025-03-06 09:03 Made a small Lepton test program using Tomxe's Lepton Reader Writer at https://github.com/Xelitan/Lepton-reader-and-writer-for-Delphi-Lazarus I noticed LeptonImage.pas was missing  procedure DecodeLepton(InStr, OutStr: TStream); procedure EncodeLepton(InStr, OutStr: TStream);    here: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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. ---------------------------------------------------------------------- Key-Real · 2025-03-14 21:23 found nanojpeg.pas I use this to decode .jpg ---------------------------------------------------------------------- Boleeman · 2025-03-14 23:29 In that "nanojpeg.pas" file //Original code by Martin Fiedler http://keyj.s2000.ws/?p=137    does not exist. This is the new working page:  https://www.emix8.org/static.php?page=nanoJpeg Thanks Key-Real for that jpg decoder. And the Lazarus source code for the jpg loader is here: https://www.emix8.org/files/NanoJpegLazarus.zip