[cairo-commit] Branch '1.8' - boilerplate/cairo-boilerplate.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jun 3 15:01:38 PDT 2009
boilerplate/cairo-boilerplate.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 0e38fe1c677b0abaac8993fac9cf6a30d6cd1b38
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 3 23:00:42 2009 +0100
[boilerplate] Read big-endian images from any2ppm
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 13b14eb..fb96bee 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -857,6 +857,8 @@ cairo_boilerplate_image_surface_create_from_ppm_stream (FILE *file)
for (x = 0; x < width; x++) {
if (! freadn (buf, 3, file))
goto FAIL;
+ *(uint32_t *) buf =
+ (buf[0] << 16) | (buf[1] << 8) | (buf[2] << 0);
buf += 4;
}
break;
More information about the cairo-commit
mailing list