Python take_screen_shot_to_array does not match manual screen shot

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
jbuergel
Posts: 2
Joined: 14. Jun 2024, 20:23

Python take_screen_shot_to_array does not match manual screen shot

Post by jbuergel »

I have an old DOS program that I am automating, and I need to take exact screen shots of the program for it to work. If I take a screen shot as a PNG from the VirtualBox manager, it's the exact copy that I expect, and my automation works fine with it. However, if I use the Python take_screen_shot_to_array with virtualbox.library.BitmapFormat.png, which I would expect to result in the same thing, the resulting screen shot has artifacts in it. There's greyscale that doesn't exist in the source, the position of pixels isn't accurate, and my automation doesn't work. I'm not sure if there's some configuration I'm missing that I need to set, some parameter that I need to pass, or something else to produce the exact screen shots that I can get from the manager.
jbuergel
Posts: 2
Joined: 14. Jun 2024, 20:23

Re: Python take_screen_shot_to_array does not match manual screen shot

Post by jbuergel »

In case anybody sees this in the future, I never figured it out, so I just decided to use VBoxManager to take my screenshots and did my OCR work with those. Clunky, but it works.
Post Reply