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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Need help with your library
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

vlkc

7 Posts

Posted - Mar 27 2018 :  15:15:21  Show Profile  Reply
Could someone please check my source. It works for 20-30 bitmaps and then stuck. Thank you


Form_main.ImageEnVect1.LockPaint;
Form_main.ImageEnVect1.RemoveAllObjects;
Form_main.ImageEnVect1.ClearAll();
obj_parallel := IEV_NEXT_INSERTED_OBJECT;
Form_main.ImageEnVect1.ObjBrushStyle[obj_parallel]:= TBrushStyle(1);
Form_main.ImageEnVect1.MouseInteractVt := Form_main.ImageEnVect1.MouseInteractVt + [miPutBox];
Form_main.ImageEnVect1.Assign(NewBitmap);
Form_main.ImageEnVect1.Fit;
Form_main.ImageEnVect1.SelectionBase := iesbBitmap;
Form_main.ImageEnVect1.Select(10,10,400,300,iespReplace);
Form_main.ImageEnVect1.UnLockPaint;

w2m

USA
1990 Posts

Posted - Mar 27 2018 :  15:43:26  Show Profile  Reply
I do not understand what you want to do.

Your code removes all objects, prepares to insert an object, changes the background bitmap and makes a selection. I do not understand. Did you not include all the code?
What are you trying to do?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

vlkc

7 Posts

Posted - Mar 27 2018 :  16:23:50  Show Profile  Reply
yes that is all. I'm inserting "NewBitmap" and displaying it.
Go to Top of Page

xequte

39053 Posts

Posted - Mar 28 2018 :  03:24:01  Show Profile  Reply
Hi

I tested as follows and had no problems:

procedure Tfmain.Button6Click(Sender: TObject);
var
  NewBitmap: TIEBitmap;
  I: Integer;
begin
  for I := 1 to 1000 do
  begin
    Caption := IntToStr( I );
    NewBitmap := TIEBitmap.Create();
    NewBitmap.Read('D:\_Testfiles\bigimage.jpg');
    ImageEnVect1.LockPaint;
    ImageEnVect1.RemoveAllObjects;
    ImageEnVect1.ClearAll();
    ImageEnVect1.ObjBrushStyle[IEV_NEXT_INSERTED_OBJECT]:= TBrushStyle(1);
    ImageEnVect1.MouseInteractVt := ImageEnVect1.MouseInteractVt + [miPutBox];
    ImageEnVect1.Assign(NewBitmap);
    ImageEnVect1.Fit;
    ImageEnVect1.SelectionBase := iesbBitmap;
    ImageEnVect1.Select(10,10,400,300,iespReplace);
    ImageEnVect1.UnLockPaint;
    NewBitmap.Free;
  end;
end;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

vlkc

7 Posts

Posted - Mar 28 2018 :  05:32:17  Show Profile  Reply
actually i run it in thread. could you please do the test with 1000 loop and 3 sec delay?
Go to Top of Page

vlkc

7 Posts

Posted - Mar 28 2018 :  05:35:09  Show Profile  Reply
maybe this line hangs - obj_parallel := IEV_NEXT_INSERTED_OBJECT;
Go to Top of Page

xequte

39053 Posts

Posted - Mar 28 2018 :  20:16:13  Show Profile  Reply
Hi

obj_parallel is just a variable, so setting it to -1 (IEV_NEXT_INSERTED_OBJECT) could not cause a crash.

I added a 3 second delay. It did not cause any issues.

What are the specs of the system you are testing it on?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

vlkc

7 Posts

Posted - May 13 2018 :  07:27:17  Show Profile  Reply
ImageEnVect1.ObjBrushStyle[IEV_NEXT_INSERTED_OBJECT]:= TBrushStyle(-1);

I don't know is it correct, but it helps :)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: