Deng Daokuan(deleted)
|
libimg how to encode png to memory
|
Deng Daokuan(deleted)
08/13/2019 3:06 AM
post119804
|
libimg how to encode png to memory
Hi
In my case, I want to encode a pixel buffer into a piece of memory in png format.I just write the code:
BYTE* pbtBuffer = new BYTE[img.w * img.h];
s_writeBufferSize = img.w * img.h;
io_stream_t* pOutStream = io_open( IO_MEM, IO_WRITE, img.w * img.h, pbtBuffer );
if ( !pOutStream )
{
CLogApp::info( String::format( L"io_open error: %d", errno ) );
return FALSE;
}
pOutStream->output.write_f = ioMemoryWrite;
But I cannot do io_open( IO_MEM...) with IO_WRITE. I search the history and find that qnx not support the write mode
with io_mem.
How can I do this. Can someone help me? Thanks!!!!!!!!!!!!
|
|
|