With this code, I get 9994 images before CreateImage() returns ZERO:
Code: Select all
For i = 1 To 14000
Debug Str(i) + " : " + Str(CreateImage(#PB_Any, 32, 32, 24))
Next i
9993 : 10233664
9994 : 10233704
9995 : 0
9996 : 0
...
But if I change the size of the images, I get the same maximum number:
Code: Select all
For i = 1 To 14000
Debug Str(i) + " : " + Str(CreateImage(#PB_Any, 96, 96, 24))
Next i
9993 : 10233664
9994 : 10233704
9995 : 0
9996 : 0
...
And if I create a huge image before, I get one picture less:
Code: Select all
Debug CreateImage(1, 16000, 16000, 24)
For i = 1 To 14000
Debug Str(i) + " : " + Str(CreateImage(#PB_Any, 96, 96, 24))
Next i
...
9992 : 10233624
9993 : 10233664
9994 : 0
9995 : 0
...
Why the number of images seems limited? Or is this a problem of the Virtual machine I use (Win XP in Virtualbox on GNOME)?
It does not seem to be a memory problem, because the number of created images is the same with different image sizes.