I dunno why, but first pixel (left bottom) is loaded correctly, but the others won’t load and the first color is used for whole picture…
I have this in cycle
fread(&pix,sizeof(pix),1,pictureIn);
fwrite(&pix,sizeof(pix),1,pictureOut);
edit:
pix is struct of three unsigned chars (rgb), loading file and info header seems to be ok
What OS are you using? I recently had problem with reading binary files under Win32. It turned out that I forgot to pass “b” flag to fopen: