Using ignition 8.1.27 vision
I have a button that creates a screenshot of the open program. I recently changed the entire script from a project script that created a PDF by sending the image through SQL to a button script that makes a JPEG instead using the following code:
The old way of sending the image through SQL was causing temporary communication losses with the client/gateway. I thought the changes I made would stop this but it seems I still have comm losses. When I tried to change the button script to a gateway project script it works the first time the button is pressed, then it stops working until the program is closed/ reopened. It seems to work back to back as a button script - but will eventually cause comm loss. Am I missing something to close out the image once created? I know that in both scenarios (project script or button script) the code is reaching the end because the last line creates an event log that I can see, but with the project script it won't execute after the first time
