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
 Fastest Way to Create a Bitmap with Opaque Text

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
john_siggy@yahoo.com Posted - Jun 14 2019 : 02:34:31
What is the fastest way to burn Opaque text into a bitmap. Have two lines of text and each is centered.

Regards,

John

10   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 23 2019 : 21:09:11
Hi John

As you don't need transparency, Bitmap textout is fine. I should imagine the time is about the same as TIEBitmap GDI+ DrawString, or possibly a little faster due to less overhead.

Only you can decide if performance is acceptible without caching the drawn bitmap. Personally speaking for an operation repeated so frequently, I would cache it.

Nigel
Xequte Software
www.imageen.com
john_siggy@yahoo.com Posted - Jun 23 2019 : 13:42:04
Thanks for your response.

I am using TextOut to a TBitmap. Is this slower than TextOut to a TIEBitmap. No caching necessary ??
xequte Posted - Jun 19 2019 : 15:42:33
Hi

I would not recommend creating and destroying a layer 15 times a second!

You would be better to use a TextOut routine, which calls the GDI routines directly.

But something that is used that frequently should be cached. TextOut to a iebitmap and draw that instead.

Nigel
Xequte Software
www.imageen.com
john_siggy@yahoo.com Posted - Jun 19 2019 : 13:14:06
FYI: Am running this routine 15 times a second or so...
john_siggy@yahoo.com Posted - Jun 19 2019 : 10:36:33
Works for several seconds then freezes app. or gives same error about GDI+ not installed.

How much slower are the more stable "TextOut" routines anyway ?

xequte Posted - Jun 18 2019 : 00:27:21
OK, don't use TImageEnView.Bitmap. It is only for legacy applications, and forces use of LegacyBitmap.

Please change your code to...

with TImageEnView.Create(nil) do
begin
  IEBitmap.Assign(bmp);
  ...
end;


Nigel
Xequte Software
www.imageen.com
john_siggy@yahoo.com Posted - Jun 17 2019 : 21:06:57
Blows up at "Bitmap.Assign(bmp)

Works intermitantly

Thanks again,
xequte Posted - Jun 16 2019 : 16:10:34
Hi John

Sorry, our forum software does not support the @ symbol in URL's. It needs to be encoded (%40).

Which line generates the GDI+ error?

Nigel
Xequte Software
www.imageen.com
john_siggy@yahoo.com Posted - Jun 14 2019 : 04:37:47
The specific error I get is:
'Cannot create TIECanvas. Ensure GDI+ is installed on system.'
I am running Windows 10, Imageen Version: 8.1.1
john_siggy@yahoo.com Posted - Jun 14 2019 : 04:07:01
I use the following code but I get a message that GDI is not present on my machine???:

with TImageEnView.Create(nil) do
begin
Bitmap.Assign(bmp);
LayersAdd( 'test test 123', 22, clRed, DERFONT, [fsBold], IELayer_Pos_HCenter, IELayer_Pos_VCenter);
CurrentLayer.PosX := IELayer_Pos_HCenter;
CurrentLayer.PosY := IELayer_Pos_VCenter;
CurrentLayer.FillColor := clWhite;
CurrentLayer.BorderColor := clNone;
CurrentLayer.Opacity := 0.4;
LayersMergeAll();
bmp.Assign(bitmap);
Free;
end;