Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, July 27, 2012 4:15:53 AM(UTC)
giant_didi

Groups: Registered
Posts: 6


Hello,
I’m still using version 12 with visual C++.
Is ther a way, to copy the content of one leadcontrol to anohther?
An operator „=“ isn’t available.
I’m using:  LeadA.SetBitmap(LeadB.GetBitmap());
This works fine. But it’s very slow with big pictures. Actually it’s even faster if I save from LeadB to a file and open thar file from LeadA.
Is there a better and faster way of cloning a control?
Thank you,

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, July 29, 2012 12:40:04 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

If you're using the LEAD Main OCX, the Set/Get bitmap approach is the direct way of making a full copy of the bitmap. It would be really strange if saving to file then loading would produce an overall faster performance.
Another way of doing it is this:
1. Create an empty bitmap in the second control that's the same dimensions and bits per pixel as the original. By default, the new image would be all black (zeros).
2. Copy the pixel data from the first to the second using the Combine() function using the CB_OP_ADD flag.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.109 seconds.