diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-03 23:00:42 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-03 23:00:42 +0100 |
commit | 0e38fe1c677b0abaac8993fac9cf6a30d6cd1b38 (patch) | |
tree | 8e92fd0be3fdca7f3926507fe9c2893a834232f6 | |
parent | 3914c8e5b2181dd2ca5c1d3212f26268f508d6e9 (diff) | |
download | cairo-0e38fe1c677b0abaac8993fac9cf6a30d6cd1b38.tar.gz |
[boilerplate] Read big-endian images from any2ppm
-rw-r--r-- | boilerplate/cairo-boilerplate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index 13b14eb9a..fb96bee55 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; |