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
 Problem with Layers in 9.x
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

DRIGUS

21 Posts

Posted - Oct 28 2020 :  07:11:39  Show Profile  Reply
Hi *.*,

we use a TImageEnView in order to display a camera preview combined with some layers for displaying informations and buttons. We are using the DirectShow property in order to connect to the camera.

In OnDShowNewFrame we do something like this:

--- Schnipp On ---
IEViewPreview.LockUpdate;

try
IEViewPreview.LayersCurrent := FVideoLayer.LayerIndex;
IEViewPreview.IO.DShowParams.GetSample(FVideoLayer.Bitmap);
finally
IEViewPreview.UnLockUpdate;
end; // finally
--- Schnipp Off ---

(FVideoLayer is a TIEImageLayer).

Using ImageEn 8.6.0 it looks as expected:



Using 9.0.0 there are artifacts (white rectangle at the top):



Using 9.2.5 there are more artifacts and the buttons (layers) are missing:



Any hints?

Greetrings,
Björn Schreiber
--
DRIGUS Systeme GmbH

xequte

38182 Posts

Posted - Oct 29 2020 :  00:18:41  Show Profile  Reply
Hi Bjorn

Are you able to narrow it down to a DirectShow or ImageLayer issue? I.e. does it still happen when you have no layers (output video to the background)?


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

DRIGUS

21 Posts

Posted - Oct 30 2020 :  11:20:54  Show Profile  Reply
Hi Nigel.

I think I track it down to a problem loading PNG files. As mentioned we added some layers. We do it like this:


IEViewPreview.LayersAdd(ielkImage);
FBtnPhotoLayer := IEViewPreview.CurrentLayer as tIEImageLayer;
FBtnPhotoLayer.SoftShadow.Enabled := True;
IEViewPreview.IO.LoadFromResource(Application.ExeName, 'RCData',
  'DRIGUSCAMERABTNPHOTO', ioUnknown);


This resource is a PNG file with a width and height of 50 pixels. Using ImageEn 8.7.6, after loading this resources, the layer have a width and height of 50 pixels as expected. Using ImageEn 9.2.5 the layer have a width of 689 pixels and a height of 433 pixels after loading - which is not correct.
I tried LoadFromFile instead of LoadFromResource - with the same wrong result. But it worked if I convert it to a BMP file (24 bit, no alpha channel).
This is one of the problematic PNG file (all white with an alpha channel):



But perhaps there is another issue. Even if I don't add any layers and don't react on OnDShowNewFrame, there is one big white retangle:



Remark: we still using Delphi 5.

Best regards,
Björn
--
DRIGUS Systeme GmbH
Go to Top of Page

xequte

38182 Posts

Posted - Oct 30 2020 :  19:53:04  Show Profile  Reply
Can you attach the PNG files and give the steps to reproduce both issues.

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

DRIGUS

21 Posts

Posted - Nov 03 2020 :  10:13:24  Show Profile  Reply
The PNG file is already attached, you well find it above the paragraph starting with "But perhaps there is...". You can see it only when selecting because it is all white.

Best regards,
Björn Schreiber
--
DRIGUS Systeme GmbH
Go to Top of Page

DRIGUS

21 Posts

Posted - Nov 04 2020 :  09:02:27  Show Profile  Reply
Steps to reproduce (Delphi 5):

Create a new application with a single form, put an ImageEn component on the form and change the property Background to clBlack.

In OnFormCreate put the following:

  ImageEn1.Blank;
  ImageEn1.LayersAdd(ielkImage);
  ImageEn1.IO.LoadFromFile('C:\Temp\Btn.png');


In ImageEn 9.2.5 I can't see the loaded PNG, only a black background. In ImageEn 8.7.6 I can see the PNG in the center of the component with a black background.

The results are the same even if you remove the call to LayersAdd.

Best regards,
Björn Schreiber
--
DRIGUS Systeme GmbH
Go to Top of Page

xequte

38182 Posts

Posted - Nov 05 2020 :  16:39:32  Show Profile  Reply
Hi Bjorn

I tested this on the oldest version I have on this system, Delphi 2007, and it worked as expected:




Here's my project source and exe:

attach/xequte/202011516386_Drigus.zip
1934.82 KB

I'll also have my partner test it in Delphi 5 to see if it is a version issue.



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

DRIGUS

21 Posts

Posted - Nov 11 2020 :  03:25:59  Show Profile  Reply
Hi Nigel,

did you get any feedback from your partner?


Björn Schreiber
--
DRIGUS Systeme GmbH
Go to Top of Page

xequte

38182 Posts

Posted - Nov 11 2020 :  19:14:22  Show Profile  Reply
Hi Bjorn

We're releasing v9.2.6. to fix a performance issue with TImageEnMView, so unfortunately my partner has not had yet time to investigate. Does my demo above fail on your end in Delphi 5?

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

DRIGUS

21 Posts

Posted - Nov 13 2020 :  07:52:51  Show Profile  Reply
Hi Nigel,

did you delete a post? I thought I read another answer regarding your partner.


I tested your attached project in Delphi 5 with the same results. It is working in ImageEn 8.7.6, but not in 9.2.5. There is only a blank / black image. The precompiled EXE was working as expected and shows the PNG.

In order to compile the project I had do modify the uses statement in Unit1.pas (unknown TIERichEdit I think). And I loaded ImageEn 8.7.6 in Delphi 5 while compiling, but the source path directed to ImageEn 9.2.5.

Both shouldn't affect the results in any way.


Greetings
Go to Top of Page

xequte

38182 Posts

Posted - Nov 13 2020 :  23:11:56  Show Profile  Reply
Hi

Yes, I deleted a post after getting some further information. The problem does not exist in Delphi 7, but does exist in Delphi 5. Not sure why that could be, so I will need to investigate further.

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

DRIGUS

21 Posts

Posted - Feb 17 2021 :  05:49:17  Show Profile  Reply
Any news on this topic? I tried 9.3.1 in Delphi 5 and the problem still exists. I fall back to 8.7.6 which works as expected.

Because we use Delphi 10.3 / 10.4, too, and 8.7.6 fails to compile in Delphi 10.4, I tried 9.3.1 in Delphi 10.3. There is still a big white rectangle in the upper left corner, but the PNGs are displayed correct.

Greetings
Go to Top of Page

xequte

38182 Posts

Posted - Feb 17 2021 :  14:46:10  Show Profile  Reply
Hi

Unfortunately it is not practical for us to debug this issue in D5. Are you able to create a simple demo showing the white rectangle issue in 10.3?

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

DRIGUS

21 Posts

Posted - Feb 24 2021 :  06:09:16  Show Profile  Reply
Hi.

I tried to create a simple demo in 10.3 but failed. So I stripped down the existing project until I only have an empty frame. There was still this white rectangle starting in the upper left corner.

I added a call to Blank in TFrame.Create and the rectangle disappears. Same for the original code. The call to Blank removes the white rectangle in the Delphi 5 project, too. But using ImageEn 9.3.1 with Delphi 5 there is still the problem with the PNG ressources not loading any more.

So we will stick with 8.7.6 for Delphi 5 and use 9.3.1 for Delphi 10.3 (and hopefully 10.4).

Greetings
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: