I'm using the write method to directly write pixels
which is an array of array[(R, G, B)] of byte;
.
The pixels
is properly allocated like so: setlength(pixels, 750000);
what I do is as follows:
f := TFileStream.create(FileName, fmCreate);
written := f.write(pixels, 750000);
The problem is that the write method returns 0, videlicet it didn't write a byte from pixels
.
With some tests, I've discovered that it copies only up to about 20000 bytes, certainly not more than 30000 and the moment I give it more to write, it doesn't.. and returns 0.
I am new to Pascal, but I cannot find a solution to this unpleasant problem. So what am I doing wrong ?