Hi,
I’m generating a series of still images using Python in an execute DAT. The resolution of each frame must vary according to the size of the text inside each image. I can see that my resolution changes are indeed taken into account by the MovieOut as the resolutions of the resulting files are as expected. The problem is that whenever I change the resolutionw or resolutionh of the TOP connected to the MovieOut’s input I get garbled images. Here’s the simplified code:
[code]def onOffToOn(panelValue):
num_lines = op(‘text’).numRows
line_counter = 0
op('bubble_text').par.resolutionw = 800
op('bubble_text').par.resolutionh = 50
for line_counter in range(num_lines+1):
# Generate new filename and save image
filename = 'NumSMS1.' + str(line_counter) + '.png'
op('moviefileout').par.file = filename
op('moviefileout').par.addframe.pulse()
#Increase resolution on every iteration
op('bubble_rectangle').par.resolutionw += 10
op('bubble_rectangle').par.resolutionh += 5
return[/code]
The resulting images appear as though there is a “sync” problem (sheared text or rectangles with diagonals for instance) and sometimes I will see part of the previous image inside the next one. Mismatched buffer sizes overflowing into a neighboring area perhaps? I’ve attached two images of an 810x55 green rectangle with rounded corners to illustrate the problem.
I’ve tried changing the type of TOP (text, rectangle etc) connected to the MovieOut and they also resulted in the same garbled output when I changed their resolution between adding frames.
I also tried changing the MovieOut’s output resolution to Custom and explicitly matching its resolution to that of the input TOP’s. Same result.
If I manually change the resolution in the code and generate only one image at a time there is no problem. The files come out as expected. It is only when I try changing the resolution within a single execution of my code generating a series of images that I will get garbled files. Strangely, even the first file in a series is garbled when I do this.
Thanks!