Author |
Topic |
|
klausdoege
Germany
389 Posts |
Posted - Jul 30 2012 : 13:59:57
|
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
|
Hello, how much big is your picture (in pixels)? |
|
|
klausdoege
Germany
389 Posts |
Posted - Aug 01 2012 : 13:08:25
|
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 |
|
|
Uwe
284 Posts |
Posted - Aug 02 2012 : 12:22:28
|
Klaus,
have you tried to wrap the whole thing into a SendMessage(Handle, WM_SETREDRAW, 0, 0) block?
Uwe |
|
|
klausdoege
Germany
389 Posts |
Posted - Aug 02 2012 : 13:12:21
|
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 |
|
|
Uwe
284 Posts |
Posted - Aug 02 2012 : 17:25:11
|
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); |
|
|
klausdoege
Germany
389 Posts |
Posted - Aug 03 2012 : 14:29:21
|
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 |
|
|
|
Topic |
|
|
|