I need to read in bitmaps and png files as binary data, change the header data by overwriting the first 20 bytes, then write out the data to a new filename. I have written code to do this in matlab (shown below) but for some reason I am having a complete block on how to do this in C++
Any help or suggestions appreciated
Thanks
Matlab code
--------------------------
fid=fopen(filename,'w');
fwrite(fid,vid_header,'ubit8');
fwrite(fid,reshape(img_data
,:,1).',512*512,1),'ubit8');
fclose(fid);
----------------------------
Any help or suggestions appreciated
Thanks
Matlab code
--------------------------
fid=fopen(filename,'w');
fwrite(fid,vid_header,'ubit8');
fwrite(fid,reshape(img_data
fclose(fid);
----------------------------