AddEmbeddedImageAnnotInteractive not working
AddEmbeddedImageAnnotInteractive not working
Hi,
We were using AddEmbeddedImageAnnotInteractive and AddEmbeddedImageAnnotInteractive_2 without problems on GdPicture 14.0.0.4
Now we have upgraded to (legacy) 14.1.0.121 and these annotations can not be added.
Calling these methods normally changes the cursor into a selection icon and when clicking the main image, the event AnnotationAddedByUser would be triggered and the annotation image is placed.
Now, the method call does not change the cursor and no event is triggered.
When GetStat is used, error 0.5 is returned (which is strange as it should be an integer).
All other annotations work like expected. It is only the embedded image annotation which fails.
Did something change between the versions?
Or could it be a bug in 14.1.0.121?
More info:
GdPicture .NET COM/ActiveX 14.1.0.121
We were using AddEmbeddedImageAnnotInteractive and AddEmbeddedImageAnnotInteractive_2 without problems on GdPicture 14.0.0.4
Now we have upgraded to (legacy) 14.1.0.121 and these annotations can not be added.
Calling these methods normally changes the cursor into a selection icon and when clicking the main image, the event AnnotationAddedByUser would be triggered and the annotation image is placed.
Now, the method call does not change the cursor and no event is triggered.
When GetStat is used, error 0.5 is returned (which is strange as it should be an integer).
All other annotations work like expected. It is only the embedded image annotation which fails.
Did something change between the versions?
Or could it be a bug in 14.1.0.121?
More info:
GdPicture .NET COM/ActiveX 14.1.0.121
Re: AddEmbeddedImageAnnotInteractive not working
Hi there,
Thank you for your question.
Regarding this, could you be more specific as to what behavior you are now getting on your end please? You mention getting an error 0.5.
Could you provide me with a code project I can use on my end to reproduce the behavior please? This is so we may further understand the issue and get to the cause of the issue.
Regards,
Hugo Cudd
Technical Support
Thank you for your question.
Regarding this, could you be more specific as to what behavior you are now getting on your end please? You mention getting an error 0.5.
Could you provide me with a code project I can use on my end to reproduce the behavior please? This is so we may further understand the issue and get to the cause of the issue.
Regards,
Hugo Cudd
Technical Support
Re: AddEmbeddedImageAnnotInteractive not working
Hi,
It is difficult to provide a sample as we are using SqlWindows as development system.
But in fact, the GdPicture setup installs a VB6 sample for annotations which is fairly similar and also has an issue with calling AddEmbeddedImageAnnotInteractive_2
I use the sample from here:
GdPicture.NET 14\Samples\WinForm\vb6 using com interop\annotations
At the moment you try to add image annotation, this error pops up:
And debugging shows this location in the VB6 code:
I guess we have the same issue in our development system. All the other annotation types work fine except this specific function which fails.
As like VB6, we use the COM interop (32bit) of GdPicture 14.1.0.121.
So the provided VB6 sample can be used to investigate the issue.
It is difficult to provide a sample as we are using SqlWindows as development system.
But in fact, the GdPicture setup installs a VB6 sample for annotations which is fairly similar and also has an issue with calling AddEmbeddedImageAnnotInteractive_2
I use the sample from here:
GdPicture.NET 14\Samples\WinForm\vb6 using com interop\annotations
At the moment you try to add image annotation, this error pops up:
And debugging shows this location in the VB6 code:
I guess we have the same issue in our development system. All the other annotation types work fine except this specific function which fails.
As like VB6, we use the COM interop (32bit) of GdPicture 14.1.0.121.
So the provided VB6 sample can be used to investigate the issue.
Re: AddEmbeddedImageAnnotInteractive not working
Agfa,
Thanks for providing more information.
It is VERY likely this issue is fixed as the release you are using was published 13 months ago. Since then we have pushed rather big improvements overall of the stability of our SDK aswell as fixed countless bugs which occured in our previous versions.
Would you be able to update and check this bug still occurs for you in our latest version?
https://www.gdpicture.com/download-gdpicture/
From these 2 different versions, the very same code you are currently using should work in both versions.
I'll be waiting to hear back from you.
Regards,
Hugo Cudd
Technical Support
Thanks for providing more information.
It is VERY likely this issue is fixed as the release you are using was published 13 months ago. Since then we have pushed rather big improvements overall of the stability of our SDK aswell as fixed countless bugs which occured in our previous versions.
Would you be able to update and check this bug still occurs for you in our latest version?
https://www.gdpicture.com/download-gdpicture/
From these 2 different versions, the very same code you are currently using should work in both versions.
I'll be waiting to hear back from you.
Regards,
Hugo Cudd
Technical Support
Re: AddEmbeddedImageAnnotInteractive not working
Hi,
I have finished my investigation and have found that also the latest GdPicture 14.1.0.185 has an issue with image annotations.
The VB6 sample fails and also c# project fails when using the overloaded AddEmbeddedImageAnnotInteractive and AddEmbeddedImageAnnotInteractive_2 methods.
I have created a c# project which just opens an image and two buttons to add image annotation:
one button works and the other does not.
I have found that when using COM and native .NET there is a difference between the "original" method which passes the colors as Color type and the COM interfaces which passes the color as LONG.
See the attached sample application. Here the code of the working and not working part:
In the COM interface there is no method to pass the color as Color type so in VB6 and in our SqlWindows application we must use the method to pass the color as LONG (or int). So the same way as above, the call using AddEmbeddedImageAnnotInteractive_2.
In VB6 sample (as provided by the GdPIcture installer we get the error described in the start post.
In the C# application provided here as attachment it does not give an error but the annotation is not added.
So there is definitely something wrong in the COM interface.
I have finished my investigation and have found that also the latest GdPicture 14.1.0.185 has an issue with image annotations.
The VB6 sample fails and also c# project fails when using the overloaded AddEmbeddedImageAnnotInteractive and AddEmbeddedImageAnnotInteractive_2 methods.
I have created a c# project which just opens an image and two buttons to add image annotation:
one button works and the other does not.
I have found that when using COM and native .NET there is a difference between the "original" method which passes the colors as Color type and the COM interfaces which passes the color as LONG.
See the attached sample application. Here the code of the working and not working part:
Code: Select all
private void button2_Click(object sender, EventArgs e)
{
// This works
gdViewer1.AddEmbeddedImageAnnotInteractive("", false, Color.White, (float)(0.02), 1);
}
private void button3_Click(object sender, EventArgs e)
{
// This doe snot work. THe image is not added
gdViewer1.AddEmbeddedImageAnnotInteractive_2("", false, Color.White.ToArgb(), (float)(0.02), 1);
}
In VB6 sample (as provided by the GdPIcture installer we get the error described in the start post.
In the C# application provided here as attachment it does not give an error but the annotation is not added.
So there is definitely something wrong in the COM interface.
- Attachments
-
- GdPictureTesterNET.zip
- (10.98 KiB) Downloaded 477 times
Re: AddEmbeddedImageAnnotInteractive not working
Any progress on this issue?
Who is online
Users browsing this forum: No registered users and 0 guests