Skip to content

Commit

Permalink
Fixed jpeg loading
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 18, 2010
1 parent c9c6955 commit 3c74720
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Image.cc
Expand Up @@ -302,9 +302,9 @@ Image::loadSurface() {
for (int x = 0; x < width; ++x) {
uint32_t *pixel = row + x;
*pixel = 255 << 24
| src[x + 0] << 16
| src[x + 1] << 8
| src[x + 2];
| src[3 * x + 0] << 16
| src[3 * x + 1] << 8
| src[3 * x + 2];
}
}

Expand All @@ -314,7 +314,7 @@ Image::loadSurface() {
, width
, height
, width * 4);

cairo_surface_write_to_png(_surface, "test2.png");
fclose(stream);
jpeg_finish_decompress(&info);
jpeg_destroy_decompress(&info);
Expand Down

0 comments on commit 3c74720

Please sign in to comment.