1

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 qnx forum and find that qnx not support the IO_WRITE with IO_MEM.

How can I do this. Can someone help me? Thanks!!!!!!!!!!!!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.