projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc0509b
)
progs/samples: Byte swap individual members of struct _rawImageRec.
author
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 23:41:13 +0000
(15:41 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 23:41:13 +0000
(15:41 -0800)
progs/samples/rgbtoppm.c
patch
|
blob
|
history
diff --git
a/progs/samples/rgbtoppm.c
b/progs/samples/rgbtoppm.c
index 56ca5b0efe9e0e9753cab41a221ed2854d4df23c..dcb74228dfffde8743d802a6306e5070a836eed4 100644
(file)
--- a/
progs/samples/rgbtoppm.c
+++ b/
progs/samples/rgbtoppm.c
@@
-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);