my code fails randomly with 'Cannot create TIECanvas. Ensure GDI+ is installed on system.' in Multithreading.
var
IO: TImageEnIO;
Proce: TImageEnProc;
IO := TImageEnIO.Create(nil);
IO.Params.PDF_PaperWidth := 1190;
IO.Params.PDF_PaperHeight := 842;
IO.Params.PDF_Compression := ioPDF_JPEG;
Proce := TImageEnProc.CreateFromBitmap(IO.IEBitmap);
IO.CreatePDFFile(vPDFName);
if IO.LoadFromStreamJpeg(PhotoStream) then
begin
Proce.TextOut(vPosX, vPosY, vMarkInfo, 'Times New Roman', MarkTextFontSize, clRed, [fsBold]);
IO.IEBitmap.RemoveAlphaChannel();
IO.SaveToPDF;
IO.ClosePDFFile;
end;