JPIP streaming images(with download).How to save the bitmap in c++ local folder.
Kakadu)JPEG 2000 Interactive Protocol is protocol using this i streaming the images from server to client(without images downloaded) its streaming concept done in kakadu.
I need to save bitmap images local folder(with same file name) bytes by bytes (concept in kakadu code) while saving time I did not get orginal images thats why i am asked.
}
else
{
int cache_store_lenvalues=300;
// Load the bitmap file, amd put its data part into the BYTE array
BYTE* bytes = LoadBMP( &imageWidth, &imageHeight, &imageSize, _T("C:\\LogEntries\\bluesquareOneTwoNew.bmp") );
std::reverse( bytes, bytes + imageSize );
// Determine amount of padding required, if any, and create a new BYTE array from this
std::unique_ptr<BYTE[]> newbuf2 = CreateNewBuffer( padding, bytes, imageWidth, imageHeight );
memcpy(&newbuf2,cache_store_buf,300);
// Use the new array data to create the new bitmap file
SaveBitmapToFile( (BYTE*) &newbuf2[ 0 ],imageWidth,imageHeight,24,padding,_T("C:\\LogEntries\\bluesquareOneTwoNew.bmp") );
}
}
bin_id = get_next_lru_databin(cls,cs_id,bin_id,false);
}
}
cs_id = get_next_codestream(cs_id);
}
}
catch (...)
{ // Something went wrong; delete the cache file
fclose(cache_file);
remove(path);
delete[] cache_store_buf;
return false;
}
fclose(cache_file);
////////////////////
// SaveBitmapToFile( (BYTE*) cache_store_buf,128,128,24,0,_T("C:\\LogEntries\\save_cache_contents.bmp"));
/////////////////
delete[] cache_store_buf;
return true;
}