Hi Maciek,
Going off memory here, but in general you have to supply information about your image when constructing the header.
You are then you are free to 'feed' the data in a way that is convenient to you. If you close the file without writing all the data then most applications will have issues in opening it up since it will be considered to be corrupt.
You could write a brand new file each time you had a group of tiles come in, but you would have to control your tile locations so that you always had a valid rectangular region.
Another alternative would be to simply write out black, say, pixels for the un-rendered regions.
We have talked about a general checkpointing scheme but I don't think we got very far with any implementation.
Can you share some more information as to the context of your work? Is it the case that you want the OS to show you the current state of the render to a file?
Thanks
-Piotr