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
 LayersCreateFromSelection
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

klausdoege

Germany
389 Posts

Posted - Jul 30 2012 :  13:59:57  Show Profile  Reply
Hello,
if I process big pictures and use the function
imageenvect.LayersCreateFromSelection;
then a white surface always appears short-term
over the entire picture before I seeing the new layer.
How can I prevent that?


Klaus
www.klausdoege.de

fab

1310 Posts

Posted - Aug 01 2012 :  09:36:37  Show Profile  Reply
Hello,
how much big is your picture (in pixels)?
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Aug 01 2012 :  13:08:25  Show Profile  Reply
Hello,
my picture has 2700x3600 pixels.
But it happens also with 800x1200 pixels, only the white picture is visible more shortly.

Klaus
www.klausdoege.de
Go to Top of Page

Uwe

284 Posts

Posted - Aug 02 2012 :  12:22:28  Show Profile  Reply
Klaus,

have you tried to wrap the whole thing into a SendMessage(Handle, WM_SETREDRAW, 0, 0) block?

Uwe
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Aug 02 2012 :  13:12:21  Show Profile  Reply
Hello,
no the function becomes normally after generates a selection called.
if I use:
imageenvect.CopySelectionToIEBitmap(MyImageEnView1.IEBitmap);
imageenvect.LayersAdd(MyImageEnView1.IEBitmap);

everything works very well, without white shows.

Klaus
www.klausdoege.de
Go to Top of Page

Uwe

284 Posts

Posted - Aug 02 2012 :  17:25:11  Show Profile  Reply
So what happens if you use

SendMessage(ImageEnVect1.Handle, WM_SETREDRAW, 0, 0)
ImageEnVect1.LayersCreateFromSelection;
ImageEnVect1.CopySelectionToIEBitmap(MyImageEnView1.IEBitmap);
ImageEnVect1.LayersAdd(MyImageEnView1.IEBitmap);
SendMessage(ImageEnVect1.Handle, WM_SETREDRAW, 1, 0);
RedrawWindow(ImageEnVect1.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_NOINTERNALPAINT);
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Aug 03 2012 :  14:29:21  Show Profile  Reply
Hello Uwe,

thank you for the tip.
SendMessage(ImageEnVect.Handle, WM_SETREDRAW, 0, 0);
imageenvect.LayersCreateFromSelection;
SendMessage(ImageEnVect.Handle, WM_SETREDRAW, 1, 0);
RedrawWindow(ImageEnVect.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_NOINTERNALPAINT);

Now, it runs just like it must be.
best greetings

Klaus
www.klausdoege.de
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: