2003.09.02 10:13 "[Tiff] Reading and writing to memory.", by Väinö Järvelä
I am not absolutely certain why you are getting the "dummy: Not a TIFF file, bad magic number" message. It may be that as currently setup even a writable data stream needs to support read, and that you are not allowing the tiff header to be read back by the code.
The problem was that the buffer where i was writing to was already allocated, and that is why it tried to read the headers from it. And i hadn't implemented extending the memory because i thought that allocating it to the size of the image by myself was enough.. stupid me.. it needs to write headers in to it too, and it's going to be compressed.
Thanks for guiding the way to the solution.