R
ratrak
Hi All
I'm writing a code to manipulate BMP files and somethink isnt work as
expected.
In print the bitmap file:
struct Pixel
{
char Blue;
char Green;
char Red;
char Reserved;
} *pixel;
pixel=(struct Pixel*)malloc(sizeof(struct
Pixel)*infoheader.BiWidth*infoheader.BiHeight);
fseek(filein,header.BfOffSetBits,SEEK_SET);
fread(pixel,infoheader.BiWidth*infoheader.BiHeight,sizeof(struct
Pixel),filein);
fseek(fileout,header.BfOffSetBits,SEEK_SET);
fwrite(pixel,infoheader.BiWidth*infoheader.BiHeight,sizeof(struct
Pixel),fileout);
the result is an black picture or some image wich can't be opened by
the view.
Maybe this hapen because some character of the structure shape have
been printed?
Thanks
Rafael
I'm writing a code to manipulate BMP files and somethink isnt work as
expected.
In print the bitmap file:
struct Pixel
{
char Blue;
char Green;
char Red;
char Reserved;
} *pixel;
pixel=(struct Pixel*)malloc(sizeof(struct
Pixel)*infoheader.BiWidth*infoheader.BiHeight);
fseek(filein,header.BfOffSetBits,SEEK_SET);
fread(pixel,infoheader.BiWidth*infoheader.BiHeight,sizeof(struct
Pixel),filein);
fseek(fileout,header.BfOffSetBits,SEEK_SET);
fwrite(pixel,infoheader.BiWidth*infoheader.BiHeight,sizeof(struct
Pixel),fileout);
the result is an black picture or some image wich can't be opened by
the view.
Maybe this hapen because some character of the structure shape have
been printed?
Thanks
Rafael