Cannot write more than 509 JPEG files
Issue #25
resolved
Hi: I tried this "one liner" on Windows 10 using FL 0.79.47 and got an error:
FL> for i=0,1000 do write_jpeg,'c:\tmp\T_'+strtrim(i,2)+'.jpg',bytscl(randomn(s,3,50,50)),true=1 % Error: WRITE_JPEG: can not open file: c:\tmp\T_509.jpg
In my application I need to write out 1000's of images (using a different program!) and I get a crash. I modified it to write PNG and I don't get an error. I think it must be a problem with the write_jpeg routine.
If I also add writing a text file to the loop writing a Jpeg image then I get an error that I can't open a text file for the 509'th text file.
I attach a test program of all the things I tried - usually writing a PNG file instead solves it but not always. Thanks Chris
Comments (2)
-
repo owner -
repo owner - changed status to resolved
Closed.
- Log in to comment
An fclose is missing and file descriptors are exhausted. Fixed for the next snapshot. Thanks for the report.