From 0e38fe1c677b0abaac8993fac9cf6a30d6cd1b38 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 3 Jun 2009 23:00:42 +0100 Subject: [boilerplate] Read big-endian images from any2ppm --- boilerplate/cairo-boilerplate.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3