Since the is image already opened by the screenshot function, chrome can't write to that file and throw the exception, "Failed to write file
The process cannot access the file
because it is being used by another process."
It didn't makes sense to open temp_img for writing, when it's being written by a subprocess (Chrome). It seems like doing that blocked Chrome from writing to temp_img.
Since the is image already opened by the screenshot function, chrome can't write to that file and throw the exception, "Failed to write file
The process cannot access the file
because it is being used by another process."
Signed-off-by: Itamar Shalev itamar1111111@gmail.com