diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 15:41:29 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 15:41:29 +0000 |
commit | 510c9a95fb5f3f4a40a19ce66c95344c2013085f (patch) | |
tree | 4f69c12e773da63b2f5d7c116bd241043de24003 /libdimension-png | |
parent | bef2ee297d3492c8a54e61fe498e6eda518da250 (diff) | |
download | dimension-510c9a95fb5f3f4a40a19ce66c95344c2013085f.tar.xz |
Change argument order of dmnsn_set_pixel; write C++ canvas wrapper.
Diffstat (limited to 'libdimension-png')
-rw-r--r-- | libdimension-png/png.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libdimension-png/png.c b/libdimension-png/png.c index 2eb6a7d..9bd22be 100644 --- a/libdimension-png/png.c +++ b/libdimension-png/png.c @@ -231,7 +231,7 @@ dmnsn_png_read_canvas(dmnsn_canvas **canvas, FILE *file) color = dmnsn_color_from_sRGB(sRGB); color.trans = ((double)((png_pixel[6] << UINT16_C(8)) + png_pixel[7]))/UINT16_MAX; - dmnsn_set_pixel(*canvas, color, x, height - y - 1); + dmnsn_set_pixel(*canvas, x, height - y - 1, color); } } } else { @@ -247,7 +247,7 @@ dmnsn_png_read_canvas(dmnsn_canvas **canvas, FILE *file) /UINT16_MAX; color = dmnsn_color_from_sRGB(sRGB); - dmnsn_set_pixel(*canvas, color, x, height - y - 1); + dmnsn_set_pixel(*canvas, x, height - y - 1, color); } } } @@ -264,7 +264,7 @@ dmnsn_png_read_canvas(dmnsn_canvas **canvas, FILE *file) color = dmnsn_color_from_sRGB(sRGB); color.trans = ((double)png_pixel[3])/UINT8_MAX; - dmnsn_set_pixel(*canvas, color, x, height - y - 1); + dmnsn_set_pixel(*canvas, x, height - y - 1, color); } } } else { @@ -277,7 +277,7 @@ dmnsn_png_read_canvas(dmnsn_canvas **canvas, FILE *file) sRGB.B = ((double)png_pixel[2])/UINT8_MAX; color = dmnsn_color_from_sRGB(sRGB); - dmnsn_set_pixel(*canvas, color, x, height - y - 1); + dmnsn_set_pixel(*canvas, x, height - y - 1, color); } } } |