Reading 16 bit unsigned raw image in c++ -


i trying read 16 bits unsigned image (192*256) saved in raw format using following lines of code:

file * pfile; pfile = fopen("d:\\s1.raw", "r"); unsigned short bufferimage[1][192*256];  fread(&bufferimage[0][0], 256*192*sizeof(unsigned short),1, pfile); 

however values stored in bufferimage not correspond pixels values in image. appreciate that.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -