image processing - i want to write .j2c file -


with freeimage want create j2c file dcinema , test it, however, result file not compatible j2c.

ifanview (image software) says "result.j2c" jp2 file incorrect extension , renames result.j2c result.jp2.

i don't understand how create j2c file.

my code below:

rgbquad color; getdims(  houtputimage, &iwidth, &iheight );  uchar* psrc = ( uchar* )(image->getraw( houtputimage) ); fibitmap* bitmap = freeimage_allocate(iwidth, iheight, 24);  ( int = 0; < iheight; i++) {     for( int j = 0 ; j < iwidth; j++) {         color.rgbred =  *( psrc + 0 );         color.rgbgreen =  *( psrc + 1 );         color.rgbblue =  *( psrc + 2 );         freeimage_setpixelcolor(bitmap, j, , &color);         psrc += 4;     } }  static int index = 0; cstring filename; filename.format("c:\\%06d.j2c", index++); const char *ss = (lpstr)(lpctstr) filename;  freeimage_save(fif_j2k, bitmap, ss, j2k_default ); 

what should do?


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -