2005.04.02 07:49 "[Tiff] Atternative to read, write, seek, close, sizeof processes", by Katrina Maramba
I am looking for an alternative to the 5 processes Ive listed above.
In the TIFF library, it uses the file operations fread, fwrite, etc. In my program, I want to use this processes not on a file but on a data buffer.
Below is my alternative function:
static tsize_t tiffReadProccess(thandle_t pInputData, tdata_t pBufRet, tsize_t size)
pbTempPtr = (ByteType*)malloc(sizeof(ByteType) * size);
pBufRet = (ByteType*)malloc(sizeof(ByteType) * size);
pbPtr = (ByteType*)pInputData;
memcpy(pbTempPtr, pbPtr, sizeof(ByteType) * size);
memcpy(pBufRet, pbTempPtr, sizeof(ByteType) * size);
Unfortunately, this doesnt work. The buffer returned only has the value ccccccc. I dont know what this means. I also got earlier problems that states that pBufRet has an unknown size. I think this is because its variable type is a void pointer.
Please help. I am very new to image processing. Any help will be deeply appreciated. Thank you.