TImageEnIO.LoadFromFileJpeg
Declaration
function LoadFromFileJpeg(const FileName: WideString): Boolean;
Description
Loads an image from a JPEG file. Result will be False if the file is not JPEG format (and
Aborting will be True). Loading errors due to a file not being available will raise an exception.
FileName is the file name including extension.
Note: You can abort loading by setting
Aborting to True
Example
ImageEnView1.IO.LoadFromFileJpeg('C:\alfa.jpg');
// Load a JPEG as fast as possible, ensuring width is >= 150 and height >= 100 (while maintaining the aspect ratio)
ImageEnView1.IO.Params.LoadToWidth := 150;
ImageEnView1.IO.Params.LoadToHeight := 100;
ImageEnView1.IO.Params.JPEG_Scale := ioJPEG_AutoCalc;
ImageEnView1.IO.LoadFromFileJpeg('C:\myimage.jpg');