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
 Possible bug in image layers and line layers
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jrpcguru

USA
254 Posts

Posted - Mar 20 2019 :  14:16:52  Show Profile  Reply
As I have worked on my program, I bumped into a couple of issues.

With a line layer, I turned on rotating via miRotateLayers. When I rotated the line layer several times, it did not go from 0 to 360. It kept increasing the rotation value?? I'm not sure if that would ever be harmful, but it doesn't seem logical. I confirmed this happens in the all layers demo. Just insert a line layer then rotate it more than once. I think this happens with the other layer types.

The bigger problem is with image layers. I have provided for saving the layer settings as defaults and restoring them. I discovered that if the image layer rotation is stored as even 1 degree, it does not draw the selection box when I try to drag with the mouse to specify the area to place the new image layer. The image is inserted where the mouse moved.

With the all layers demo the following steps demonstrate this problem:

Add a single line to btnAddClick:
procedure Tfmain.btnAddClick(Sender: TObject);
begin
ImageEnView1.LayerDefaults.Add( IELP_Rotate +'=1' );

1. Load image file
2. Select Image as the Add Layer type
3. Click Add button. It works correctly.
4. Attempt to drag a selection box for another image. No box, but it launches file dialog and selected file is inserted into the invisible box.

I also find that the demo has another problem (without my added LayerDefault).
After steps 1 and 2, try dragging the selection box for your new image layer. The selection box will be visible but it generates an access violation. This does not happen with the other layer types. This also happens with my added LayerDefault line.

For the moment, my work around will be to always set the default rotation to 0. But I'm guessing you did not intend that requirement.


J.R.

xequte

38182 Posts

Posted - Mar 21 2019 :  23:24:47  Show Profile  Reply
Hi JR

I can reproduce this, but not the access violation. Can you email me for a fix and confirm it resolve the issues?



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

jrpcguru

USA
254 Posts

Posted - Apr 22 2019 :  19:41:29  Show Profile  Reply
I am now using 8.5.0. The rotation issue is fixed.
The image add behavior has gotten worse.

Add a single line to btnAddClick:
procedure Tfmain.btnAddClick(Sender: TObject);
begin
ImageEnView1.LayerDefaults.Add( IELP_Rotate +'=1' ); << this doesn't have to be there anymore.

1. Load image file
2. Select Image as the Add Layer type
3. Click Add button. It works correctly and adds a new image.
4. Attempt to drag a selection box for another image. It displays the image box but does not launch the file dialog, instead it generates an exception. And each time the mouse clicks on the new layer, an exception is generated.

J.R.
Go to Top of Page

xequte

38182 Posts

Posted - Apr 22 2019 :  19:51:35  Show Profile  Reply
Hi JR

Sorry, I cannot reproduce that. Can you give me the steps to reproduce in our Layers demo?



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

jrpcguru

USA
254 Posts

Posted - Apr 23 2019 :  11:57:13  Show Profile  Reply
I have tried this in 10.3 and XE2. I made sure I had the newest version of IELIB32.DLL.

Use the file > open to load an image file. I've tried TIF and JPG.
Select Image as the type of layer to add, using the combo box at top left for Mouse Action.

If I immediately draw a layer with the mouse, I get an immediate exception error though the Layers list shows the new layer. The box is drawn and displayed but every time the mouse goes over the box I get the exception error.

I can click the Add button and it will prompt for an image file to load into a layer. But as soon as I draw another layer, I get the exception error.

I've been testing my program and so far your updates seem to be working.

J.R.
Go to Top of Page

xequte

38182 Posts

Posted - Apr 23 2019 :  19:48:26  Show Profile  Reply
Hi JR

Please email me for a fix for this.

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

jrpcguru

USA
254 Posts

Posted - Apr 24 2019 :  17:51:53  Show Profile  Reply
I am puzzled by your answer. In testing my program I have not had the results that I documented with the demo program. So, I'm wondering if the problem was a bug in the demo, not in ImageEn?

J.R.
Go to Top of Page

xequte

38182 Posts

Posted - Apr 27 2019 :  01:57:47  Show Profile  Reply
Sorry, I left out a critical word in my response, "FOR" (which i have corrected now).

I have fixed this issue in the ImageEn source. Please email me if you would like the updated source.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: