Page 1 of 1

Windows forms GDViewer locking image while being displayed

Posted: Mon Feb 22, 2021 9:45 pm
by rajalla
Hello,

With the latest GDPicture 14.1.104 version, I have noticed a new issue withe GDViewer control on windows forms. While an image is displayed in the control, the image cannot be modified. We have to use Closedocument to clear the image and make any changes to the image. Is this intentional or is it a bug?

Re: Windows forms GDViewer locking image while being displayed

Posted: Thu Feb 25, 2021 11:07 pm
by Loïc
Hi,

I don't think there is any bug there. If you want to be able to modify the content of a file used as input within this control you have several options and here are few of simple ones:

1- Load the content of the source into a memory stream that you will use as input (not memory friendly, especially for large documents).
2- Switch the ForceTemporaryMode property to true. ref: https://www.gdpicture.com/guides/gdpicture/Gd ... yMode.html
3- Copy the file to another temporary file that you will use as input.

I suggest the option 2.

Kind regards,

Loïc

Re: Windows forms GDViewer locking image while being displayed

Posted: Thu Feb 25, 2021 11:45 pm
by rajalla
I can definitely use the option. I only thought this as a bug because it only started happening with the latest version. I had the same code since version 12 and it only failed now.