progs/samples: Byte swap individual members of struct _rawImageRec.
This commit is contained in:
parent
bc0509bba8
commit
1cf60c9810
|
@ -93,7 +93,12 @@ static ImageRec *ImageOpen(char *fileName)
|
|||
fread(image, 1, 12, image->file);
|
||||
|
||||
if (swapFlag) {
|
||||
ConvertShort(&image->imagic, 6);
|
||||
ConvertShort(&image->imagic, 1);
|
||||
ConvertShort(&image->type, 1);
|
||||
ConvertShort(&image->dim, 1);
|
||||
ConvertShort(&image->xsize, 1);
|
||||
ConvertShort(&image->ysize, 1);
|
||||
ConvertShort(&image->zsize, 1);
|
||||
}
|
||||
|
||||
image->tmp = (unsigned char *)malloc(image->xsize*256);
|
||||
|
|
Loading…
Reference in New Issue