是在解壓的程序中讀取還是解壓之前讀取,
row_stride = cinfo.output_width * cinfo.output_components;
buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
jpeg_start_decompress(&cinfo);
while (cinfo.output_scanline < cinfo.output_height) {
(void) jpeg_read_scanlines(&cinfo, buffer, 1);
//jpeg_read_scanlines函式用來把解壓縮的資料傳遞到記憶體Buffer中
}
應該是在while回圈里面讀取吧,可是jpeg是按塊編碼的,如何讀取行列號和所需讀取的行列數,對于原理還不太懂
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/88618.html
標籤:基礎類
上一篇:gr r
下一篇:求救求救~~~~~
