I load a PNG file into ImageEnView1, save it as a JPG file, and load the JPG file again into ImageEnView2. How do I directly insert the JPG file into ImageEnView2 without saving and reloading?
3 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Nov 08 2023 : 02:27:06 Hi
Are you trying display the image as it will appear as a saved JPEG?
In that case you do need to save it. You could save it to a stream if you don't want to use a temporary file.
Something like:
ms := TMemoryStream.Create();
try
ImageEnView1.IO.SaveToStreamJpeg( ms );
ms.Position := 0;
ImageEnView2.IO.LoadFromStreamJpeg( ms );
finally
ms.Free();
end;