cookienya
unread,Aug 28, 2018, 8:28:56 AM8/28/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenJPEG
I learn that when I encode an image by using obj_compress of openjpeg 2.3.0, I find that it need a file handle.
/* open a byte stream for writing and allocate memory for all tiles */
l_stream = opj_stream_create_default_file_stream(parameters.outfile, OPJ_FALSE);
if (! l_stream) {
return 1;
}
So if I want to encode an image and output a stream, how could I do?
I have defined a struct of the struct.
typedef struct{
unsigned char * pData;
OPJ_SIZE_T dataSize;
OPJ_SIZE_T offset;
}opj_stream;
And when I use the function, how should I initialize this struct?