ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Cannot create TIECanvas. Ensure GDI+ is installed on system

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Flashcqxg Posted - Jan 12 2022 : 01:26:47
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;


6   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 13 2022 : 20:32:11
Hi

You need: Canvas.Brush.Style := bsClear;

Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jan 13 2022 : 03:34:11
Hi,
Thank you. The error doesn't appear anymore, but when writing text, if the text overlaps, the text on the bottom layer will be blocked by the text on the top layer. It was transparent when using the IECanvas.TextOut method before. How can I make the text completely transparent?

for I := 1 to 10 do
begin
IO.IEBitmap.AlphaChannel.Canvas.Font.Size := MarkTextFontSize;
IO.IEBitmap.AlphaChannel.Canvas.Font.Color := clRed;
IO.IEBitmap.AlphaChannel.Canvas.Font.Name := 'Times New Roman';
IO.IEBitmap.AlphaChannel.Canvas.Font.Style := [TFontStyle.fsBold];
IO.IEBitmap.AlphaChannel.Canvas.TextOut(50, 50 + (I * 20), 'This is the ' + I.ToString + ' row.');
end;
IO.IEBitmap.RemoveAlphaChannel(True, clRed);

xequte Posted - Jan 12 2022 : 22:55:36
Hi

I meant TCanvas, i.e.

IO.IEBitmap.Canvas.Font.Size := MarkTextFontSize;
IO.IEBitmap.Canvas.Font.Color := clRed;
IO.IEBitmap.Canvas.Font.Name := '#23435;#20307;';
IO.IEBitmap.Canvas.Font.Style := [TFontStyle.fsBold];
IO.IEBitmap.Canvas.TextOut(vPosX, vPosY, vMarkInfo);


Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jan 12 2022 : 22:02:14
I just tested it,the larger the number of threads is set, the greater the probability of this error.
Flashcqxg Posted - Jan 12 2022 : 21:31:54
I used the code below and the result is the same.

IO.IEBitmap.IECanvas.Font.Size := MarkTextFontSize;
IO.IEBitmap.IECanvas.Font.Color := clRed;
IO.IEBitmap.IECanvas.Font.Name := '#23435;#20307;';
IO.IEBitmap.IECanvas.Font.Style := [TFontStyle.fsBold];
IO.IEBitmap.IECanvas.TextOut(vPosX, vPosY, vMarkInfo);
xequte Posted - Jan 12 2022 : 21:09:38
Hi

It might be a resource access issue. Try using the TCanvas TextOut methods instead.

Nigel
Xequte Software
www.imageen.com