Create two local Integers (say vWidth As Integer and vHeight As Integer), fill them with the vlues, check the values and pass vWidth and vHeight to New Picture.
You may check in the Debugger the vWidth and vHeight values to be sure everything is OK.
I forgot! often the function is performed normally. Only a few times I have an error. I believe it may be internal to directshow, but the frustrating thing is that not even a try…catch … avoids the sudden crash. No error message. the program closes and you return to the xojo idea. I therefore cannot even identify the nature of the error
let’s say that the call, basically, works. If I then change the camera, I have a system that resizes the preview of the live stream (which contains this function). At that point, not at the first change, sometimes it crashes
it’s not that simple to explain. It is a very complex acquisition system, with different types of acquisition. In short, behind it there is a system that collects a few frames and, by calling the pause, you can go back / forward one frame at a time. The solution is to reduce the maximum number of retained frames (from 500 to 100, for example)
I worked with a photofinish system (as a user, not a developer). It keeps some images in memory, but beyond a certain number of images, older ones are transferred to disk. Once the picture acquisition is completed, the remaining images are saved from memory to disk. The navigation back and forth uses in-memory images loaded from a determined time point. Perhaps you could implement something similar? The key here is that every image is a very thin vertical slice of space, taking relatively little memory each.